Skip to content

armgit / mso

Public Imported from GitHub
0

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.

feat(settings): nest version and updates under About

Cursor Agentb8c6a38f29ab
diff --git a/docs/PROGRESS.md b/docs/PROGRESS.md
index 025bbd41..6272be2b 100644
--- a/docs/PROGRESS.md
+++ b/docs/PROGRESS.md
@@ -1,3 +1,17 @@
+## 2026-09-27 — Settings version, updates, and optional breadcrumbs
+
+Account still owns the profile, password, Devices, and the About overview.
+Version and software updates are nested pages under About, so `?section=about`
+stays the overview and `?section=about&page=version` (or `updates`) opens the
+detail. Version reads `/api/health` — the same build id, build SHA, and app
+version the watchdog already reports — and falls back to that same baked-in
+identity when the probe does not answer. Updates still calls the existing
+self-update API.
+
+Nested Settings pages opt into a trail with `SettingsFeatureCell`'s optional
+`breadcrumbs` prop. Omitting it renders the cell's children with no extra
+chrome. MCP's inbound pages use that same prop instead of a one-off back row.
+
## 2026-09-26 — Settings Account section
Settings now opens on an Account section. Rename, icon, and password reset live
diff --git a/frontend/slices/os-settings/app.tsx b/frontend/slices/os-settings/app.tsx
index ce0df686..09f22be9 100644
--- a/frontend/slices/os-settings/app.tsx
+++ b/frontend/slices/os-settings/app.tsx
@@ -1,6 +1,7 @@
"use client";
import { useSearchParams } from "next/navigation";
+import { initialAboutPage } from "./lib/about-pages";
import { sectionFromSearch } from "./lib/sections";
import { useEffect, useState } from "react";
import { useAppearance, effectiveServerTarget } from "@/lib/appearance";
@@ -12,6 +13,7 @@ import {
toast,
} from "@/features/appshell";
import type { SectionId } from "./lib/sections";
+import { AboutPageState } from "./components/about-page-state";
import { SettingsShell } from "./components/settings-shell";
// Default export so os-shell can lazy-load it as a window app.
@@ -65,5 +67,9 @@ export default function OsSettings() {
[tweaks.theme, tweaks.preset, tweaks.device, tweaks.fontScale, tweaks.wallpaper, tweaks.wallpaperImage, tweaks.server.mode, serverTarget?.label, model],
);
- return <SettingsShell active={active} onSelect={setActive} />;
+ return (
+ <AboutPageState initial={initialAboutPage(initial ?? null, params.get("page"))}>
+ <SettingsShell active={active} onSelect={setActive} />
+ </AboutPageState>
+ );
}
diff --git a/frontend/slices/os-settings/components/about-overview.tsx b/frontend/slices/os-settings/components/about-overview.tsx
new file mode 100644
index 00000000..0a702473
--- /dev/null
+++ b/frontend/slices/os-settings/components/about-overview.tsx
@@ -0,0 +1,88 @@
+"use client";
+
+import { useEffect, useState, type ReactNode } from "react";
+import { ChevronRight, Info } from "lucide-react";
+import { MsoMark } from "@/components/shared/mso-mark";
+import { Skeleton } from "@/components/ui/skeleton";
+import { SettingsActionRow, SettingsSection, SettingsValueRow } from "@/features/shell-settings";
+import { effectiveServerTarget, useAppearance } from "@/lib/appearance";
+import { IS_DEMO } from "@/lib/demo";
+import { fmtGiB, fmtUptime } from "@/lib/os-api/format";
+import { useOsApi, type FsUsage, type SysStats } from "@/features/appshell";
+import pkg from "../../../../package.json";
+import { ABOUT_PAGES, type AboutPage } from "../lib/about-pages";
+
+const APP_NAME = "Manef Shell OS";
+const APP_TAGLINE = "Browser-based visual shell";
+
+function ValueSkeleton({ width = "w-20" }: { width?: string }) {
+ return <Skeleton className={`ml-auto h-3.5 ${width}`} />;
+}
+
+export function AboutOverview({ onOpenPage }: { onOpenPage: (page: AboutPage) => void }) {
+ const api = useOsApi();
+ const { tweaks } = useAppearance();
+ const [stats, setStats] = useState<SysStats | null>(null);
+ const [usage, setUsage] = useState<FsUsage | null>(null);
+ const isSample = IS_DEMO || effectiveServerTarget(tweaks.server, IS_DEMO)?.kind === "mock";
+
+ useEffect(() => {
+ let alive = true;
+ Promise.all([api.sys.stats(), api.fs.usage()])
+ .then(([nextStats, nextUsage]) => {
+ if (!alive) return;
+ setStats(nextStats);
+ setUsage(nextUsage);
+ })
+ .catch(() => {
+ /* keep loading placeholders instead of flashing invented values */
+ });
+ return () => {
+ alive = false;
+ };
+ }, [api]);
+
+ const rows: [string, ReactNode][] = [
+ ["Status", "Public Alpha"],
+ ["App version", pkg.version ?? "0.0.0"],
+ ["Build ID", process.env.NEXT_PUBLIC_BUILD_ID || "dev"],
+ ["Commit", process.env.NEXT_PUBLIC_COMMIT_SHA || "not set"],
+ ["Runtime mode", IS_DEMO ? "Demo — mock data only" : "Live-capable"],
+ ["Cores", stats ? String(stats.cpu.cores) : <ValueSkeleton width="w-8" />],
+ ["Memory", stats ? fmtGiB(stats.mem.total) : <ValueSkeleton />],
+ ["Disk", stats ? fmtGiB(stats.disk.total) : <ValueSkeleton />],
+ ["Uptime", stats ? fmtUptime(stats.uptime) : <ValueSkeleton width="w-24" />],
+ ["Storage used", usage ? `${fmtGiB(usage.used)} of ${fmtGiB(usage.total)}` : <ValueSkeleton width="w-28" />],
+ ];
+
+ return (
+ <div className="space-y-4 sm:space-y-5">
+ <div className="flex items-center gap-3 rounded-xl border border-border/60 bg-card/50 p-3 sm:p-4">
+ <MsoMark className="size-12 shrink-0 shell-icon-tile sm:size-14" />
+ <div className="min-w-0">
+ <div className="truncate text-base font-bold tracking-tight text-foreground sm:text-lg">{APP_NAME}</div>
+ <div className="text-xs text-muted-foreground">{APP_TAGLINE}</div>
+ <div className="mt-1 truncate font-mono text-[10px] text-muted-foreground/80">
+ v{pkg.version ?? "0.0.0"} · {process.env.NEXT_PUBLIC_COMMIT_SHA || "development"}
+ </div>
+ </div>
+ </div>
+
+ <SettingsSection
+ icon={<Info />}
+ title="System"
+ footnote={isSample ? "Sample data — connect a live host in Server for real specs." : "Build identity and live host capacity."}
+ >
+ {rows.map(([key, value]) => <SettingsValueRow key={key} label={key} value={value} />)}
+ <SettingsActionRow label="Version" trailing={<ChevronRight className="size-4" aria-hidden />} onClick={() => onOpenPage("version")} />
+ <SettingsActionRow label="Check software updates" icon={<Info />} trailing={<ChevronRight className="size-4" aria-hidden />} onClick={() => onOpenPage("updates")} />
+ </SettingsSection>
+
+ <SettingsSection icon={<Info />} title="Also in About" footnote="Release notes and maintenance open from here.">
+ {ABOUT_PAGES.filter((item) => item.id === "whats-new" || item.id === "maintenance").map((item) => (
+ <SettingsActionRow key={item.id} label={item.title} trailing={<ChevronRight className="size-4" aria-hidden />} onClick={() => onOpenPage(item.id)} />
+ ))}
+ </SettingsSection>
+ </div>
+ );
+}
diff --git a/frontend/slices/os-settings/components/about-page-state.tsx b/frontend/slices/os-settings/components/about-page-state.tsx
new file mode 100644
index 00000000..b422cd85
--- /dev/null
+++ b/frontend/slices/os-settings/components/about-page-state.tsx
@@ -0,0 +1,21 @@
+"use client";
+
+import { createContext, useContext, useMemo, useState, type ReactNode } from "react";
+import type { AboutPage } from "../lib/about-pages";
+
+type AboutPageContextValue = {
+ page: AboutPage;
+ setPage: (page: AboutPage) => void;
+};
+
+const AboutPageContext = createContext<AboutPageContextValue | null>(null);
+
+export function AboutPageState({ initial = "overview", children }: { initial?: AboutPage; children: ReactNode }) {
+ const [page, setPage] = useState<AboutPage>(initial);
+ const value = useMemo(() => ({ page, setPage }), [page]);
+ return <AboutPageContext.Provider value={value}>{children}</AboutPageContext.Provider>;
+}
+
+export function useAboutPage(): AboutPageContextValue {
+ return useContext(AboutPageContext) ?? { page: "overview", setPage: () => {} };
+}
diff --git a/frontend/slices/os-settings/components/about-section.tsx b/frontend/slices/os-settings/components/about-section.tsx
index 2263d362..e972d47c 100644
--- a/frontend/slices/os-settings/components/about-section.tsx
+++ b/frontend/slices/os-settings/components/about-section.tsx
@@ -1,167 +1,52 @@
"use client";
-import { useEffect, useState, type ReactNode } from "react";
import { Info } from "lucide-react";
-import { MsoMark } from "@/components/shared/mso-mark";
-import { Skeleton } from "@/components/ui/skeleton";
-import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { openOnboarding } from "@/features/auth";
-import { useOsApi, type FsUsage, type SysStats } from "@/features/appshell";
-import {
- SettingsActionRow,
- SettingsSection,
- SettingsValueRow,
-} from "@/features/shell-settings";
-import { effectiveServerTarget, useAppearance } from "@/lib/appearance";
+import { SettingsActionRow, SettingsFeatureCell, SettingsSection } from "@/features/shell-settings";
import { IS_DEMO } from "@/lib/demo";
-import { fmtGiB, fmtUptime } from "@/lib/os-api/format";
-import pkg from "../../../../package.json";
+import { aboutBreadcrumbs } from "../lib/about-pages";
+import type { SectionId } from "../lib/sections";
+import { AboutOverview } from "./about-overview";
+import { useAboutPage } from "./about-page-state";
import { MaintenanceSection } from "./maintenance-section";
import { UpdateSection } from "./update-section";
+import { VersionSection } from "./version-section";
import { WhatsNew } from "./whats-new";
-const APP_NAME = "Manef Shell OS";
-const APP_TAGLINE = "Browser-based visual shell";
-
-type AboutTab = "overview" | "update" | "whats-new" | "maintenance";
-
-const ABOUT_TABS: ReadonlyArray<{ id: AboutTab; label: string }> = [
- { id: "overview", label: "Overview" },
- { id: "update", label: "Update" },
- { id: "whats-new", label: "What's new" },
- { id: "maintenance", label: "Maintenance" },
-];
-
-function ValueSkeleton({ width = "w-20" }: { width?: string }) {
- return <Skeleton className={`ml-auto h-3.5 ${width}`} />;
+export function AboutSection({ onOpen }: { onOpen?: (id: SectionId) => void }) {
+ const { page, setPage } = useAboutPage();
+ return (
+ <SettingsFeatureCell breadcrumbs={aboutBreadcrumbs(page, {
+ onAccount: onOpen ? () => onOpen("account") : undefined,
+ onAbout: () => setPage("overview"),
+ })}>
+ {page === "overview" ? <AboutOverview onOpenPage={setPage} /> : null}
+ {page === "version" ? <VersionSection onCheckUpdates={() => setPage("updates")} /> : null}
+ {page === "updates" ? <AboutUpdates /> : null}
+ {page === "whats-new" ? <WhatsNew /> : null}
+ {page === "maintenance" ? <AboutMaintenance /> : null}
+ </SettingsFeatureCell>
+ );
}
-export function AboutSection() {
- const api = useOsApi();
- const { tweaks } = useAppearance();
- const [stats, setStats] = useState<SysStats | null>(null);
- const [usage, setUsage] = useState<FsUsage | null>(null);
- const [tab, setTab] = useState<AboutTab>("overview");
-
- // Stats are MOCK when the active target is mock/demo — flag it so About never
- // presents invented machine specs as the real host (VPS-essence honesty).
- const isSample =
- IS_DEMO || effectiveServerTarget(tweaks.server, IS_DEMO)?.kind === "mock";
-
- useEffect(() => {
- let alive = true;
- Promise.all([api.sys.stats(), api.fs.usage()])
- .then(([s, u]) => {
- if (!alive) return;
- setStats(s);
- setUsage(u);
- })
- .catch(() => {
- /* keep loading placeholders instead of flashing invented values */
- });
- return () => {
- alive = false;
- };
- }, [api]);
-
- const rows: [string, ReactNode][] = [
- ["Status", "Public Alpha"],
- ["App version", pkg.version ?? "0.0.0"],
- ["Build ID", process.env.NEXT_PUBLIC_BUILD_ID || "dev"],
- ["Commit", process.env.NEXT_PUBLIC_COMMIT_SHA || "not set"],
- ["Runtime mode", IS_DEMO ? "Demo — mock data only" : "Live-capable"],
- ["Cores", stats ? String(stats.cpu.cores) : <ValueSkeleton width="w-8" />],
- ["Memory", stats ? fmtGiB(stats.mem.total) : <ValueSkeleton />],
- ["Disk", stats ? fmtGiB(stats.disk.total) : <ValueSkeleton />],
- [
- "Uptime",
- stats ? fmtUptime(stats.uptime) : <ValueSkeleton width="w-24" />,
- ],
- [
- "Storage used",
- usage ? (
- `${fmtGiB(usage.used)} of ${fmtGiB(usage.total)}`
- ) : (
- <ValueSkeleton width="w-28" />
- ),
- ],
- ];
+function AboutUpdates() {
+ if (IS_DEMO) {
+ return (
+ <SettingsSection icon={<Info />} title="Updates" footnote="This demo does not apply software updates.">
+ <p className="px-4 py-3 text-sm text-muted-foreground">Software updates run on a live host from this page or with mso update.</p>
+ </SettingsSection>
+ );
+ }
+ return <UpdateSection />;
+}
+function AboutMaintenance() {
return (
<div className="space-y-4 sm:space-y-5">
- <div className="flex items-center gap-3 rounded-xl border border-border/60 bg-card/50 p-3 sm:p-4">
- <MsoMark className="size-12 shrink-0 shell-icon-tile sm:size-14" />
- <div className="min-w-0">
- <div className="truncate text-base font-bold tracking-tight text-foreground sm:text-lg">
- {APP_NAME}
- </div>
- <div className="text-xs text-muted-foreground">{APP_TAGLINE}</div>
- <div className="mt-1 truncate font-mono text-[10px] text-muted-foreground/80">
- v{pkg.version ?? "0.0.0"} ·{" "}
- {process.env.NEXT_PUBLIC_COMMIT_SHA || "development"}
- </div>
- </div>
- </div>
-
- <Tabs className="gap-4">
- <div className="overflow-x-auto pb-1 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden">
- <TabsList className="min-w-max">
- {ABOUT_TABS.map((item) => (
- <TabsTrigger
- key={item.id}
- active={tab === item.id}
- onClick={() => setTab(item.id)}
- className="min-h-9 [@media(pointer:coarse)]:min-h-[44px]"
- >
- {item.label}
- </TabsTrigger>
- ))}
- </TabsList>
- </div>
-
- <div
- role="tabpanel"
- aria-label={ABOUT_TABS.find((item) => item.id === tab)?.label}
- >
- {tab === "overview" && (
- <SettingsSection
- icon={<Info />}
- title="System"
- footnote={
- isSample
- ? "Sample data — connect a live host in Server for real specs."
- : "Build identity and live host capacity."
- }
- >
- {rows.map(([key, value]) => (
- <SettingsValueRow key={key} label={key} value={value} />
- ))}
- <SettingsActionRow label="Check software updates" icon={<Info />} onClick={() => setTab("update")} />
- </SettingsSection>
- )}
-
- {tab === "update" && <UpdateSection />}
-
- {tab === "whats-new" && <WhatsNew />}
-
- {tab === "maintenance" && (
- <div className="space-y-4 sm:space-y-5">
- <SettingsSection
- icon={<Info />}
- title="Setup"
- footnote="Reopen the guided setup without resetting existing configuration."
- >
- <SettingsActionRow
- label="Open onboarding"
- icon={<Info />}
- onClick={openOnboarding}
- />
- </SettingsSection>
- <MaintenanceSection />
- </div>
- )}
- </div>
- </Tabs>
+ <SettingsSection icon={<Info />} title="Setup" footnote="Reopen the guided setup without resetting existing configuration.">
+ <SettingsActionRow label="Open onboarding" icon={<Info />} onClick={openOnboarding} />
+ </SettingsSection>
+ <MaintenanceSection />
</div>
);
}
diff --git a/frontend/slices/os-settings/components/account-section.tsx b/frontend/slices/os-settings/components/account-section.tsx
index 0b11be00..87c7c389 100644
--- a/frontend/slices/os-settings/components/account-section.tsx
+++ b/frontend/slices/os-settings/components/account-section.tsx
@@ -6,16 +6,18 @@ import { SettingsActionRow, SettingsSection } from "@/features/shell-settings";
import type { SectionId } from "../lib/sections";
import { AccountPasswordCard } from "./account-password-card";
import { AccountProfileCard } from "./account-profile-card";
+import { useAboutPage } from "./about-page-state";
export function AccountSection({ onOpen }: { onOpen: (id: SectionId) => void }) {
const { status, role } = useSession();
+ const { setPage } = useAboutPage();
return (
<div className="space-y-4 sm:space-y-5">
<AccountProfileCard status={status} role={role} />
<AccountPasswordCard status={status} role={role} />
<SettingsSection icon={<ShieldCheck />} title="Also in Account" footnote="Devices and About live here. They are not separate Settings sections.">
<SettingsActionRow label="Devices" onClick={() => onOpen("devices")} trailing={<ChevronRight className="size-4" aria-hidden />} />
- <SettingsActionRow label="About" onClick={() => onOpen("about")} trailing={<ChevronRight className="size-4" aria-hidden />} />
+ <SettingsActionRow label="About" onClick={() => { setPage("overview"); onOpen("about"); }} trailing={<ChevronRight className="size-4" aria-hidden />} />
</SettingsSection>
</div>
);
diff --git a/frontend/slices/os-settings/components/mcp-direction.test.ts b/frontend/slices/os-settings/components/mcp-direction.test.ts
index 6a229ac6..b030417f 100644
--- a/frontend/slices/os-settings/components/mcp-direction.test.ts
+++ b/frontend/slices/os-settings/components/mcp-direction.test.ts
@@ -1,6 +1,10 @@
import { describe, expect, it } from "vitest";
-import { pagesForDirection } from "./mcp-navigation";
+import { mcpBreadcrumbs, pagesForDirection } from "./mcp-navigation";
describe("MCP direction navigation", () => {
it("keeps external clients accessing MSO in the inbound direction", () => expect(pagesForDirection("inbound").map(page => page.id)).toEqual(["connect", "access", "activity", "tools", "connection"]));
it("keeps registry declarations in the outbound direction", () => expect(pagesForDirection("outbound").map(page => page.id)).toEqual(["registry"]));
+ it("omits breadcrumbs on the overview and names the open page", () => {
+ expect(mcpBreadcrumbs("overview", () => {})).toBeUndefined();
+ expect(mcpBreadcrumbs("tools", () => {})?.map((item) => item.label)).toEqual(["MCP", "Tools & updates"]);
+ });
});
diff --git a/frontend/slices/os-settings/components/mcp-navigation.tsx b/frontend/slices/os-settings/components/mcp-navigation.tsx
index 7826e3f8..fdf1bcdc 100644
--- a/frontend/slices/os-settings/components/mcp-navigation.tsx
+++ b/frontend/slices/os-settings/components/mcp-navigation.tsx
@@ -1,8 +1,8 @@
"use client";
import { Button } from "@/components/ui/button";
-import { SettingsBlock } from "@/features/shell-settings";
-import { ArrowLeft, ChevronRight, KeyRound, ListChecks, PlugZap, Settings2, Wrench } from "lucide-react";
+import { SettingsBlock, type SettingsBreadcrumb } from "@/features/shell-settings";
+import { ChevronRight, KeyRound, ListChecks, PlugZap, Settings2, Wrench } from "lucide-react";
export const MCP_PAGES = [
{ id: "connect", title: "Connect an app", description: "Choose ChatGPT, Claude, Cursor, or another client and follow its setup steps.", icon: PlugZap },
@@ -16,14 +16,15 @@ export type McpPage = "overview" | (typeof MCP_PAGES)[number]["id"];
export type McpDirection = "inbound" | "outbound";
export const pagesForDirection = (direction: McpDirection) => MCP_PAGES.filter(page => direction === "inbound" ? page.id !== "registry" : page.id === "registry");
+/** Crumbs for a nested MCP page. Overview omits them so the cell renders no trail. */
+export function mcpBreadcrumbs(active: McpPage, onOverview: () => void): SettingsBreadcrumb[] | undefined {
+ if (active === "overview") return undefined;
+ const title = MCP_PAGES.find((page) => page.id === active)?.title ?? "MCP";
+ return [{ label: "MCP", onSelect: onOverview }, { label: title }];
+}
+
export function McpNavigation({ active, onSelect, activeCount, direction }: { active: McpPage; onSelect: (page: McpPage) => void; activeCount: number; direction: McpDirection }) {
- if (active !== "overview") return (
- <nav aria-label="MCP navigation" className="flex flex-wrap items-center gap-2 text-sm">
- <Button variant="ghost" className="min-h-11 px-2" onClick={() => onSelect("overview")}><ArrowLeft className="size-4" /> MCP overview</Button>
- <ChevronRight className="size-4 text-muted-foreground" aria-hidden />
- <span aria-current="page">{MCP_PAGES.find(page => page.id === active)?.title}</span>
- </nav>
- );
+ if (active !== "overview") return null;
return (
<nav aria-label="MCP navigation">
<SettingsBlock className="!p-0 divide-y divide-border">
diff --git a/frontend/slices/os-settings/components/mcp-section.tsx b/frontend/slices/os-settings/components/mcp-section.tsx
index 4c9e9e67..09ca1943 100644
--- a/frontend/slices/os-settings/components/mcp-section.tsx
+++ b/frontend/slices/os-settings/components/mcp-section.tsx
@@ -3,7 +3,7 @@ import Link from "next/link";
import { Button } from "@/components/ui/button";
import { useSession } from "@/features/auth";
-import { SettingsBlock, SettingsSection } from "@/features/shell-settings";
+import { SettingsBlock, SettingsFeatureCell, SettingsSection } from "@/features/shell-settings";
import { IS_DEMO } from "@/lib/demo";
import { Lock, Plug } from "lucide-react";
import { useRef, useState } from "react";
@@ -12,7 +12,7 @@ import { McpSessions } from "./mcp-sessions";
import { McpActivity } from "./mcp-activity";
import { McpConnectionSection } from "./mcp-connection-section";
import { McpCopyField } from "./mcp-copy-field";
-import { McpNavigation, type McpPage } from "./mcp-navigation";
+import { mcpBreadcrumbs, McpNavigation, type McpPage } from "./mcp-navigation";
import { McpSetupGuide } from "./mcp-setup-guide";
import { useMcpState } from "./mcp-state";
import { McpTokenSection } from "./mcp-token-section";
@@ -50,6 +50,7 @@ function OwnerMcpSection() {
return (
<div ref={top} tabIndex={-1} data-slot="mcp-page" className="space-y-4 outline-none">
<McpDirectionTabs value={direction} onChange={selectDirection} />
+ <SettingsFeatureCell breadcrumbs={direction === "inbound" ? mcpBreadcrumbs(page, () => navigate("overview")) : undefined} className="@container min-w-0 space-y-4">
<div id="mcp-direction-panel" role="tabpanel" aria-labelledby={`mcp-${direction}-tab`} className="@container min-w-0 space-y-4">
{!state.enabled && direction === "inbound" ? (
<SettingsSection icon={<Plug />} title="MCP is off">
@@ -76,6 +77,7 @@ function OwnerMcpSection() {
{(page === "registry" || (direction === "outbound" && page === "overview")) && <McpPluginRegistry />}
</>)}
</div>
+ </SettingsFeatureCell>
</div>
);
}
diff --git a/frontend/slices/os-settings/components/sections.tsx b/frontend/slices/os-settings/components/sections.tsx
index 60f1d3bf..1db2e3ce 100644
--- a/frontend/slices/os-settings/components/sections.tsx
+++ b/frontend/slices/os-settings/components/sections.tsx
@@ -108,7 +108,7 @@ export function SettingsSectionBody({ id, onOpen }: { id: SectionId; onOpen?: (i
case "backup":
return <BackupSection />;
case "about":
- return <AboutSection />;
+ return <AboutSection onOpen={onOpen} />;
}
}
diff --git a/frontend/slices/os-settings/components/version-section.tsx b/frontend/slices/os-settings/components/version-section.tsx
new file mode 100644
index 00000000..e428915c
--- /dev/null
+++ b/frontend/slices/os-settings/components/version-section.tsx
@@ -0,0 +1,76 @@
+"use client";
+
+import { useEffect, useState } from "react";
+import { Info } from "lucide-react";
+import { Skeleton } from "@/components/ui/skeleton";
+import { SettingsActionRow, SettingsBlock, SettingsSection, SettingsValueRow } from "@/features/shell-settings";
+import pkg from "../../../../package.json";
+
+type HealthIdentity = {
+ status?: string;
+ version?: string;
+ buildId?: string;
+ buildSha?: string | null;
+};
+
+const fallback = (): HealthIdentity => ({
+ status: "unknown",
+ version: pkg.version ?? "0.0.0",
+ buildId: process.env.NEXT_PUBLIC_BUILD_ID || "dev",
+ buildSha: process.env.NEXT_PUBLIC_COMMIT_SHA || null,
+});
+
+export function VersionSection({ onCheckUpdates }: { onCheckUpdates: () => void }) {
+ const [health, setHealth] = useState<HealthIdentity | null>(null);
+ const [live, setLive] = useState(true);
+
+ useEffect(() => {
+ let alive = true;
+ fetch("/api/health", { cache: "no-store" })
+ .then((response) => (response.ok ? response.json() : Promise.reject(new Error(`HTTP ${response.status}`))))
+ .then((body: HealthIdentity) => {
+ if (alive) setHealth(body);
+ })
+ .catch(() => {
+ if (!alive) return;
+ setLive(false);
+ setHealth(fallback());
+ });
+ return () => {
+ alive = false;
+ };
+ }, []);
+
+ if (!health) {
+ return (
+ <SettingsSection icon={<Info />} title="Version" footnote="Reading /api/health.">
+ <SettingsBlock className="space-y-2">
+ <Skeleton className="h-3.5 w-40" />
+ <Skeleton className="h-3.5 w-56" />
+ </SettingsBlock>
+ </SettingsSection>
+ );
+ }
+
+ const buildSha = health.buildSha || "not set";
+ return (
+ <SettingsSection
+ icon={<Info />}
+ title="Version"
+ footnote={live
+ ? "Same identity /api/health reports for this running server."
+ : "Showing the build identity baked into this page because /api/health did not respond."}
+ >
+ {!live ? (
+ <SettingsBlock>
+ <p role="alert" className="text-sm text-destructive-text">Version details from the server are unavailable.</p>
+ </SettingsBlock>
+ ) : null}
+ <SettingsValueRow label="Status" value={health.status || "unknown"} />
+ <SettingsValueRow label="App version" value={health.version || pkg.version || "0.0.0"} />
+ <SettingsValueRow label="Build ID" value={health.buildId || "dev"} />
+ <SettingsValueRow label="Build SHA" value={buildSha} />
+ <SettingsActionRow label="Check software updates" icon={<Info />} onClick={onCheckUpdates} />
+ </SettingsSection>
+ );
+}
diff --git a/frontend/slices/os-settings/lib/about-pages.test.ts b/frontend/slices/os-settings/lib/about-pages.test.ts
new file mode 100644
index 00000000..84db4a56
--- /dev/null
+++ b/frontend/slices/os-settings/lib/about-pages.test.ts
@@ -0,0 +1,23 @@
+import { describe, expect, it } from "vitest";
+import { aboutBreadcrumbs, aboutPageFromSearch, initialAboutPage } from "./about-pages";
+
+describe("about nested pages", () => {
+ it("keeps ?section=about on the overview and accepts nested page ids", () => {
+ expect(aboutPageFromSearch(null)).toBe("overview");
+ expect(aboutPageFromSearch("nope")).toBe("overview");
+ expect(aboutPageFromSearch("version")).toBe("version");
+ expect(aboutPageFromSearch("update")).toBe("updates");
+ expect(initialAboutPage("appearance", "version")).toBe("overview");
+ expect(initialAboutPage("about", "version")).toBe("version");
+ expect(initialAboutPage("about", null)).toBe("overview");
+ });
+
+ it("omits breadcrumbs on the overview and builds them for nested pages", () => {
+ const onAbout = () => {};
+ expect(aboutBreadcrumbs("overview", { onAbout })).toBeUndefined();
+ const version = aboutBreadcrumbs("version", { onAccount: () => {}, onAbout });
+ expect(version?.map((item) => item.label)).toEqual(["Account", "About", "Version"]);
+ expect(version?.[2]?.onSelect).toBeUndefined();
+ expect(aboutBreadcrumbs("updates", { onAbout })?.map((item) => item.label)).toEqual(["About", "Updates"]);
+ });
+});
diff --git a/frontend/slices/os-settings/lib/about-pages.ts b/frontend/slices/os-settings/lib/about-pages.ts
new file mode 100644
index 00000000..cb380361
--- /dev/null
+++ b/frontend/slices/os-settings/lib/about-pages.ts
@@ -0,0 +1,35 @@
+import type { SettingsBreadcrumb } from "@/features/shell-settings";
+
+export const ABOUT_PAGES = [
+ { id: "version", title: "Version", description: "App version, build id, and the commit this server is running." },
+ { id: "updates", title: "Updates", description: "Check for a software update and apply it on this host." },
+ { id: "whats-new", title: "What's new", description: "Changes already shipped to this deployment." },
+ { id: "maintenance", title: "Maintenance", description: "Guided setup and reset tools." },
+] as const;
+
+export type AboutPage = "overview" | (typeof ABOUT_PAGES)[number]["id"];
+
+const PAGE_ALIASES: Record<string, AboutPage> = { update: "updates" };
+
+export function aboutPageFromSearch(value: string | null): AboutPage {
+ if (!value) return "overview";
+ const id = PAGE_ALIASES[value] ?? value;
+ return ABOUT_PAGES.some((page) => page.id === id) ? (id as AboutPage) : "overview";
+}
+
+/** Deep link `?section=about` stays the overview. `page` selects a nested detail. */
+export function initialAboutPage(section: string | null, page: string | null): AboutPage {
+ return section === "about" ? aboutPageFromSearch(page) : "overview";
+}
+
+export function aboutBreadcrumbs(
+ page: AboutPage,
+ actions: { onAccount?: () => void; onAbout: () => void },
+): SettingsBreadcrumb[] | undefined {
+ if (page === "overview") return undefined;
+ const title = ABOUT_PAGES.find((item) => item.id === page)?.title ?? "About";
+ const items: SettingsBreadcrumb[] = [];
+ if (actions.onAccount) items.push({ label: "Account", onSelect: actions.onAccount });
+ items.push({ label: "About", onSelect: actions.onAbout }, { label: title });
+ return items;
+}
diff --git a/frontend/slices/os-settings/lib/sections.test.ts b/frontend/slices/os-settings/lib/sections.test.ts
index 4087d5bc..80083866 100644
--- a/frontend/slices/os-settings/lib/sections.test.ts
+++ b/frontend/slices/os-settings/lib/sections.test.ts
@@ -7,6 +7,8 @@ describe("settings section model", () => {
expect(filterSettingsSections("wallpaper").map((x) => x.id)).toEqual(["appearance"]);
expect(filterSettingsSections("devices").map((x) => x.id)).toEqual(["account"]);
expect(filterSettingsSections("system info").map((x) => x.id)).toEqual(["account"]);
+ expect(filterSettingsSections("version").map((x) => x.id)).toEqual(["account"]);
+ expect(filterSettingsSections("updates").map((x) => x.id)).toEqual(["account"]);
});
it("groups Account with personalization and keeps Devices and About nested", () => {
diff --git a/frontend/slices/os-settings/lib/sections.ts b/frontend/slices/os-settings/lib/sections.ts
index 4ae57be1..ae25dae1 100644
--- a/frontend/slices/os-settings/lib/sections.ts
+++ b/frontend/slices/os-settings/lib/sections.ts
@@ -141,7 +141,7 @@ const NAV_ORDER: readonly SectionId[] = [
];
const SEARCH_EXTRA: Partial<Record<SectionId, string>> = {
- account: "devices approved browsers sessions about system info reset rename password icon",
+ account: "devices approved browsers sessions about system info reset rename password icon version updates software build",
};
function meta(id: SectionId): SettingsSectionMeta {
diff --git a/frontend/slices/shell-settings/components/breadcrumbs.test.tsx b/frontend/slices/shell-settings/components/breadcrumbs.test.tsx
new file mode 100644
index 00000000..db8a77b8
--- /dev/null
+++ b/frontend/slices/shell-settings/components/breadcrumbs.test.tsx
@@ -0,0 +1,32 @@
+import { createElement } from "react";
+import { renderToStaticMarkup } from "react-dom/server";
+import { describe, expect, it } from "vitest";
+import { SettingsBreadcrumbs, SettingsFeatureCell } from "./breadcrumbs";
+
+describe("settings breadcrumbs", () => {
+ it("renders nothing when the feature cell omits the prop", () => {
+ const html = renderToStaticMarkup(createElement(SettingsFeatureCell, null, createElement("p", null, "Body")));
+ expect(html).toBe("<p>Body</p>");
+ expect(renderToStaticMarkup(createElement(SettingsBreadcrumbs, { items: [] }))).toBe("");
+ expect(renderToStaticMarkup(createElement(SettingsBreadcrumbs, {}))).toBe("");
+ });
+
+ it("renders a trail from the crumbs the cell passes", () => {
+ const html = renderToStaticMarkup(
+ <SettingsFeatureCell breadcrumbs={[
+ { label: "Account", onSelect: () => {} },
+ { label: "About", href: "/settings?section=about" },
+ { label: "Version" },
+ ]}>
+ <p>Body</p>
+ </SettingsFeatureCell>,
+ );
+ expect(html).toContain('data-slot="settings-feature-cell"');
+ expect(html).toContain('aria-label="Breadcrumb"');
+ expect(html).toContain("Account");
+ expect(html).toContain('href="/settings?section=about"');
+ expect(html).toContain('aria-current="page"');
+ expect(html).toContain("Version");
+ expect(html).toContain("<p>Body</p>");
+ });
+});
diff --git a/frontend/slices/shell-settings/components/breadcrumbs.tsx b/frontend/slices/shell-settings/components/breadcrumbs.tsx
new file mode 100644
index 00000000..ec812690
--- /dev/null
+++ b/frontend/slices/shell-settings/components/breadcrumbs.tsx
@@ -0,0 +1,72 @@
+"use client";
+
+import type { ReactNode } from "react";
+import { ChevronRight } from "lucide-react";
+import { Button } from "@/components/ui/button";
+import { cn } from "@/lib/utils";
+
+/** One crumb. Ancestors set `onSelect` or `href`. The last crumb is the current page. */
+export type SettingsBreadcrumb = {
+ label: string;
+ href?: string;
+ onSelect?: () => void;
+};
+
+/**
+ * Optional settings breadcrumb trail. Omit `items` (or pass an empty list) and
+ * nothing is rendered, so a feature cell that does not opt in stays unchanged.
+ */
+export function SettingsBreadcrumbs({
+ items,
+ className,
+}: {
+ items?: readonly SettingsBreadcrumb[] | null;
+ className?: string;
+}) {
+ if (!items?.length) return null;
+ return (
+ <nav aria-label="Breadcrumb" data-slot="settings-breadcrumbs" className={cn("min-w-0", className)}>
+ <ol className="flex flex-wrap items-center gap-1 text-sm">
+ {items.map((item, index) => {
+ const current = index === items.length - 1;
+ return (
+ <li key={`${item.label}-${index}`} className="inline-flex min-w-0 items-center gap-1">
+ {index > 0 ? <ChevronRight className="size-4 shrink-0 text-muted-foreground" aria-hidden /> : null}
+ {current ? (
+ <span aria-current="page" className="truncate px-2 font-medium text-foreground">{item.label}</span>
+ ) : item.onSelect ? (
+ <Button type="button" variant="ghost" className="min-h-11 px-2" onClick={item.onSelect}>{item.label}</Button>
+ ) : item.href ? (
+ <Button asChild variant="ghost" className="min-h-11 px-2"><a href={item.href}>{item.label}</a></Button>
+ ) : (
+ <span className="truncate px-2 text-muted-foreground">{item.label}</span>
+ )}
+ </li>
+ );
+ })}
+ </ol>
+ </nav>
+ );
+}
+
+/**
+ * Settings feature cell. Pass `breadcrumbs` to show a trail above the cell;
+ * omit the prop and the children render with no extra wrapper.
+ */
+export function SettingsFeatureCell({
+ breadcrumbs,
+ children,
+ className,
+}: {
+ breadcrumbs?: readonly SettingsBreadcrumb[] | null;
+ children: ReactNode;
+ className?: string;
+}) {
+ if (!breadcrumbs?.length) return <>{children}</>;
+ return (
+ <div data-slot="settings-feature-cell" className={cn("space-y-4", className)}>
+ <SettingsBreadcrumbs items={breadcrumbs} />
+ {children}
+ </div>
+ );
+}
diff --git a/frontend/slices/shell-settings/index.ts b/frontend/slices/shell-settings/index.ts
index e0ab0d85..2c685468 100644
--- a/frontend/slices/shell-settings/index.ts
+++ b/frontend/slices/shell-settings/index.ts
@@ -6,3 +6,4 @@ export { SettingsSection } from "./components/section";
export { SettingsRow, SettingsValueRow } from "./components/row";
export { SettingsActionRow } from "./components/action-row";
export { SettingsBlock } from "./components/block";
+export { SettingsBreadcrumbs, SettingsFeatureCell, type SettingsBreadcrumb } from "./components/breadcrumbs";
diff --git a/scripts/e2e/preview.mjs b/scripts/e2e/preview.mjs
index 7ae85046..6b8a635d 100644
--- a/scripts/e2e/preview.mjs
+++ b/scripts/e2e/preview.mjs
@@ -201,7 +201,7 @@ const run = async () => {
await open("report.docx");
check(/No browser can render this format/i.test(await scope(page, "report.docx").innerText()), "DOCX says why, and offers the download");
- // Settings → Account → About: the update panel is the other thing that can only be wrong live.
+ // Settings → Account → About → Updates: the update panel is the other thing that can only be wrong live.
await page.goto(`${BASE}/settings`, { waitUntil: "domcontentloaded" });
await page.waitForTimeout(2500);
const account = page.getByRole("button", { name: "Account", exact: true }).first();
@@ -209,9 +209,12 @@ const run = async () => {
await page.waitForTimeout(800);
const about = page.getByRole("button", { name: "About", exact: true }).first();
if (await about.count()) await about.click().catch(() => {});
+ await page.waitForTimeout(800);
+ const updates = page.getByRole("button", { name: "Check software updates", exact: true }).first();
+ if (await updates.count()) await updates.click().catch(() => {});
await page.waitForTimeout(3500);
const settings = await (MOBILE ? page.locator("#main-content") : page.locator("[data-window]").last()).innerText();
- check(/Software update/i.test(settings), "Settings → About shows the update panel");
+ check(/Software update/i.test(settings), "Settings → About → Updates shows the update panel");
check(/Up to date|available|build is pending/i.test(settings), "Update panel reported a state");
const update = await page.evaluate(async () => (await fetch("/api/v1/sys/update?check=0")).json());
if (update.supported === false) {
diff --git a/scripts/mso-about-update-visibility.test.ts b/scripts/mso-about-update-visibility.test.ts
index b382c9e5..8b150bae 100644
--- a/scripts/mso-about-update-visibility.test.ts
+++ b/scripts/mso-about-update-visibility.test.ts
@@ -3,7 +3,10 @@ import { describe, expect, it } from "vitest";
const read = (name: string) => readFileSync(`frontend/slices/os-settings/components/${name}.tsx`, "utf8");
describe("About update visibility contract", () => {
it("offers a software update action from Overview", () => {
- expect(read("about-section")).toContain('label="Check software updates"');
+ expect(read("about-overview")).toContain('label="Check software updates"');
+ expect(read("about-section")).toContain('page === "updates"');
+ expect(read("version-section")).toContain('"/api/health"');
+ expect(read("version-section")).toContain('label="Build SHA"');
});
it("does not disappear on authentication/network failure", () => {
const source = read("update-section");