From fc0773f0bf770fa14879cd82525b073d9074ad5b Mon Sep 17 00:00:00 2001 From: Izaak Kuipers Date: Tue, 27 Oct 2026 22:48:31 +0100 Subject: [PATCH 01/31] Bugfixes for ArcOS Beta 7.0.11 --- src/apps/components/firstrun/runtime.ts | 12 ++++++++-- .../components/globalloadindicator/runtime.ts | 5 +++- src/css/apps/components/pswdresetwizard.css | 23 +++++++++++++++++-- .../contexts/IAppRegistrationUserContext.ts | 2 +- src/ts/daemon/contexts/appregistration.ts | 4 ++-- src/ts/daemon/contexts/helpers.ts | 17 ++++++-------- src/ts/daemon/contexts/version.ts | 1 - 7 files changed, 45 insertions(+), 19 deletions(-) diff --git a/src/apps/components/firstrun/runtime.ts b/src/apps/components/firstrun/runtime.ts index 2d86198c9..f4f7e9514 100755 --- a/src/apps/components/firstrun/runtime.ts +++ b/src/apps/components/firstrun/runtime.ts @@ -1,10 +1,12 @@ import type { IUserDaemon } from "$interfaces/IUserDaemon"; import type { IFirstRunRuntime } from "$interfaces/runtimes/IFirstRunRuntime"; import { AppProcess } from "$ts/apps/process"; -import { Daemon } from "$ts/env"; +import { Daemon, Fs, Kernel } from "$ts/env"; +import { textToBlob } from "$ts/util/convert"; import { BTN_OKAY_SUG, MessageBox } from "$ts/util/dialog"; import { Store } from "$ts/writable"; import type { App, AppProcessData } from "$types/apps/app"; +import dayjs from "dayjs"; import { ChooseProfilePictureApp } from "./ChooseProfilePicture/metadata"; import { FirstRunPages, FirstRunShortcuts } from "./store"; import type { FirstRunPage } from "./types"; @@ -42,8 +44,14 @@ export class FirstRunRuntime extends AppProcess implements IFirstRunRuntime { await Daemon?.shortcuts?.createShortcut(payload, path); } - await Daemon?.appreg?.updateStartMenuFolder(); + await Daemon?.appreg?.updateStartMenuFolder(false, this.parentPid); await Daemon?.version?.updateRegisteredVersion(); + await Fs.writeFile( + `U:/System/LICENSE`, + textToBlob( + `-------\n\nDumped from IWaveKernel.ARCOS_LICENSE by IFirstRunRuntime on ${dayjs("DD-MM-YYYY HH:mm:ss.SSS")}\n\n-------\n\n${Kernel.ARCOS_LICENSE}` + ) + ); await stop(); this.done.set(true); diff --git a/src/apps/components/globalloadindicator/runtime.ts b/src/apps/components/globalloadindicator/runtime.ts index 1c8a8c774..e4492ffb6 100755 --- a/src/apps/components/globalloadindicator/runtime.ts +++ b/src/apps/components/globalloadindicator/runtime.ts @@ -13,7 +13,10 @@ export class GlobalLoadIndicatorRuntime extends AppProcess implements IGlobalLoa constructor(pid: number, parentPid: number, app: AppProcessData, caption: string, progress?: GlobalLoadIndicatorProgress) { super(pid, parentPid, app); - if (caption) this.caption.set(caption); + if (caption) { + this.caption.set(caption); + this.windowTitle.set(caption); + } if (progress) this.progress.set(progress); this.setSource(__SOURCE__); diff --git a/src/css/apps/components/pswdresetwizard.css b/src/css/apps/components/pswdresetwizard.css index 453dbdddf..65fd895e1 100644 --- a/src/css/apps/components/pswdresetwizard.css +++ b/src/css/apps/components/pswdresetwizard.css @@ -30,10 +30,29 @@ p.help { opacity: 0.5; - font-style:italic; + font-style: italic; font-size: 12px; } + p.instruction { + margin-bottom: auto; + } + + div.page { + height: 0; + flex-grow: 1; + display: flex; + flex-direction: column; + } + + div.warning-message { + color: var(--clr-orange-fg); + display: flex; + align-items: center; + gap: 10px; + margin-bottom: 15px; + } + div.field-wrapper { height: 100px; margin-top: 30px; @@ -68,7 +87,7 @@ border: none; border-radius: 0; } - + &.verification-code input { text-align: center; font-size: 18px; diff --git a/src/interfaces/contexts/IAppRegistrationUserContext.ts b/src/interfaces/contexts/IAppRegistrationUserContext.ts index ad8531a11..a5c13ca51 100644 --- a/src/interfaces/contexts/IAppRegistrationUserContext.ts +++ b/src/interfaces/contexts/IAppRegistrationUserContext.ts @@ -15,7 +15,7 @@ export interface IAppRegistrationUserContext extends IUserContext { determineStartMenuShortcutPath(app: App): string | undefined; addToStartMenu(appId: string): Promise; removeFromStartMenu(appId: string): Promise; - updateStartMenuFolder(quiet?: boolean): Promise; + updateStartMenuFolder(quiet?: boolean, parentPid?: number): Promise; modeUserAppsToFs(): Promise; } // !endtpa diff --git a/src/ts/daemon/contexts/appregistration.ts b/src/ts/daemon/contexts/appregistration.ts index b4fc72689..b522638ca 100644 --- a/src/ts/daemon/contexts/appregistration.ts +++ b/src/ts/daemon/contexts/appregistration.ts @@ -185,14 +185,14 @@ export class AppRegistrationUserContext extends UserContext implements IAppRegis SysDispatch.dispatch("startmenu-refresh"); } - async updateStartMenuFolder(quiet = false) { + async updateStartMenuFolder(quiet = false, parentPid = +Env.get("shell_pid")) { const installedApps = Daemon?.appStorage()?.buffer(); if (!installedApps) return; const gli = quiet ? undefined - : await Daemon!.helpers!.GlobalLoadIndicator("Updating the start menu...", +Env.get("shell_pid"), { + : await Daemon!.helpers!.GlobalLoadIndicator("Updating the start menu...", parentPid, { max: Object.keys(AppGroups).length + installedApps.length, value: 0, useHtml: true, diff --git a/src/ts/daemon/contexts/helpers.ts b/src/ts/daemon/contexts/helpers.ts index 2f4685da7..02c91dd17 100644 --- a/src/ts/daemon/contexts/helpers.ts +++ b/src/ts/daemon/contexts/helpers.ts @@ -4,6 +4,7 @@ import type { IHelpersUserContext } from "$interfaces/contexts/IHelpersUserConte import type { IAppProcess } from "$interfaces/IAppProcess"; import type { ICommandResult } from "$interfaces/ICommandResult"; import type { IUserDaemon } from "$interfaces/IUserDaemon"; +import type { IGlobalLoadIndicatorRuntime } from "$interfaces/runtimes/IGlobalLoadIndicatorRuntime"; import SafeModeNotice from "$lib/Daemon/SafeModeNotice.svelte"; import { ArcOSVersion, Daemon, Env, Server, Stack, SysDispatch } from "$ts/env"; import { ArcBuild } from "$ts/metadata/build"; @@ -32,7 +33,7 @@ export class HelpersUserContext extends UserContext implements IHelpersUserConte const GlobalLoadIndicator = module.default as App; const data = { - data: { ...GlobalLoadIndicator, overlay: true }, + data: { ...Object.freeze(GlobalLoadIndicator), overlay: true }, id: "GlobalLoadIndicator", desktop: undefined, }; @@ -40,11 +41,11 @@ export class HelpersUserContext extends UserContext implements IHelpersUserConte if (!pid || Number.isNaN(pid)) { data.data.overlay = false; data.data.state.headless = false; - data.data.position = { x: 60, y: 60 }; + data.data.position = { centered: true }; } - const process = await Stack.spawn( - GlobalLoadIndicator.assets.runtime, // Not directly importing the runtime to prevent potential circularity (unlikely, but still) + const process = await Stack.spawn( + GlobalLoadIndicator.assets.runtime as any, // Not directly importing the runtime to prevent potential circularity (unlikely, but still) undefined, this.userInfo!._id, pid, @@ -181,10 +182,7 @@ export class HelpersUserContext extends UserContext implements IHelpersUserConte content: SafeModeNotice, image: "WarningIcon", sound: "arcos.dialog.warning", - buttons: [ - { caption: "Restart now", action: () => Daemon!.power?.restart() }, - BTN_OKAY_SUG, - ], + buttons: [{ caption: "Restart now", action: () => Daemon!.power?.restart() }, BTN_OKAY_SUG], }, +Env.get("shell_pid"), true @@ -221,8 +219,7 @@ The information provided in this report is subject for review by Izaak or anothe } async submitBetaFeedback(title: string, message: string): Promise { - if (!IsBeta()) - return CommandResult.Error("Function unavailable outside beta"); + if (!IsBeta()) return CommandResult.Error("Function unavailable outside beta"); const request: BetaFeedbackRequest = { version: ArcOSVersion, diff --git a/src/ts/daemon/contexts/version.ts b/src/ts/daemon/contexts/version.ts index e0e4d5876..b1ecf0a22 100644 --- a/src/ts/daemon/contexts/version.ts +++ b/src/ts/daemon/contexts/version.ts @@ -3,7 +3,6 @@ import type { IFilesystemDrive } from "$interfaces/IFilesystemDrive"; import type { IUserDaemon } from "$interfaces/IUserDaemon"; import SourceDriveEnable from "$lib/Daemon/SourceDriveEnable.svelte"; import { ArcOSVersion, Daemon, Env, Fs, Kernel } from "$ts/env"; -import { SecurityMediumIcon } from "$ts/images/general"; import { SourceFilesystemDrive } from "$ts/kernel/mods/fs/drives/src"; import { UserPaths } from "$ts/user/store"; import { arrayBufferToText, textToBlob } from "$ts/util/convert"; From bbed280d1d6f70339f34b92aaccbe53aa825cb7f Mon Sep 17 00:00:00 2001 From: Izaak Kuipers Date: Sat, 31 Oct 2026 18:04:07 +0100 Subject: [PATCH 02/31] Revert order-agnostic keyboard processing to address beta feedback --- src/apps/user/filemanager/runtime.ts | 4 +-- src/ts/apps/process.ts | 42 ++++++++++++++++------------ 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/src/apps/user/filemanager/runtime.ts b/src/apps/user/filemanager/runtime.ts index 8b93b7704..49b7c508c 100755 --- a/src/apps/user/filemanager/runtime.ts +++ b/src/apps/user/filemanager/runtime.ts @@ -6,8 +6,8 @@ import { Daemon, Fs, SysDispatch } from "$ts/env"; import { SharedDrive } from "$ts/kernel/mods/fs/drives/share"; import { AdminScopes } from "$ts/servicehost/services/AdminBootstrapper/store"; import { SystemFolders, UserPathCaptions, UserPaths } from "$ts/user/store"; -import { Plural, sortByKey } from "$ts/util"; -import { BTN_OKAY_SUG, ConditionalButton, GetConfirmation, MessageBox } from "$ts/util/dialog"; +import { sortByKey } from "$ts/util"; +import { BTN_OKAY_SUG, GetConfirmation, MessageBox } from "$ts/util/dialog"; import { DownloadFile, getDriveLetter, getItemNameFromPath, getParentDirectory, join } from "$ts/util/fs"; import { Store } from "$ts/writable"; import type { AppContextMenu, AppProcessData } from "$types/apps/app"; diff --git a/src/ts/apps/process.ts b/src/ts/apps/process.ts index 373f2fdda..ed938bef9 100755 --- a/src/ts/apps/process.ts +++ b/src/ts/apps/process.ts @@ -291,8 +291,13 @@ export class AppProcess extends Process implements IAppProcess { private async processKeyboardEvent(e: KeyboardEvent) { if (!e.key || this.hasOverlays() || this._disposed) return; - const textareas = [...(this.getWindow()?.querySelectorAll("textarea, [contenteditable]") ?? [])]; - const focusingTextArea = !!textareas.find((element) => document.activeElement === element); + let focusingTextArea = false; + + const textareas = this.getWindow()?.querySelectorAll("textarea, [contenteditable]"); + + for (const textarea of textareas || []) { + if (document.activeElement === textarea) focusingTextArea = true; + } if (!focusingTextArea && KEY_IGNORE_LIST.includes(e.key.toLowerCase()) && State?.currentState === "desktop") { e.preventDefault(); @@ -302,27 +307,28 @@ export class AppProcess extends Process implements IAppProcess { this.unfocusActiveElement(); - if (State?.currentState != "desktop" || this._disposed) return; + const state = State?.currentState; - const combo = this.acceleratorStore.find((combo) => { - const ctrlKey = combo.ctrl ? e.ctrlKey : true; - const shiftKey = combo.shift ? e.shiftKey : true; - const altKey = combo.alt ? e.altKey : true; - const modifiersConditionMet = altKey && ctrlKey && shiftKey; - const focusConditionMet = Stack.renderer?.focusedPid() === this.pid || combo.global; + if (state != "desktop" || this._disposed) return; - const comboKey = combo.key?.trim().toLowerCase(); - const pressedKey = String.fromCharCode(e.keyCode).toLowerCase().trim(); + for (const combo of this.acceleratorStore) { + const alt = combo.alt ? e.altKey : true; + const ctrl = combo.ctrl ? e.ctrlKey : true; + const shift = combo.shift ? e.shiftKey : true; + /** */ + const modifiers = alt && ctrl && shift; + /** */ + const pK = e.key.toLowerCase().trim(); + const key = combo.key?.trim().toLowerCase(); + const codedKey = String.fromCharCode(e.keyCode).toLowerCase(); + /** */ + const isFocused = Stack.renderer?.focusedPid() == this.pid || combo.global; - return modifiersConditionMet && comboKey === pressedKey && focusConditionMet; - }); + if (!modifiers || (key != pK && key && key != codedKey) || !isFocused) continue; - if (combo && !Daemon.elevation?._elevating) { - e.preventDefault(); - e.stopImmediatePropagation(); - e.stopPropagation(); + if (!Daemon?.elevation!._elevating) await combo.action(this, e); - await combo.action(this, e); + break; } } From 6b3032b0e80aaffeb601d4d8c7baee4b370a76ff Mon Sep 17 00:00:00 2001 From: Izaak Kuipers Date: Sun, 1 Nov 2026 01:34:29 +0100 Subject: [PATCH 03/31] Shared drive bugs --- src/ts/kernel/mods/fs/index.ts | 5 +++-- .../mods/server/connectors/ShareConnector.ts | 3 --- .../servicehost/services/DistribSvc/index.ts | 18 +++++++++++------ src/ts/terminal/commands/pkg.ts | 20 ++++++++++++++----- 4 files changed, 30 insertions(+), 16 deletions(-) diff --git a/src/ts/kernel/mods/fs/index.ts b/src/ts/kernel/mods/fs/index.ts index 50979831b..0650b4bf3 100644 --- a/src/ts/kernel/mods/fs/index.ts +++ b/src/ts/kernel/mods/fs/index.ts @@ -375,12 +375,13 @@ export class Filesystem extends KernelModule implements IFilesystem { } else { drive.isCapable("moveItem"); + const sourceParent = getParentDirectory(source); + const destinationParent = getParentDirectory(destination); + source = this.removeDriveLetter(source); destination = this.removeDriveLetter(destination); const result = await drive.moveItem(source, destination); - const sourceParent = getParentDirectory(source); - const destinationParent = getParentDirectory(destination); if (dispatch) { this.dispatch.dispatch("fs-flush-folder", destinationParent); diff --git a/src/ts/kernel/mods/server/connectors/ShareConnector.ts b/src/ts/kernel/mods/server/connectors/ShareConnector.ts index 54ff89af6..f45c26e50 100644 --- a/src/ts/kernel/mods/server/connectors/ShareConnector.ts +++ b/src/ts/kernel/mods/server/connectors/ShareConnector.ts @@ -81,9 +81,6 @@ export class ShareConnector extends ServerConnector implements IShareConnector { } async MvPost(shareId: string, source: string, destination: string): Promise { - const sourceFilename = getItemNameFromPath(source); - destination = destination.endsWith(sourceFilename) ? destination : join(destination, sourceFilename); - try { return CommandResult.FromResponse(await this.server.post(`/mv/${shareId}/${source}`, toForm({ destination }))); } catch (e) { diff --git a/src/ts/servicehost/services/DistribSvc/index.ts b/src/ts/servicehost/services/DistribSvc/index.ts index 32901af32..a08bf0d80 100644 --- a/src/ts/servicehost/services/DistribSvc/index.ts +++ b/src/ts/servicehost/services/DistribSvc/index.ts @@ -55,7 +55,8 @@ export class DistributionServiceProcess extends BaseService implements IDistribu //#endregion //#region BUSY - checkBusy(action?: string) { + checkBusy(action?: string, allowList: string[] = []) { + if (this.BUSY && allowList.includes(this.BUSY)) return ""; if (this.BUSY) { this.Log(`Refusing to perform '${action || "action"}': DistribSvc is busy with ${this._BUSY}`); } @@ -105,7 +106,7 @@ export class DistributionServiceProcess extends BaseService implements IDistribu async removeStoreItemFromInstalledByAppId(id: string) { this.Log(`removeStoreItemFromInstalledByAppId`); - if (this.checkBusy("removeStoreItemFromInstalledByAppId")) return undefined; + if (this.checkBusy("removeStoreItemFromInstalledByAppId", ["uninstallApp"])) return undefined; return await this.writeInstalledStoreItemList((await this.loadInstalledStoreItemList()).filter((s) => s.pkg.appId !== id)); } @@ -137,7 +138,7 @@ export class DistributionServiceProcess extends BaseService implements IDistribu async writeInstalledStoreItemList(list: StoreItem[]) { this.Log(`writeInstalledStoreItemList: ${list.length} items`); - if (this.checkBusy("writeInstalledStoreItemList")) return false; + if (this.checkBusy("writeInstalledStoreItemList", ["uninstallApp"])) return false; this.installedStoreItemCache = list; @@ -184,7 +185,7 @@ export class DistributionServiceProcess extends BaseService implements IDistribu async removePackageFromInstalled(id: string) { this.Log(`removePackageFromInstalled`); - if (this.checkBusy("removePackageFromInstalled")) return undefined; + if (this.checkBusy("removePackageFromInstalled", ["uninstallApp"])) return undefined; return await this.writeInstalledPackageList((await this.loadInstalledPackageList()).filter((s) => s.appId !== id)); } @@ -216,7 +217,7 @@ export class DistributionServiceProcess extends BaseService implements IDistribu async writeInstalledPackageList(list: ArcPackage[]) { this.Log(`writeInstalledPackageList: ${list.length} items`); - if (this.checkBusy("writeInstalledPackageList")) return false; + if (this.checkBusy("writeInstalledPackageList", ["uninstallApp"])) return false; this.installedPackagesCache = list; @@ -317,7 +318,12 @@ export class DistributionServiceProcess extends BaseService implements IDistribu } } - async packageInstaller(zip: JSZip, metadata: ArcPackage, item?: StoreItem, isUpdate = false): Promise { + async packageInstaller( + zip: JSZip, + metadata: ArcPackage, + item?: StoreItem, + isUpdate = false + ): Promise { this.Log(`packageInstaller: ${metadata.appId}, ${item?._id || "no store item"}`); if (this.checkBusy("packageInstaller")) return undefined; diff --git a/src/ts/terminal/commands/pkg.ts b/src/ts/terminal/commands/pkg.ts index 784968fa9..8e5bdad75 100755 --- a/src/ts/terminal/commands/pkg.ts +++ b/src/ts/terminal/commands/pkg.ts @@ -7,7 +7,7 @@ import { formatBytes, join } from "$ts/util/fs"; import { ElevationLevel } from "$types/system/elevation"; import type { Arguments } from "$types/terminal"; import dayjs from "dayjs"; -import { BRBLUE, BRGREEN, BRPURPLE, CLRROW, CURUP, RESET } from "../colors"; +import { BLUE, BOLD, BRBLUE, BRGREEN, BRPURPLE, CLRROW, CURUP, RESET, UNDERLINE, WHITE } from "../colors"; import { TerminalProcess } from "../process"; const typeCaptions: Record = { @@ -453,12 +453,22 @@ export class PkgCommand extends TerminalProcess { async listAll(): Promise { const all = await this.distrib!.getAllStoreItems(); const installed = await this.distrib!.loadInstalledStoreItemList(); + const notInstalled = all.filter((a) => !installed.find((b) => a._id === b._id)); - this.rl!.println(""); + if (installed.length) { + this.rl!.println(`\n${BOLD}${UNDERLINE}Installed${RESET}:\n`); + + for (const pkg of installed) { + this.rl!.println(` ${BRBLUE}${pkg.name}${RESET}`); + } + } + + if (notInstalled.length) { + this.rl!.println(`\n${BOLD}${UNDERLINE}Available${RESET}:\n`); - for (const item of all) { - const color = installed.filter((i) => item._id === i._id)[0] ? BRBLUE : RESET; - this.rl!.println(`- ${color}${item.name}${RESET}`); + for (const pkg of notInstalled) { + this.rl!.println(` ${pkg.name}`); + } } return 0; From a027e17c56038c96ed034e59cddf7a408af1c01c Mon Sep 17 00:00:00 2001 From: Izaak Kuipers Date: Wed, 4 Nov 2026 00:45:18 +0100 Subject: [PATCH 04/31] Context menu bugfixes before bed --- .../admin/adminportal/AdminPortal/Page/Versioning.svelte | 2 +- .../shell/Shell/Taskbar/SystemTray/TrayIcon.svelte | 6 ++---- src/apps/components/shell/context.ts | 9 +++++++++ src/ts/helpers/processes.ts | 2 +- src/ts/ui/context/actions.svelte.ts | 4 ++-- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/apps/admin/adminportal/AdminPortal/Page/Versioning.svelte b/src/apps/admin/adminportal/AdminPortal/Page/Versioning.svelte index 7fe98009d..bc6a54ace 100644 --- a/src/apps/admin/adminportal/AdminPortal/Page/Versioning.svelte +++ b/src/apps/admin/adminportal/AdminPortal/Page/Versioning.svelte @@ -59,7 +59,7 @@ {#each Object.entries(versions) as [userId, version] (userId)} {@const user = data.users.find((u) => u._id === userId)} - {#if user} + {#if user?.profile}
0} />
diff --git a/src/apps/components/shell/Shell/Taskbar/SystemTray/TrayIcon.svelte b/src/apps/components/shell/Shell/Taskbar/SystemTray/TrayIcon.svelte index b0b8fb640..78aa119be 100755 --- a/src/apps/components/shell/Shell/Taskbar/SystemTray/TrayIcon.svelte +++ b/src/apps/components/shell/Shell/Taskbar/SystemTray/TrayIcon.svelte @@ -1,10 +1,8 @@ {#if targetedProcess} -
+
diff --git a/src/apps/components/shell/context.ts b/src/apps/components/shell/context.ts index f0c7a8ec1..48cb9413e 100755 --- a/src/apps/components/shell/context.ts +++ b/src/apps/components/shell/context.ts @@ -197,6 +197,15 @@ export function ShellContextMenu(runtime: IShellRuntime): AppContextMenu { runtime.spawnOverlayApp("AppInfo", runtime.pid, proc.app.id); }, }, + { + caption:"Process info", + icon: "book", + action: (proc: IAppProcess) => { + if (!proc) return; + + runtime.spawnOverlayApp("ProcessInfoApp", runtime.pid, proc); + } + }, { caption: "Close window", image: "ShutdownIcon", diff --git a/src/ts/helpers/processes.ts b/src/ts/helpers/processes.ts index 80259a5ea..9e740f1f3 100644 --- a/src/ts/helpers/processes.ts +++ b/src/ts/helpers/processes.ts @@ -16,4 +16,4 @@ export class ProcessesHelper extends BaseHelper { static IsAnyThirdPartyProcess(proc: IProcess) { return proc instanceof ThirdPartyProcess || proc instanceof ThirdPartyAppProcess; } -} +} \ No newline at end of file diff --git a/src/ts/ui/context/actions.svelte.ts b/src/ts/ui/context/actions.svelte.ts index 9b41125c0..bcaf41019 100644 --- a/src/ts/ui/context/actions.svelte.ts +++ b/src/ts/ui/context/actions.svelte.ts @@ -6,10 +6,10 @@ import type { ContextMenuItem } from "$types/apps/app"; export function contextProps(node: HTMLElement, args: any[]) { const contextMenuPid = Env?.get("contextmenu_pid"); - if (!contextMenuPid) return; + if (!contextMenuPid) throw new Error("contextProps invoked before ContextMenuRuntime construction"); const contextmenu = Stack?.getProcess(+contextMenuPid); - if (!contextmenu) return; + if (!contextmenu) throw new Error("contextProps invoked before ContextMenuRuntime construction"); const uuid = UUID(); From 1f00ddbc962696b7c0d246d155ee0daf65f3f02c Mon Sep 17 00:00:00 2001 From: Izaak Kuipers Date: Wed, 4 Nov 2026 15:13:47 +0100 Subject: [PATCH 05/31] SqlInterfaceProcess works again --- package.json | 2 +- src/ts/sql/index.ts | 2 +- yarn.lock | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 2b7dd73d6..19b135596 100755 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "music-metadata": "^11.10.3", "openmeteo": "^1.1.4", "socket.io-client": "^4.8.1", - "sql.js": "^1.13.0", + "sql.js": "^1.15.2", "stacktrace-parser": "^0.1.11", "string-width": "^7.2.0", "svelte-image-viewer": "^7.1.0", diff --git a/src/ts/sql/index.ts b/src/ts/sql/index.ts index a9794c6a1..2c1a9cf84 100755 --- a/src/ts/sql/index.ts +++ b/src/ts/sql/index.ts @@ -23,7 +23,7 @@ export class SqlInterfaceProcess extends Process implements ISqlInterfaceProcess async start() { this.sql = await initSqlJs({ - locateFile: (file) => `https://sql.js.org/dist/${file}`, + locateFile: (file) => `https://sql.js.org/dist/sql-wasm.wasm`, }); await this.initialize(); } diff --git a/yarn.lock b/yarn.lock index c88e229f3..2cb6e54ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3285,10 +3285,10 @@ source-map@~0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -sql.js@^1.13.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/sql.js/-/sql.js-1.13.0.tgz#f73cba7eaba0bc881f466c9149e00cf598fb01e0" - integrity sha512-RJbVP1HRDlUUXahJ7VMTcu9Rm1Nzw+EBpoPr94vnbD4LwR715F3CcxE2G2k45PewcaZ57pjetYa+LoSJLAASgA== +sql.js@^1.15.2: + version "1.15.2" + resolved "https://registry.yarnpkg.com/sql.js/-/sql.js-1.15.2.tgz#ee1f9fc47c9886b71aefc3338d3774e11faedc97" + integrity sha512-ZmMYFsZPZWDKIJUh3A5rdnpRV3hB/r7AijwAzSzLnfv/9CSx4obUmDtA8brAjWJWjGtUVh43nIEJ+6nl6HuOUg== stacktrace-parser@^0.1.11: version "0.1.11" From 50f427d7fb777a2e0aca966213f6dba746345628 Mon Sep 17 00:00:00 2001 From: Izaak Kuipers Date: Wed, 4 Nov 2026 21:28:58 +0100 Subject: [PATCH 06/31] Remove fake tables from the admin portal --- .../AdminPortal/Page/Activities.svelte | 74 +++++----- .../AdminPortal/Page/BetaFeedback.svelte | 59 ++++---- .../AdminPortal/Page/BugHunt.svelte | 42 ++++-- .../AdminPortal/Page/BugHunt/Row.svelte | 19 +-- .../AdminPortal/Page/Filesystems.svelte | 52 ++++--- .../Page/Filesystems/FilesystemRow.svelte | 38 ++--- .../AdminPortal/Page/Scopes.svelte | 35 +++-- .../AdminPortal/Page/Scopes/ScopeRow.svelte | 43 +++--- .../AdminPortal/Page/Shares.svelte | 72 +++++---- .../adminportal/AdminPortal/Page/Store.svelte | 71 +++++---- .../AdminPortal/Page/Store/StoreRow.svelte | 51 ++++--- .../AdminPortal/Page/Tokens.svelte | 50 ++++--- .../AdminPortal/Page/Tokens/TokenRow.svelte | 40 +++-- .../adminportal/AdminPortal/Page/Users.svelte | 48 +++--- .../AdminPortal/Page/Users/UserRow.svelte | 21 +-- .../AdminPortal/Page/Versioning.svelte | 66 ++++++--- .../Page/ViewShare/Accessors.svelte | 50 ++++--- .../AdminPortal/Page/ViewShare/Members.svelte | 47 ++++-- .../Page/ViewShare/Members/MemberRow.svelte | 25 ++-- .../ViewStoreItem/Details/InstalledBy.svelte | 45 ++++-- .../AdminPortal/Page/ViewUser/Reports.svelte | 51 ++++--- .../AdminPortal/Page/ViewUser/Shares.svelte | 50 +++++-- .../Page/ViewUser/Shares/ShareRow.svelte | 16 +- .../AdminPortal/UsernameDisplay.svelte | 19 +++ src/css/apps/admin/adminportal.css | 66 +-------- .../admin/adminportal/page/activities.css | 74 +--------- .../admin/adminportal/page/betafeedback.css | 33 ----- .../apps/admin/adminportal/page/bughunt.css | 79 +--------- .../admin/adminportal/page/filesystems.css | 72 +-------- .../apps/admin/adminportal/page/scopes.css | 57 +------- .../apps/admin/adminportal/page/shares.css | 34 ----- src/css/apps/admin/adminportal/page/store.css | 137 ++---------------- .../apps/admin/adminportal/page/tokens.css | 92 +----------- src/css/apps/admin/adminportal/page/users.css | 50 ------- .../admin/adminportal/page/versioning.css | 15 -- .../apps/admin/adminportal/page/viewshare.css | 103 ++----------- .../admin/adminportal/page/viewstoreitem.css | 12 +- .../apps/admin/adminportal/page/viewuser.css | 129 ++--------------- src/css/apps/admin/adminportal/statusbar.css | 57 ++++++++ src/css/apps/admin/adminportal/tables.css | 88 +++++++++++ src/interfaces/services/IAdminBootstrapper.ts | 2 + .../services/AdminBootstrapper/index.ts | 2 +- src/ts/util/index.ts | 4 +- 43 files changed, 870 insertions(+), 1320 deletions(-) create mode 100644 src/apps/admin/adminportal/AdminPortal/UsernameDisplay.svelte create mode 100644 src/css/apps/admin/adminportal/statusbar.css create mode 100644 src/css/apps/admin/adminportal/tables.css diff --git a/src/apps/admin/adminportal/AdminPortal/Page/Activities.svelte b/src/apps/admin/adminportal/AdminPortal/Page/Activities.svelte index fed648477..78daa91b1 100755 --- a/src/apps/admin/adminportal/AdminPortal/Page/Activities.svelte +++ b/src/apps/admin/adminportal/AdminPortal/Page/Activities.svelte @@ -7,6 +7,7 @@ import dayjs from "dayjs"; import type { ActivitiesData } from "../../types"; import Pagination from "../Pagination.svelte"; + import UsernameDisplay from "../UsernameDisplay.svelte"; const { process, data }: { process: IAdminPortalRuntime; data: ActivitiesData } = $props(); const { redacted } = process; @@ -27,38 +28,43 @@

ACTIVITIES ({activities.length})

-
-
-
- -
-
Username
-
Action
-
User agent
-
Frontend
-
Timestamp
-
- {#if chunks[currentChunk]} - {#each chunks[currentChunk] as activity (activity._id)} -
-
- -
-
- {#if activity.user} - - - {:else} - Stranger - {/if} -
-
{ActivityCaptionTranslations[activity.action]}
-
{activity.userAgent}
-
{activity.location?.hostname || "Unknown"}
-
{dayjs(activity.createdAt).format("D MMM YYYY, HH:mm")}
-
- {/each} - {/if} +
+ + + + + + + + + + + + + + + + + + + + + {#if chunks[currentChunk]} + {#each chunks[currentChunk] as activity (activity._id)} + + + + + + + + + {/each} + {/if} + +
+ + UsernameActionUser agentFrontendTimestamp
+ + {ActivityCaptionTranslations[activity.action]}{activity.userAgent}{activity.location?.hostname || "Unknown"}{dayjs(activity.createdAt).format("D MMM YYYY, HH:mm")}
diff --git a/src/apps/admin/adminportal/AdminPortal/Page/BetaFeedback.svelte b/src/apps/admin/adminportal/AdminPortal/Page/BetaFeedback.svelte index cde705570..8a1a43962 100644 --- a/src/apps/admin/adminportal/AdminPortal/Page/BetaFeedback.svelte +++ b/src/apps/admin/adminportal/AdminPortal/Page/BetaFeedback.svelte @@ -46,35 +46,44 @@ {/each}
-
+
{#if loading} {:else if selectedItem} {:else} -
-
-
Username
-
Title
-
Server
-
Date
-
Read?
-
- {#each items as item (item.id)} - - -
(selectedItem = item)}> -
{item.username}
-
{item.title}
-
{item.serverName}
-
{dayjs(item.created).format("DD-MM-YYYY, HH:mm:ss")}
-
- {#if item.read} - - {/if} -
-
- {/each} -
+ + + + + + + + + + + + + + + + + + + {#each items as item (item.id)} + (selectedItem = item)}> + + + + + + + {/each} + +
UsernameTitleServerDateRead?
{item.username}{item.title}{item.serverName}{dayjs(item.created).format("DD-MM-YYYY, HH:mm:ss")} + {#if item.read} + + {/if} +
{/if}
diff --git a/src/apps/admin/adminportal/AdminPortal/Page/BugHunt.svelte b/src/apps/admin/adminportal/AdminPortal/Page/BugHunt.svelte index d10817d7e..bdcb5cda7 100755 --- a/src/apps/admin/adminportal/AdminPortal/Page/BugHunt.svelte +++ b/src/apps/admin/adminportal/AdminPortal/Page/BugHunt.svelte @@ -135,19 +135,35 @@ {/each}
-
-
-
-
Timestamp
-
Title
-
Author
-
- {#each sortByKey($store, "createdAt", true) as report (report._id)} - - {/each} - {#if !$store.length} -

Logan ate them all.

- {/if} +
+ + + + + + + + + + + + + + + + + {#each sortByKey($store, "createdAt", true) as report (report._id)} + + {/each} + {#if !$store.length} + + + + {/if} + +
TimestampTitleAuthor
+

Logan ate them all.

+
diff --git a/src/apps/admin/adminportal/AdminPortal/Page/BugHunt/Row.svelte b/src/apps/admin/adminportal/AdminPortal/Page/BugHunt/Row.svelte index 66eccd0c7..3ac3c4604 100755 --- a/src/apps/admin/adminportal/AdminPortal/Page/BugHunt/Row.svelte +++ b/src/apps/admin/adminportal/AdminPortal/Page/BugHunt/Row.svelte @@ -40,26 +40,23 @@ } - - -
($quickView = report._id!)} class:selected={$idEntry === report._id} class:selected-multi={$selectionList.includes(report._id!) && $selectionList.length > 1} ondblclick={() => process.switchPage("viewBugReport", { id: report._id })} > -
+ {#if report.isAppReport} {:else} {/if} -
-
{timestamp}
-
{report.title}
-
+ + {timestamp} + {report.title} + {report.userData?.username || "Stranger"} -
-
+ + diff --git a/src/apps/admin/adminportal/AdminPortal/Page/Filesystems.svelte b/src/apps/admin/adminportal/AdminPortal/Page/Filesystems.svelte index 2f8fee908..04d89eb34 100755 --- a/src/apps/admin/adminportal/AdminPortal/Page/Filesystems.svelte +++ b/src/apps/admin/adminportal/AdminPortal/Page/Filesystems.svelte @@ -15,6 +15,9 @@ const quotas = Store([]); let loading = $state(true); + let used = $state(0); + let available = $state(0); + let total = $state(0); onMount(async () => { await Promise.all( @@ -31,29 +34,40 @@ ) ); + used = $quotas.reduce((a, b) => a + b.used, 0); + available = $quotas.reduce((a, b) => a + b.free, 0); + total = $quotas.reduce((a, b) => a + b.max, 0); + loading = false; }); -
-
- -
- -
-
Username
-
Used ({formatBytes($quotas.map((v) => v.used).reduce((partialSum, a) => partialSum + a, 0))})
-
- Free ({formatBytes($quotas.map((v) => v.free).reduce((partialSum, a) => partialSum + a, 0))}) -
-
Total ({formatBytes($quotas.map((v) => v.max).reduce((partialSum, a) => partialSum + a, 0))})
-
Quot
-
Index
-
Mount
-
- {#each sortByKey($quotas, "used", true) as quota (quota.user._id)} - - {/each} +
+ + + + + + + + + + + + + + + + + + + + + {#each sortByKey($quotas, "used", true) as quota (quota.user._id)} + + {/each} + +
UsernameUsed ({formatBytes(used)})Free ({formatBytes(available)})Total ({formatBytes(total)})QuotaActions
diff --git a/src/apps/admin/adminportal/AdminPortal/Page/Filesystems/FilesystemRow.svelte b/src/apps/admin/adminportal/AdminPortal/Page/Filesystems/FilesystemRow.svelte index b3199ccac..315612741 100755 --- a/src/apps/admin/adminportal/AdminPortal/Page/Filesystems/FilesystemRow.svelte +++ b/src/apps/admin/adminportal/AdminPortal/Page/Filesystems/FilesystemRow.svelte @@ -7,6 +7,7 @@ import Spinner from "$lib/Spinner.svelte"; import { Daemon, Env, Fs } from "$ts/env"; import { formatBytes } from "$ts/util/fs"; + import UsernameDisplay from "../../UsernameDisplay.svelte"; const { admin, @@ -48,37 +49,24 @@ } -
-
- -
-
- -
-
- {quota ? formatBytes(quota.used) : "-"} -
-
- {quota ? formatBytes(quota.free) : "-"} -
-
- {quota ? formatBytes(quota.max) : "-"} -
-
+ + + + + {quota ? formatBytes(quota.used) : "-"} + {quota ? formatBytes(quota.free) : "-"} + {quota ? formatBytes(quota.max) : "-"} + {#if quota} {:else} - {/if} -
-
+ + -
-
-
-
+ + diff --git a/src/apps/admin/adminportal/AdminPortal/Page/Scopes.svelte b/src/apps/admin/adminportal/AdminPortal/Page/Scopes.svelte index 5ac7c5161..00f65017a 100755 --- a/src/apps/admin/adminportal/AdminPortal/Page/Scopes.svelte +++ b/src/apps/admin/adminportal/AdminPortal/Page/Scopes.svelte @@ -9,17 +9,26 @@ const { admins } = data; -
-
-
- -
-
Username
-
Pages
-
Count
-
God?
-
- {#each admins as admin (admin._id)} - - {/each} +
+ + + + + + + + + + + + + + + + + {#each admins as admin (admin._id)} + + {/each} + +
Username PagesCountGod?
diff --git a/src/apps/admin/adminportal/AdminPortal/Page/Scopes/ScopeRow.svelte b/src/apps/admin/adminportal/AdminPortal/Page/Scopes/ScopeRow.svelte index 9d51db3f8..62b32aa54 100755 --- a/src/apps/admin/adminportal/AdminPortal/Page/Scopes/ScopeRow.svelte +++ b/src/apps/admin/adminportal/AdminPortal/Page/Scopes/ScopeRow.svelte @@ -2,10 +2,10 @@ import { AdminPortalPageStore } from "$apps/admin/adminportal/store"; import type { AdminPortalPage } from "$apps/admin/adminportal/types"; import type { IAdminPortalRuntime } from "$interfaces/runtimes/IAdminPortalRuntime"; - import ProfilePicture from "$lib/ProfilePicture.svelte"; import { AdminScopes } from "$ts/servicehost/services/AdminBootstrapper/store"; import type { ExpandedUserInfo } from "$types/user"; import { onMount } from "svelte"; + import UsernameDisplay from "../../UsernameDisplay.svelte"; const { process, admin }: { process: IAdminPortalRuntime; admin: ExpandedUserInfo } = $props(); let pages = $state([]); @@ -15,23 +15,24 @@ }); - - -
process.switchPage("viewScopes", { admin })}> -
- -
-
{admin.username}
-
- {#each pages as page} - {#if !page.hidden} -
- - {page.name} -
- {/if} - {/each} -
-
{admin.adminScopes.length}
-
{admin.adminScopes.includes(AdminScopes.adminGod) ? "Yes" : "No"}
-
+ process.switchPage("viewScopes", { admin })}> + + + + +
+ {#each pages as page} + {#if !page.hidden} +
+ + {page.name} +
+ {/if} + {/each} +
+ + {admin.adminScopes.length} + + {process.admin.canAccessP(admin, AdminScopes.adminGod) ? "Yes" : "No"} + + diff --git a/src/apps/admin/adminportal/AdminPortal/Page/Shares.svelte b/src/apps/admin/adminportal/AdminPortal/Page/Shares.svelte index b17564a56..23c3bf1a8 100755 --- a/src/apps/admin/adminportal/AdminPortal/Page/Shares.svelte +++ b/src/apps/admin/adminportal/AdminPortal/Page/Shares.svelte @@ -61,37 +61,49 @@ {/each}
-