An open-source, self-hosted system for apps built with web technologies.
Remove redundant Desktop containers
zohayrslileh1a660e208e61
diff --git a/source/client/view/structure/desktop/taskbar/launcher/programs-section.tsx b/source/client/view/structure/desktop/taskbar/launcher/programs-section.tsxindex 53b0de2..77802ed 100644--- a/source/client/view/structure/desktop/taskbar/launcher/programs-section.tsx+++ b/source/client/view/structure/desktop/taskbar/launcher/programs-section.tsx@@ -18,7 +18,7 @@ export default function ProgramsSection({ onChoose }: ProgramsSectionProps) {const programs = usePrograms()- return <div role="group" aria-label="Programs" className="grid gap-1">+ return <div data-start-menu-scroll role="group" aria-label="Programs" className="grid min-h-0 max-h-full gap-1 overflow-y-auto p-2 scrollbar-gutter-stable">{programs.lengthdiff --git a/source/client/view/structure/desktop/taskbar/launcher/start-menu.tsx b/source/client/view/structure/desktop/taskbar/launcher/start-menu.tsxindex f2f0993..ac623f0 100644--- a/source/client/view/structure/desktop/taskbar/launcher/start-menu.tsx+++ b/source/client/view/structure/desktop/taskbar/launcher/start-menu.tsx@@ -22,11 +22,7 @@ export default memo(function StartMenu() {>- {close => <div data-start-menu-scroll className="grid min-h-0 max-h-full overflow-y-auto p-2 scrollbar-gutter-stable">-- <ProgramsSection onChoose={close} />-- </div>}+ {close => <ProgramsSection onChoose={close} />}</Launcher>})diff --git a/source/client/view/structure/desktop/taskbar/system/system-dialogs.tsx b/source/client/view/structure/desktop/taskbar/system/system-dialogs.tsxindex 1875c9b..b53dc40 100644--- a/source/client/view/structure/desktop/taskbar/system/system-dialogs.tsx+++ b/source/client/view/structure/desktop/taskbar/system/system-dialogs.tsx@@ -95,23 +95,19 @@ function PermissionRequest({ dialog, description, decide }: PermissionRequestProconst decision = usePromise(decide)- return <div className="grid gap-5 p-4">+ return <div className="grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3 gap-y-5 p-4">- <div className="grid grid-cols-[auto_minmax(0,1fr)] items-start gap-3">+ <span aria-hidden="true" className="grid size-8 place-items-center rounded-full border border-sky-600/25 bg-sky-500/15 text-sm font-medium">?</span>- <span aria-hidden="true" className="grid size-8 place-items-center rounded-full border border-sky-600/25 bg-sky-500/15 text-sm font-medium">?</span>+ <div className="grid gap-1">- <div className="grid gap-1">+ <h3 className="text-base font-medium">{dialog.program.name} needs permission</h3>- <h3 className="text-base font-medium">{dialog.program.name} needs permission</h3>-- <p id={description} className="text-sm leading-6 opacity-60">{permissionDescription(dialog)}</p>-- </div>+ <p id={description} className="text-sm leading-6 opacity-60">{permissionDescription(dialog)}</p></div>- <div className="flex flex-wrap justify-end gap-2">+ <div className="col-span-full flex flex-wrap justify-end gap-2"><TaskbarButton small disabled={decision.isPending} onClick={() => decision.safeExecute(false)}>Deny</TaskbarButton>@@ -123,7 +119,7 @@ function PermissionRequest({ dialog, description, decide }: PermissionRequestPro</div>- {decision.exception && <Alert className="text-sm">{String(decision.exception.current)}</Alert>}+ {decision.exception && <Alert className="col-span-full text-sm">{String(decision.exception.current)}</Alert>}</div>}@@ -132,45 +128,37 @@ function CrashReport({ dialog, description, acknowledge }: CrashReportProps) {const acknowledgment = usePromise(acknowledge)- return <div className="grid gap-5 p-4">-- <div className="grid grid-cols-[auto_minmax(0,1fr)] items-start gap-3">-- <span aria-hidden="true" className="grid size-8 place-items-center rounded-full border border-rose-600/25 bg-rose-500/15 text-lg font-medium">!</span>+ return <div className="grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3 gap-y-5 p-4">- <div className="grid gap-1">+ <span aria-hidden="true" className="grid size-8 place-items-center rounded-full border border-rose-600/25 bg-rose-500/15 text-lg font-medium">!</span>- <h3 className="text-base font-medium">Server endpoint crashed</h3>+ <div className="grid gap-1">- <p id={description} className="text-sm leading-6 opacity-60">{crashDescription(dialog)}</p>+ <h3 className="text-base font-medium">Server endpoint crashed</h3>- </div>+ <p id={description} className="text-sm leading-6 opacity-60">{crashDescription(dialog)}</p></div>- <div className="grid justify-end">+ <TaskbarButton- <TaskbarButton+ small- small+ autoFocus- autoFocus+ disabled={acknowledgment.isPending}- disabled={acknowledgment.isPending}+ onClick={() => acknowledgment.safeExecute()}- onClick={() => acknowledgment.safeExecute()}+ className="col-span-full justify-self-end font-medium"- className="font-medium"+ >- >+ I understand- I understand-- </TaskbarButton>-- </div>+ </TaskbarButton>- {acknowledgment.exception && <Alert className="text-sm">{String(acknowledgment.exception.current)}</Alert>}+ {acknowledgment.exception && <Alert className="col-span-full text-sm">{String(acknowledgment.exception.current)}</Alert>}</div>}diff --git a/source/client/view/structure/desktop/taskbar/taskbar.tsx b/source/client/view/structure/desktop/taskbar/taskbar.tsxindex 4356811..cffddc7 100644--- a/source/client/view/structure/desktop/taskbar/taskbar.tsx+++ b/source/client/view/structure/desktop/taskbar/taskbar.tsx@@ -12,7 +12,7 @@ export default function Taskbar({ leading, trailing, dialogs, className, style,return <Surface- className={`relative isolate h-taskbar shadow-taskbar [anchor-name:--desktop-taskbar] ${className ?? ""}`}+ className={`relative isolate grid h-taskbar min-w-0 grid-cols-[auto_auto_minmax(0,1fr)_auto_auto] items-center gap-1.5 p-1.5 shadow-taskbar [anchor-name:--desktop-taskbar] ${className ?? ""}`}style={{ ...style, borderRadius: radius }}@@ -20,19 +20,15 @@ export default function Taskbar({ leading, trailing, dialogs, className, style,>- <div className="relative grid h-full min-w-0 grid-cols-[auto_auto_minmax(0,1fr)_auto_auto] items-center gap-1.5 p-1.5">+ {leading}- {leading}+ <TaskbarSeparator />- <TaskbarSeparator />+ {children}- {children}+ <TaskbarSeparator />- <TaskbarSeparator />-- {trailing}-- </div>+ {trailing}{dialogs}diff --git a/source/client/view/structure/desktop/windows/process-window.tsx b/source/client/view/structure/desktop/windows/process-window.tsxindex 0ba22b3..6fc3013 100644--- a/source/client/view/structure/desktop/windows/process-window.tsx+++ b/source/client/view/structure/desktop/windows/process-window.tsx@@ -86,6 +86,8 @@ export default memo(function ({ identity, record, client, title, icon, position,const frameLoading = programAccess === "available" && (loading.source !== frameSource || loading.phase !== "ready")+ const progress = !bare && (stopping || closing ? "Closing" : frameLoading ? "Loading" : null)+return <Windowtitle={title}@@ -171,25 +173,13 @@ export default memo(function ({ identity, record, client, title, icon, position,/>}- {/* Loading keeps the iframe completely transparent. The spinner is- ordinary Window UI, with no backdrop or Surface behind it. */}- {!bare && frameLoading && !stopping && !closing && <div className="pointer-events-none absolute inset-0 z-10 grid rounded-[inherit]">-- <Spinner className="m-auto size-6">-- <span className="sr-only">Loading</span>-- </Spinner>-- </div>}-- {/* Closing is not document loading. The iframe is already absent;- only termination progress remains, without painting a backdrop. */}- {!bare && (stopping || closing) && <div className="pointer-events-none absolute inset-0 z-10 grid rounded-[inherit]">+ {/* Loading and closing are mutually exclusive states of the same+ progress layer. Neither paints a backdrop or Surface. */}+ {progress && <div className="pointer-events-none absolute inset-0 z-10 grid rounded-[inherit]"><Spinner className="m-auto size-6">- <span className="sr-only">Closing</span>+ <span className="sr-only">{progress}</span></Spinner>diff --git a/source/client/view/structure/desktop/windows/window-header.tsx b/source/client/view/structure/desktop/windows/window-header.tsxindex 3cceb87..b6a7b66 100644--- a/source/client/view/structure/desktop/windows/window-header.tsx+++ b/source/client/view/structure/desktop/windows/window-header.tsx@@ -48,43 +48,39 @@ export default function WindowHeader({ title, icon, active, whole, reducedMotion}, [active, reducedMotion, renderedActive])- return <header+ return <divonPointerDown={onGrab}onDoubleClick={onMaximize}- className="relative grid h-10 shrink-0 touch-none cursor-grab grid-cols-[minmax(0,1fr)_auto] items-center gap-3 px-3.5 select-none active:cursor-grabbing"+ className="relative grid h-10 shrink-0 touch-none cursor-grab grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-3 px-3.5 select-none active:cursor-grabbing">- <div className="grid min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-3">+ <img- <img+ ref={iconElement}- ref={iconElement}+ src={icon}- src={icon}+ alt=""- alt=""+ draggable={false}- draggable={false}+ className="size-4 rounded-sm object-contain"- className="size-4 rounded-sm object-contain"+ style={{ opacity: renderedActive ? 1 : 0.6 }}- style={{ opacity: renderedActive ? 1 : 0.6 }}+ />- />-- {/* Focus is said on the chrome and nowhere else. Content stays- equally legible when another window owns the keyboard. */}- <span- ref={titleElement}- className="truncate text-window-title font-medium"- style={{ opacity: renderedActive ? 1 : 0.6 }}- >{title}</span>-- </div>+ {/* Focus is said on the chrome and nowhere else. Content stays+ equally legible when another window owns the keyboard. */}+ <span+ ref={titleElement}+ className="truncate text-window-title font-medium"+ style={{ opacity: renderedActive ? 1 : 0.6 }}+ >{title}</span><div className="grid shrink-0 grid-flow-col auto-cols-max gap-1" onPointerDown={event => event.stopPropagation()}>@@ -112,7 +108,7 @@ export default function WindowHeader({ title, icon, active, whole, reducedMotion</div>- </header>+ </div>}// A pointer control acts on the press: click waits for the release, and that