Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.
TypeScript browser-shellcontrol-planefile-managerhomelabmobile-firstnextjsptyreactself-hostedserver-managementshadcn-uisysadmintailwindcssterminaltypescriptvpsweb-desktopweb-terminal
fix(ux): Spotlight contrast, cold-load splash, and safe P2 polish
Abdurrahman Fakhrul7de162a38828
diff --git a/app/globals.css b/app/globals.cssindex 75c8ecb2..f3860b8e 100644--- a/app/globals.css+++ b/app/globals.css@@ -239,6 +239,19 @@ body {backdrop-filter: blur(var(--blur)) saturate(180%);}+/* Spotlight panel (UX-03): blur PLUS an opaque-enough fill so light-theme text+ clears the wallpaper. Scoped — do not change global .glass (bars/menus). */+.spotlight-panel {+ background: var(--glass-panel);+ -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);+ backdrop-filter: blur(var(--blur)) saturate(180%);+}+[data-theme="light"] .spotlight-panel {+ /* Stronger mix toward solid surface so muted body text approaches ~4.5:1+ over aurora wallpaper (glass-panel alone still washes at 0.78 alpha). */+ background: color-mix(in srgb, var(--surface) 55%, var(--glass-panel) 45%);+}+/* Wallpapers — per-shell native backdrops. Each key paints its delivered MSOwebp (public/wallpapers/<key>.webp) over a gradient fallback (shown while theimage loads or if it 404s). "auto" resolves to the active shell's pick viadiff --git a/app/install-prompt.tsx b/app/install-prompt.tsxindex e0b635d2..947b820d 100644--- a/app/install-prompt.tsx+++ b/app/install-prompt.tsx@@ -40,7 +40,7 @@ export function InstallPrompt() {};return (- <div className="pointer-events-none fixed inset-x-0 bottom-4 z-[var(--z-spotlight)] flex justify-center px-4 [padding-bottom:var(--sai-bottom)]">+ <div className="pointer-events-none fixed inset-x-0 z-[var(--z-spotlight)] flex justify-center px-4" style={{ bottom: "calc(5.5rem + var(--sai-bottom, 0px))" }}><div className="glass pointer-events-auto flex items-center gap-2 rounded-2xl border border-border bg-card/90 px-3 py-2 shadow-[var(--shadow-win)]"><Download className="size-4 shrink-0 text-primary" /><span className="text-sm">Install Manef Shell OS as an app</span>diff --git a/app/layout.tsx b/app/layout.tsxindex 6559d087..816ff845 100644--- a/app/layout.tsx+++ b/app/layout.tsx@@ -88,9 +88,41 @@ export default async function RootLayout({suppressHydrationWarningdangerouslySetInnerHTML={{__html:- 'try{var t=JSON.parse(localStorage.getItem("mso:tweaks"));if(t&&t.theme)document.documentElement.dataset.theme=t.theme;}catch(e){}',+ 'try{var t=JSON.parse(localStorage.getItem("mso:tweaks"));if(t&&t.theme)document.documentElement.dataset.theme=t.theme;var s=document.getElementById("mso-boot-splash");if(s&&t&&t.theme==="dark")s.style.background="linear-gradient(145deg,#161629 0%,#10152c 58%,#0b1223 100%)";}catch(e){}',}}/>+ {/* Pre-paint boot splash (UX-02): wallpaper gradient + spinner so cold+ load is not blank grey while JS/CSS hydrate. Removed by OsRoot. */}+ <div+ id="mso-boot-splash"+ aria-hidden="true"+ style={{+ position: "fixed",+ inset: 0,+ zIndex: 2147483000,+ display: "grid",+ placeItems: "center",+ background:+ "linear-gradient(145deg, #d3c5bd 0%, #d9dce7 56%, #b7c8dc 100%)",+ pointerEvents: "none",+ }}+ >+ <div+ style={{+ width: 24,+ height: 24,+ border: "2px solid rgba(255,255,255,0.9)",+ borderTopColor: "transparent",+ borderRadius: "50%",+ animation: "mso-boot-spin 0.8s linear infinite",+ }}+ />+ <style+ dangerouslySetInnerHTML={{+ __html: "@keyframes mso-boot-spin{to{transform:rotate(360deg)}}",+ }}+ />+ </div>{children}<RegisterSW /><InstallPrompt />diff --git a/app/os-root.tsx b/app/os-root.tsxindex 384f6d6d..0ff3ebce 100644--- a/app/os-root.tsx+++ b/app/os-root.tsx@@ -1,6 +1,6 @@"use client";-import { useMemo } from "react";+import { useEffect, useMemo } from "react";import { AppShell, type ShellManifest } from "@/features/appshell";import {A11yCommands,@@ -54,6 +54,10 @@ function ConnectedShell() {return <ShellAppsProvider active={status === "in" && role === "owner"}><Shell /></ShellAppsProvider>;}+function dismissBootSplash() {+ document.getElementById("mso-boot-splash")?.remove();+}+export function OsRoot({initialStatus,initialRole,@@ -61,6 +65,10 @@ export function OsRoot({initialStatus?: SessionStatus;initialRole?: DeviceRole | null;}) {+ // Drop the pre-paint boot splash once the client shell tree mounts (UX-02).+ useEffect(() => {+ dismissBootSplash();+ }, []);return (<AppearanceProvider><QuicklinksProvider>diff --git a/frontend/slices/appshell/features/search/components/spotlight.tsx b/frontend/slices/appshell/features/search/components/spotlight.tsxindex a54cb1e8..c801dadf 100644--- a/frontend/slices/appshell/features/search/components/spotlight.tsx+++ b/frontend/slices/appshell/features/search/components/spotlight.tsx@@ -32,6 +32,8 @@ function SpotlightPanel() {// Read MRU once per open (panel mounts on open), so recents refresh each time.const [recents] = useState(loadRecents);const inputRef = useRef<HTMLInputElement>(null);+ // Ignore backdrop dismiss for the opening gesture (hot-corner / first click race).+ const dismissReady = useRef(false);const LISTBOX_ID = "spotlight-listbox";const ios = useActiveShell().id === "ios"; // iOS = top-anchored full-width search over the wallpaper@@ -40,7 +42,12 @@ function SpotlightPanel() {// stay visible during the debounce, matching the old behaviour).const [found, setFound] = useState<{ key: string; hits: SearchHit[]; error?: string } | null>(null);const folderHits = useMemo(() => (q.trim() ? (found?.hits ?? []) : []), [q, found]);- const searchError = q.trim() && found?.key === q.trim() ? found.error : undefined;+ const trimmed = q.trim();+ const searchError = trimmed && found?.key === trimmed ? found.error : undefined;+ // Pending while a non-empty query has not yet settled on matching folder hits+ // (debounce + in-flight). Commands may already match; empty-command + pending+ // must not flash "No matches" (UX-05).+ const folderPending = Boolean(trimmed && found?.key !== trimmed);useEffect(() => {const query = q.trim();if (!query) return;@@ -112,11 +119,26 @@ function SpotlightPanel() {// Focus the input after the open transition paints (mount = open), and on// close return focus to whatever was focused before — so keyboard/AT users// aren't dumped at the top of the document when Spotlight dismisses.+ // Double rAF + short timeout covers deferred-chunk mount (UX-04).useEffect(() => {const prev = document.activeElement as HTMLElement | null;- const id = requestAnimationFrame(() => inputRef.current?.focus());+ let cancelled = false;+ const focus = () => {+ if (!cancelled) inputRef.current?.focus();+ };+ const id1 = requestAnimationFrame(() => {+ focus();+ requestAnimationFrame(focus);+ });+ const id2 = window.setTimeout(focus, 50);+ const ready = window.setTimeout(() => {+ dismissReady.current = true;+ }, 180);return () => {- cancelAnimationFrame(id);+ cancelled = true;+ cancelAnimationFrame(id1);+ window.clearTimeout(id2);+ window.clearTimeout(ready);prev?.focus?.();};}, []);@@ -125,6 +147,10 @@ function SpotlightPanel() {const selIdx = Math.min(sel, Math.max(0, results.length - 1));const close = () => setSpotlightOpen(false);+ const onBackdrop = () => {+ if (!dismissReady.current) return;+ close();+ };const runAt = (i: number) => {const cmd = results[i];if (!cmd) return;@@ -148,17 +174,23 @@ function SpotlightPanel() {}};+ const emptyMessage = searchError+ ? `Pencarian gagal: ${searchError}`+ : folderPending+ ? "Searching…"+ : `No matches for “${q}”.`;+return (<divclassName={cn("absolute inset-0 z-[var(--z-spotlight)] flex items-start justify-center bg-black/20",ios ? "pt-[calc(var(--sai-top)_+_0.5rem)]" : "pt-[18vh]",)}- onClick={close}+ onClick={onBackdrop}><divclassName={cn(- "glass w-full overflow-hidden rounded-2xl border border-border shadow-2xl",+ "spotlight-panel w-full overflow-hidden rounded-2xl border border-border text-foreground shadow-2xl",ios ? "max-w-[calc(100%_-_1.5rem)]" : "max-w-xl",)}onClick={(e) => e.stopPropagation()}@@ -178,7 +210,10 @@ function SpotlightPanel() {onChange={(e) => setQ(e.target.value)}onKeyDown={onKey}placeholder="Search apps, folders, actions…"- className={cn("w-full bg-transparent text-base outline-none placeholder:text-muted-foreground", ios ? "py-2.5" : "px-5 py-4")}+ className={cn(+ "w-full bg-transparent text-base text-foreground outline-none placeholder:text-foreground/55",+ ios ? "py-2.5" : "px-5 py-4",+ )}/></div>{results.length > 0 && (@@ -186,17 +221,17 @@ function SpotlightPanel() {)}{results.length === 0 && (<p- role={searchError ? "alert" : undefined}+ role={searchError ? "alert" : folderPending ? "status" : undefined}+ aria-live={folderPending ? "polite" : undefined}className={cn("border-t border-border px-5 py-4 text-sm",- searchError ? "text-destructive" : "text-muted-foreground",+ searchError ? "text-destructive" : "text-foreground/70",)}>- {searchError ? `Pencarian gagal: ${searchError}` : `No matches for “${q}”.`}+ {emptyMessage}</p>)}</div></div>);}-diff --git a/frontend/slices/appshell/features/search/deferred.tsx b/frontend/slices/appshell/features/search/deferred.tsxindex 7cadda21..6769be42 100644--- a/frontend/slices/appshell/features/search/deferred.tsx+++ b/frontend/slices/appshell/features/search/deferred.tsx@@ -1,8 +1,26 @@"use client";+import { useEffect } from "react";import { useSpotlightOpen } from "../../hooks/use-shell";-import { DeferredSurface } from "../../primitives/deferred-surface";+import { DeferredSurface, loadDeferredSurface } from "../../primitives/deferred-surface";const load = () => import("./components/spotlight").then((module) => ({ default: module.Spotlight }));export function DeferredSpotlight() {const open = useSpotlightOpen();+ // Warm the Spotlight chunk on idle so the first ⌘K / Search click does not+ // race the dynamic import (UX-04 first-click miss).+ useEffect(() => {+ const warm = () => {+ void loadDeferredSurface(load);+ };+ const w = window as Window & {+ requestIdleCallback?: (cb: () => void, opts?: { timeout: number }) => number;+ cancelIdleCallback?: (id: number) => void;+ };+ if (typeof w.requestIdleCallback === "function") {+ const id = w.requestIdleCallback(warm, { timeout: 2500 });+ return () => w.cancelIdleCallback?.(id);+ }+ const t = window.setTimeout(warm, 1200);+ return () => window.clearTimeout(t);+ }, []);return <DeferredSurface active={open} load={load} label="Search" />;}diff --git a/frontend/slices/auth/components/auth-gate.tsx b/frontend/slices/auth/components/auth-gate.tsxindex 9439e398..f783287e 100644--- a/frontend/slices/auth/components/auth-gate.tsx+++ b/frontend/slices/auth/components/auth-gate.tsx@@ -63,13 +63,18 @@ function GatedOS({ children }: { children: ReactNode }) {function Splash() {const { tweaks } = useAppearance();+ // Always paint a wallpaper-ish surface under the spinner so session loading+ // never shows the blank grey body (UX-02). Prefer the user's wallpaper token;+ // fall back to aurora gradient via wp-aurora.+ const wp = tweaks.wallpaper === "auto" ? "aurora" : tweaks.wallpaper;return (- <div className="relative grid h-dvh w-screen place-items-center">+ <div className="relative grid h-dvh w-screen place-items-center bg-[var(--surface)]"><div- className={cn(!tweaks.wallpaperStyle && `wp-${tweaks.wallpaper === "auto" ? "aurora" : tweaks.wallpaper}`, "absolute inset-0 -z-10 bg-cover bg-center")}+ className={cn(!tweaks.wallpaperStyle && `wp-${wp}`, "absolute inset-0 -z-10 bg-cover bg-center")}style={tweaks.wallpaperStyle}+ aria-hidden/>- <Loader2 className="size-6 animate-spin text-white drop-shadow" />+ <Loader2 className="size-6 animate-spin text-white drop-shadow" aria-label="Loading" /></div>);}diff --git a/frontend/slices/os-settings/components/update-shell-badge.tsx b/frontend/slices/os-settings/components/update-shell-badge.tsxnew file mode 100644index 00000000..5886507e--- /dev/null+++ b/frontend/slices/os-settings/components/update-shell-badge.tsx@@ -0,0 +1,62 @@+"use client";++import { useEffect, useState } from "react";+import { ArrowDownToLine } from "lucide-react";+import { Button } from "@/components/ui/button";+import { defineFeature, openWindow } from "@/features/appshell";+import { useSession } from "@/features/auth";+import { IS_DEMO } from "@/lib/demo";+import { hasAvailableUpdate, readStatus } from "./update-status-client";++/**+ * Shell-level "new version" affordance (UX-10) — dock-adjacent, not buried in+ * Account. Settings nav badge (`UpdateNavBadge`) stays as the in-app cue.+ */+function UpdateShellBadge() {+ const { status, role } = useSession();+ const [available, setAvailable] = useState(false);++ useEffect(() => {+ if (IS_DEMO || status !== "in" || role !== "owner") return;+ let alive = true;+ readStatus(true)+ .then((next) => {+ if (alive) setAvailable(hasAvailableUpdate(next));+ })+ .catch(() => {+ if (alive) setAvailable(false);+ });+ return () => {+ alive = false;+ };+ }, [status, role]);++ if (IS_DEMO || status !== "in" || role !== "owner" || !available) return null;++ return (+ <div+ className="pointer-events-none fixed inset-x-0 z-[var(--z-spotlight)] flex justify-center px-4"+ style={{ bottom: "calc(5.5rem + var(--sai-bottom, 0px))" }}+ data-slot="shell-update-badge"+ >+ <Button+ type="button"+ variant="secondary"+ className="pointer-events-auto h-auto gap-2 rounded-2xl border border-border bg-card/95 px-3 py-2 text-sm shadow-[var(--shadow-win)] backdrop-blur"+ aria-label="New MSO version available — open Settings Updates"+ onClick={() => openWindow("os-settings", "Settings")}+ >+ <ArrowDownToLine className="size-4 shrink-0 text-primary" />+ <span>New version available</span>+ <span className="rounded-md bg-primary/15 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-primary">+ Open+ </span>+ </Button>+ </div>+ );+}++export const updateShellBadgeFeature = defineFeature({+ id: "update-shell-badge",+ slots: { overlay: UpdateShellBadge },+});diff --git a/frontend/slices/os-shell/server-connection-status.tsx b/frontend/slices/os-shell/server-connection-status.tsxindex c0e33828..91d51ac7 100644--- a/frontend/slices/os-shell/server-connection-status.tsx+++ b/frontend/slices/os-shell/server-connection-status.tsx@@ -22,9 +22,13 @@ function ServerConnectionStatus() {const live = status === "in" && tweaks.server.mode === "live";const mobile = shell.surface === "mobile";const windows = shell.id === "windows";+ // Signed-out on a live host is a mock showcase — not the NEXT_PUBLIC_OS_DEMO+ // build. Saying "Demo" here confuses ops (UX-01 labeling clarity).const label = live? `${mobile ? "Live" : "Live server"} · ${role ?? "viewer"}`- : mobile ? "Demo" : "Demo · Mock data only";+ : status === "out"+ ? (mobile ? "Mock" : "Mock data only")+ : (mobile ? "Mock" : "Mock · Not live");return (<divdiff --git a/frontend/slices/os-shell/shell.manifest.ts b/frontend/slices/os-shell/shell.manifest.tsindex ab0c5a23..6b624510 100644--- a/frontend/slices/os-shell/shell.manifest.ts+++ b/frontend/slices/os-shell/shell.manifest.ts@@ -28,6 +28,7 @@ import { organizationApp } from "@/features/organization";import { memoryGraphApp } from "@/features/memory-graph";import { cloudflareApp, dokployApp } from "@/features/infrastructure";import { themeQuickPickerFeature } from "./theme-quick-picker";+import { updateShellBadgeFeature } from "@/features/os-settings/components/update-shell-badge";import { serverConnectionStatusFeature } from "./server-connection-status";import { APP_MARKS } from "./brand-marks";@@ -94,5 +95,5 @@ export const BUILTIN_APPS: AppDescriptor[] = [// mounts into a named slot (overlay/rightPanel/notifications/topPill/// controlCenter/today), so a feature absent from the array just doesn't render.// Settings stays the `os-settings` app (its own slice). mso adds one consumer-// feature: a compact theme-preset switcher in the menu-bar status cluster.-export const TOPSIDE_FEATURES: FeatureDescriptor[] = [...DEFAULT_FEATURES, serverConnectionStatusFeature, themeQuickPickerFeature];+// features: theme-preset switcher in the menu-bar status cluster + shell update badge (UX-10).+export const TOPSIDE_FEATURES: FeatureDescriptor[] = [...DEFAULT_FEATURES, serverConnectionStatusFeature, themeQuickPickerFeature, updateShellBadgeFeature];