From a0599630542ac83a8bf9eb168a31f693bae74f97 Mon Sep 17 00:00:00 2001 From: Izaak Kuipers Date: Fri, 27 Feb 2026 09:37:29 +0100 Subject: [PATCH 1/9] Fix da buggos --- .../ExpressionRow/ComparisonType.svelte | 6 ++- src/apps/components/securecontext/runtime.ts | 6 +-- src/apps/core/initialsetup/runtime.ts | 41 ++++++++++++++++--- src/apps/core/loginapp/runtime.ts | 8 ++-- .../Messages/Container/ActionBar.svelte | 2 +- src/interfaces/contexts/account.ts | 3 +- src/ts/daemon/contexts/account.ts | 20 +++++---- src/ts/terminal/commands/test.ts | 3 +- src/ts/terminal/mode/index.ts | 8 ++-- src/ts/terminal/readline/state.ts | 20 +-------- src/ts/terminal/readline/tty.ts | 1 + src/ts/user/auth.ts | 9 ++-- 12 files changed, 77 insertions(+), 50 deletions(-) diff --git a/src/apps/admin/executequery/ExecuteQuery/Expressions/ExpressionRow/ComparisonType.svelte b/src/apps/admin/executequery/ExecuteQuery/Expressions/ExpressionRow/ComparisonType.svelte index b3bc818f5..6e2b01c4d 100644 --- a/src/apps/admin/executequery/ExecuteQuery/Expressions/ExpressionRow/ComparisonType.svelte +++ b/src/apps/admin/executequery/ExecuteQuery/Expressions/ExpressionRow/ComparisonType.svelte @@ -7,7 +7,11 @@ {#if $expressions[$selectedSource][i].columnName} - ($expressions[$selectedSource][i].comparisonValue = undefined)} + > {#each QueryComparisonTypes as value} {/each} diff --git a/src/apps/components/securecontext/runtime.ts b/src/apps/components/securecontext/runtime.ts index cc296c35b..bf9221be2 100755 --- a/src/apps/components/securecontext/runtime.ts +++ b/src/apps/components/securecontext/runtime.ts @@ -49,14 +49,14 @@ export class SecureContextRuntime extends AppProcess { if (security.noPassword) return true; // Password field is irrelevant if noPassword is set if (security.disabled || !Daemon?.username) return false; // 'Reject all elevation requests' - const token = await LoginUser(Daemon!.username, this.password()); // Try to create a token to validate + const tokenResult = await LoginUser(Daemon!.username, this.password()); // Try to create a token to validate - if (!token) { + if (!tokenResult.success) { await this.passwordIncorrect(); return false; } - await Daemon?.account!.discontinueToken(token); // Discontinue validated token + await Daemon?.account!.discontinueToken(tokenResult.result); // Discontinue validated token return true; } diff --git a/src/apps/core/initialsetup/runtime.ts b/src/apps/core/initialsetup/runtime.ts index 1c85c6a58..d59b33c81 100755 --- a/src/apps/core/initialsetup/runtime.ts +++ b/src/apps/core/initialsetup/runtime.ts @@ -10,6 +10,7 @@ import { Sleep } from "$ts/sleep"; import { LoginUser, RegisterUser } from "$ts/user/auth"; import { htmlspecialchars } from "$ts/util"; import { MessageBox } from "$ts/util/dialog"; +import { UUID } from "$ts/util/uuid"; import { Store } from "$ts/writable"; import type { AppProcessData } from "$types/app"; import CheckInbox from "./InitialSetup/Page/CheckInbox.svelte"; @@ -342,20 +343,46 @@ export class InitialSetupRuntime extends AppProcess { return; } + if (Server?.serverInfo?.noEmailVerify) { + Env.set("DISPATCH_SOCK_ID", UUID()); + const tokenResult = await LoginUser(this.newUsername(), this.password()); + + if (tokenResult.success) { + this.#userDaemon = await Stack.spawn( + UserDaemon, + undefined, + this.#userDaemon?.userInfo?._id, + this.pid, + tokenResult.result!, + this.newUsername() + ); + + await this.#userDaemon?.account?.getUserInfo(); + await this.#userDaemon?.init?.startPreferencesSync(); + await this.#userDaemon?.init?.startFilesystemSupplier(); + + this.#userDaemon?.preferences.update((v) => { + v.isDefault = false; + v.account.displayName = this.displayName(); + + return v; + }); + } + } + this.pageNumber.set(this.pageNumber() + (Server.serverInfo?.noEmailVerify ? 2 : 1)); } async checkAccountActivation() { this.Log(`Checking account activation of '${this.newUsername()}'`); - const token = await LoginUser(this.newUsername(), this.password()); + const tokenResult = await LoginUser(this.newUsername(), this.password()); - if (!token) { + if (!tokenResult.success) { MessageBox( { title: "Did you click the link?", - message: - "Our systems tell me that your account hasn't been activated yet. Are you sure you clicked the link? If you did, and you're still seeing this, please contact support.", + message: `Our systems tell me that your account hasn't been activated yet. Are you sure you clicked the link? If you did, and you're still seeing this, please contact support.

Details: ${tokenResult.errorMessage ?? "Unknown error"}`, buttons: [ { caption: "Okay", @@ -379,14 +406,18 @@ export class InitialSetupRuntime extends AppProcess { undefined, this.#userDaemon?.userInfo?._id, this.pid, - token, + tokenResult.result!, this.newUsername() ); + // set the socket ID to something bogus to fool the backend into thinking we're connected to the websocket + Env.set("DISPATCH_SOCK_ID", UUID()); + await this.#userDaemon?.account?.getUserInfo(); await this.#userDaemon?.init?.startPreferencesSync(); await this.#userDaemon?.init?.startFilesystemSupplier(); this.#userDaemon?.preferences.update((v) => { + v.isDefault = false; v.account.displayName = this.displayName(); return v; diff --git a/src/apps/core/loginapp/runtime.ts b/src/apps/core/loginapp/runtime.ts index a865735f0..ed21474bc 100755 --- a/src/apps/core/loginapp/runtime.ts +++ b/src/apps/core/loginapp/runtime.ts @@ -158,15 +158,17 @@ export class LoginAppRuntime extends AppProcess { this.saveToken(userDaemon); this.loadingStatus.set("Loading your settings"); - const userInfo = await userDaemon.account!.getUserInfo(); + const userInfoResult = await userDaemon.account!.getUserInfo(); - if (!userInfo) { + if (!userInfoResult.success) { this.loadingStatus.set(""); - this.errorMessage.set("Failed to request user info"); + this.errorMessage.set(userInfoResult.errorMessage ?? "Failed to request user info"); return; } + const userInfo = userInfoResult.result!; + this.profileImage.set(`${this.server.url}/user/pfp/${userInfo._id}${authcode()}`); if (userInfo.hasTotp && userInfo.restricted) { diff --git a/src/apps/user/messages/Messages/Container/ActionBar.svelte b/src/apps/user/messages/Messages/Container/ActionBar.svelte index bad7d7ab9..6c078ade1 100755 --- a/src/apps/user/messages/Messages/Container/ActionBar.svelte +++ b/src/apps/user/messages/Messages/Container/ActionBar.svelte @@ -29,7 +29,7 @@ Compose {/if} - {#if $message?.attachmentData} + {#if $message?.attachmentData?.length} + {/if} diff --git a/src/apps/user/mediaplayer/runtime.ts b/src/apps/user/mediaplayer/runtime.ts index c0609cd9f..c0c6338a3 100755 --- a/src/apps/user/mediaplayer/runtime.ts +++ b/src/apps/user/mediaplayer/runtime.ts @@ -33,6 +33,7 @@ export class MediaPlayerRuntime extends AppProcess { public isVideo = Store(false); public Loaded = Store(false); public playlistPath = Store(); + public pinControls = Store(false); MetadataConfiguration = Store({}); CurrentMediaMetadata = Store(); CurrentCoverUrl = Store(); @@ -132,8 +133,17 @@ export class MediaPlayerRuntime extends AppProcess { } async render({ file }: RenderArgs) { - if (await this.closeIfSecondInstance()) return; + const firstInstance = await this.closeIfSecondInstance(); + if (firstInstance) { + if (file) { + if (file.endsWith(".arcpl")) firstInstance.readPlaylist(file); + else firstInstance.readFile([file]); + } + + return; + } + if (file) { if (file.endsWith(".arcpl")) this.readPlaylist(file); else this.readFile([file]); diff --git a/src/css/apps/user/mediaplayer.css b/src/css/apps/user/mediaplayer.css index 357afa6e5..23ad81c3e 100755 --- a/src/css/apps/user/mediaplayer.css +++ b/src/css/apps/user/mediaplayer.css @@ -35,6 +35,7 @@ #MediaPlayer.fullscreen > div.body > div.container { width: 100%; padding: 0; + background-color: var(--win-bg); } #MediaPlayer.fullscreen > div.body > div.container.hide-controls { diff --git a/src/css/apps/user/mediaplayer/controls.css b/src/css/apps/user/mediaplayer/controls.css index 83ca0d418..cac3a31ef 100755 --- a/src/css/apps/user/mediaplayer/controls.css +++ b/src/css/apps/user/mediaplayer/controls.css @@ -18,13 +18,17 @@ border-radius: 8px; } +#MediaPlayer > div.body div.media-controls div.timestamp { + margin-right: 5px; +} + +#MediaPlayer > div.body div.media-controls button.pin-toggle, #MediaPlayer > div.body div.media-controls button.fullscreen-toggle { width: 30px; height: 30px; border-radius: 8px; /* background-color: transparent; */ font-size: 16px; - margin-left: 5px; } #MediaPlayer div.media-controls button.previous, From 082c781f5ea56a4a9e2a66a22c3ccb35311c9549 Mon Sep 17 00:00:00 2001 From: Izaak Kuipers Date: Sun, 1 Mar 2026 14:31:46 +0100 Subject: [PATCH 5/9] DevEnvironment bugfixes --- src/css/apps/user/processmanager.css | 7 +------ .../servicehost/services/DevEnvironment/index.ts | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/css/apps/user/processmanager.css b/src/css/apps/user/processmanager.css index fb231f089..dd31659b3 100755 --- a/src/css/apps/user/processmanager.css +++ b/src/css/apps/user/processmanager.css @@ -206,13 +206,8 @@ #processManager > div.body button.restart { background-color: var(--clr-orange-fg) !important; - font-weight: bold; -} - -#processManager > div.body button.stop *, -#processManager > div.body button.start *, -#processManager > div.body button.restart * { color: var(--win-bg); + font-weight: bold; } #processManager > div.body div.window-action-bar { diff --git a/src/ts/servicehost/services/DevEnvironment/index.ts b/src/ts/servicehost/services/DevEnvironment/index.ts index f8d518342..20a55d6cf 100644 --- a/src/ts/servicehost/services/DevEnvironment/index.ts +++ b/src/ts/servicehost/services/DevEnvironment/index.ts @@ -42,6 +42,19 @@ export class DevelopmentEnvironment extends BaseService implements IDevelopmentE async start() { this.initBroadcast?.("Starting development environment"); + + setTimeout(() => { + if (!this.connected && this.host.getService("DevEnvironment")?.pid) { + Daemon.notifications?.sendNotification({ + title: "Development Environment", + message: + "The Development Environment service wasn't connected within 5 seconds of its startup. The service will be stopped.", + timeout: 3000, + image: "DevEnvFsIcon", + }); + this.host.stopService("DevEnvironment"); + } + }, 5000); } //#endregion @@ -154,6 +167,7 @@ export class DevelopmentEnvironment extends BaseService implements IDevelopmentE this.client?.removeAllListeners(); this.connected = false; await Fs.umountDrive("devenv", true); + this.host.stopService("DevEnvironment"); return undefined; } From d0caea40f9c555d57c21a61b48d3c76a1c2e863b Mon Sep 17 00:00:00 2001 From: Izaak Kuipers Date: Sun, 1 Mar 2026 15:40:37 +0100 Subject: [PATCH 6/9] bugfixes --- .../multiupdategui/MultiUpdateGui.svelte | 4 +--- .../shell/Shell/StartMenu/RightPane.svelte | 21 +++++++++++++++++-- .../components/systemshortcuts/runtime.ts | 9 ++++++++ .../Migrations/Row.svelte | 1 - .../ProcessManager/Page/Processes.svelte | 4 ++++ .../ProcessManager/Page/Services.svelte | 6 +++++- src/css/apps/components/fsprogress/bar.css | 7 +++++-- src/css/apps/components/fsprogress/top.css | 1 + src/css/apps/components/multiupdategui.css | 11 ++++++++++ src/css/apps/components/sharelistgui.css | 1 + src/css/apps/user/processmanager.css | 3 +++ src/css/window/overlay.css | 2 +- src/ts/apps/renderer.ts | 2 +- src/ts/daemon/contexts/checks.ts | 2 ++ 14 files changed, 63 insertions(+), 11 deletions(-) diff --git a/src/apps/components/multiupdategui/MultiUpdateGui.svelte b/src/apps/components/multiupdategui/MultiUpdateGui.svelte index f527420d3..6847ca38e 100755 --- a/src/apps/components/multiupdategui/MultiUpdateGui.svelte +++ b/src/apps/components/multiupdategui/MultiUpdateGui.svelte @@ -22,9 +22,7 @@
diff --git a/src/apps/components/shell/Shell/StartMenu/RightPane.svelte b/src/apps/components/shell/Shell/StartMenu/RightPane.svelte index c108eec96..d139af366 100644 --- a/src/apps/components/shell/Shell/StartMenu/RightPane.svelte +++ b/src/apps/components/shell/Shell/StartMenu/RightPane.svelte @@ -1,7 +1,7 @@