Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
feat(desktop): settings dialog, sidebar primary nav, startup guide and release announcement
vastsafbcaffff7295
diff --git a/apps/desktop/electron/main/bootstrap/launcher.ts b/apps/desktop/electron/main/bootstrap/launcher.tsindex 84d2a9d8f..68a41cba5 100644--- a/apps/desktop/electron/main/bootstrap/launcher.ts+++ b/apps/desktop/electron/main/bootstrap/launcher.ts@@ -250,6 +250,12 @@ export function createLauncher({window.moveTop();}window.webContents.send(IPC.event.pluginLauncherShown);+ // The main window learns it too: the startup guide confirms the user's+ // shortcut press, which a global accelerator never delivers as a keydown.+ const mainWindow = state.mainWindow;+ if (mainWindow && !mainWindow.isDestroyed()) {+ mainWindow.webContents.send(IPC.event.pluginLauncherShown);+ }}async function togglePluginLauncher(): Promise<void> {diff --git a/apps/desktop/src/capture/renderer-api.ts b/apps/desktop/src/capture/renderer-api.tsindex 7b9378097..bedeea3ff 100644--- a/apps/desktop/src/capture/renderer-api.ts+++ b/apps/desktop/src/capture/renderer-api.ts@@ -22,7 +22,8 @@ type CaptureRigStubs = {};export type RendererApi = {- setPage: (page: AppState["page"]) => void;+ /** `"settings"` is kept for capture scripts: it opens the Settings dialog. */+ setPage: (page: AppState["page"] | "settings") => void;refreshProviders: () => Promise<void>;selectSession: (id: string) => Promise<void>;setSettingsTab: (tab: AppState["settingsTab"]) => void;@@ -95,7 +96,11 @@ export function installRendererApi(): () => void {) as CaptureRigStubs;const surface: RendererApi = {- setPage: (page) => useAppStore.getState().setPage(page),+ setPage: (page) => {+ const store = useAppStore.getState();+ if (page === "settings") store.openSettings();+ else store.setPage(page);+ },refreshProviders: () => useAppStore.getState().refreshProviders(),selectSession: (id) => useAppStore.getState().selectSession(id),setSettingsTab: (tab) => useAppStore.getState().setSettingsTab(tab),diff --git a/apps/desktop/src/components/ChatSurface.tsx b/apps/desktop/src/components/ChatSurface.tsxindex 95d519958..3e99895c8 100644--- a/apps/desktop/src/components/ChatSurface.tsx+++ b/apps/desktop/src/components/ChatSurface.tsx@@ -9,7 +9,6 @@ import { HomeMascotLogo } from "./HomeMascotLogo";import { HomeProjectSwitcher } from "./HomeProjectSwitcher";import { IconX } from "./icons";import { TooltipButton } from "./ui";-import { OnboardingChecklist } from "./OnboardingChecklist";import { SessionPane } from "./SessionPane";import { ConversationWidthHandles } from "./ConversationWidthHandles";import { useAppStore } from "../stores/app-store";@@ -191,7 +190,6 @@ export const ChatSurface = memo(function ChatSurface({)}</h1></div>- {!isRemoteSession(activeSession) ? <OnboardingChecklist /> : null}</div></div><div className="home-composer-wrap">@@ -236,7 +234,6 @@ export const ChatSurface = memo(function ChatSurface({onClick={() => {const store = useAppStore.getState();store.setSettingsTab("agent");- store.setPage("settings");}}>{t("errors.action.openSettings")}diff --git a/apps/desktop/src/components/OnboardingChecklist.tsx b/apps/desktop/src/components/OnboardingChecklist.tsxdeleted file mode 100644index 60f6aba73..000000000--- a/apps/desktop/src/components/OnboardingChecklist.tsx+++ /dev/null@@ -1,125 +0,0 @@-import { useTranslation } from "react-i18next";-import { api } from "../lib/api";-import { useAppStore } from "../stores/app-store";-import { IconCheck } from "./icons";--/** Host step ids (app.getOnboarding) mapped to locale keys under `onboarding.`. */-const STEP_LOCALE_KEY: Record<string, string> = {- provider: "addProvider",- secret: "saveKey",- project: "openProject",- prompt: "firstPrompt",- plugin: "loadPlugin",-};--/** First-run inline checklist (D021): rendered on the empty chat home until- * every step is done or the user dismisses it. State comes from the host- * (app.getOnboarding); actions deep-link into the relevant surface. */-export function OnboardingChecklist() {- const { t } = useTranslation();- const onboarding = useAppStore((s) => s.onboarding);- const setPage = useAppStore((s) => s.setPage);- const setSettingsTab = useAppStore((s) => s.setSettingsTab);- const openProject = useAppStore((s) => s.openProject);-- if (!onboarding?.showChecklist) return null;- const steps = onboarding.steps ?? [];- if (steps.length === 0 || steps.every((s) => s.done)) return null;-- const stepLabel = (id: string, fallback: string) => {- const key = `onboarding.${STEP_LOCALE_KEY[id] ?? id}`;- const label = t(key);- return label === key ? fallback : label;- };-- const runAction = (id: string) => {- switch (id) {- case "settings.providers":- case "addProvider":- case "saveKey":- setSettingsTab("agent");- setPage("settings");- break;- case "project.open":- case "openProject":- void openProject();- break;- case "chat.focus":- setPage("chat");- requestAnimationFrame(() => {- document- .querySelector<HTMLTextAreaElement>(".composer-input")- ?.focus();- });- break;- case "plugins.open":- case "loadPlugin":- setPage("plugins");- break;- default:- break;- }- };-- const dismiss = () => {- void api- .dismissOnboarding()- .catch(() => undefined)- .finally(() => {- const current = useAppStore.getState().onboarding;- if (current) {- useAppStore.setState({- onboarding: { ...current, showChecklist: false },- });- }- });- };-- return (- <div- className="home-onboarding-checklist mx-auto w-full max-w-[560px] rounded-lg-plus border border-border-subtle bg-bg-elevated-opaque p-4 text-left shadow-none"- data-testid="onboarding-checklist"- >- <div className="mb-2 flex items-center justify-between">- <span className="text-md-plus font-medium text-text-primary">- {t("onboarding.title")}- </span>- <button- type="button"- className="rounded-md px-1.5 py-0.5 text-xs-plus text-text-muted hover:bg-bg-hover hover:text-text-primary"- onClick={dismiss}- >- {t("onboarding.dismiss")}- </button>- </div>- <ul className="flex flex-col gap-1.5">- {steps.map((step) => (- <li key={step.id}>- <button- type="button"- disabled={step.done}- onClick={() => runAction(step.action || step.id)}- className={`flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-md ${- step.done- ? "cursor-default text-text-muted line-through"- : "text-text-secondary hover:bg-bg-hover hover:text-text-primary"- }`}- >- <span- className={`flex h-4.5 w-4.5 flex-none items-center justify-center rounded-full border ${- step.done- ? "border-success bg-success/15 text-success"- : "border-border-strong text-transparent"- }`}- aria-hidden- >- <IconCheck size={10} />- </span>- {stepLabel(step.id, step.title)}- </button>- </li>- ))}- </ul>- </div>- );-}diff --git a/apps/desktop/src/components/Sidebar.tsx b/apps/desktop/src/components/Sidebar.tsxindex d0c481a6e..36679e506 100644--- a/apps/desktop/src/components/Sidebar.tsx+++ b/apps/desktop/src/components/Sidebar.tsx@@ -1,4 +1,3 @@-import { IconClock } from "./icons";import { RemoteProjectGroups } from "./remote/RemoteProjectGroups";import { groupRemoteProjectSessions } from "../lib/remote-project-catalog";import { isRemoteSession, sessionAllows } from "../lib/remote-session-safety";@@ -82,7 +81,7 @@ import {sidebarResetWidth,} from "../lib/sidebar-resize";import { BrandLogo } from "./BrandLogo";-import { NotificationCenter } from "./NotificationCenter";+import { SidebarFooter, SidebarPrimaryNav } from "./SidebarNavigation";import {WorktreeBadge,WorktreeDialogs,@@ -101,7 +100,6 @@ import {type SidebarMenuPanelContent,} from "../lib/sidebar-menu";import { useArmedDelete } from "../hooks/use-armed-delete";-import { useUpdateState } from "../hooks/use-update-state";import { ProjectDeleteDialog } from "./ProjectDeleteDialog";import { ProjectEditDialog } from "./ProjectEditDialog";import { SessionRenameDialog } from "./SessionRenameDialog";@@ -109,7 +107,6 @@ import {IconArchive,IconArchiveRestore,IconArrowUpDown,- IconPlug,IconBranch,IconCheck,IconChevronDown,@@ -122,7 +119,6 @@ import {IconPin,IconPencil,IconSidebar,- IconSettings,IconStar,IconTrash,IconX,@@ -240,6 +236,7 @@ function compareOptionalDate(export function Sidebar({onToggleSidebar,+ onNewTask,sidebarToggleShortcut,sidebarWidth,widthMax = SIDEBAR_WIDTH_MAX,@@ -250,6 +247,7 @@ export function Sidebar({onAnimationEnd,}: {onToggleSidebar: () => void;+ onNewTask: () => void;sidebarToggleShortcut: string;sidebarWidth: number;widthMax?: number;@@ -276,8 +274,6 @@ export function Sidebar({const sessionOutcomes = useAppStore((s) => s.sessionOutcomes);const pendingPermissions = useAppStore((s) => s.pendingPermissions);const setPage = useAppStore((s) => s.setPage);- const navBack = useAppStore((s) => s.navBack);- const canNavBack = useAppStore((s) => s.canNavBack);const page = useAppStore((s) => s.page);const settings = useAppStore((s) => s.settings);// Project headers must answer "is anything running under here?" while the@@ -308,10 +304,6 @@ export function Sidebar({const setProjectSort = useAppStore((s) => s.setProjectSort);const reorderProjects = useAppStore((s) => s.reorderProjects);const showToast = useAppStore((s) => s.showToast);- const version = useAppStore((s) => s.version);- const setSettingsTab = useAppStore((s) => s.setSettingsTab);- const setSettingsAnchor = useAppStore((s) => s.setSettingsAnchor);- const update = useUpdateState();const [sortOpen, setSortOpen] = useState(false);const [sessionMenu, setSessionMenu] = useState<string | null>(null);@@ -667,21 +659,6 @@ export function Sidebar({sortOpen,]);- // An update only earns the accent dot once it is actionable — a pending- // check or a failed one keeps the chip quiet.- const updateReady =- update?.status === "available" || update?.status === "downloaded";- const appVersion = update?.currentVersion || version?.version || "";- const buildLabel = updateReady- ? `v${update?.availableVersion ?? appVersion}`- : update?.status === "checking"- ? t("updates.checking")- : appVersion- ? `v${appVersion}`- : t("nav.buildUnknown");- const buildTitle = updateReady- ? t("updates.available", { version: update?.availableVersion ?? "" })- : t("nav.checkForUpdates");const taskTitle = useCallback((title?: string | null) => {const value = (title || "").trim();return isDefaultSessionTitle(value) ? t("chat.untitledTask") : value;@@ -2600,6 +2577,7 @@ export function Sidebar({</div><div className="sidebar-body no-drag">+ <SidebarPrimaryNav onNewTask={onNewTask} onBeforeNavigate={() => closeMenus(false)} />{pinnedSessions.length > 0 ? (<section@@ -2763,71 +2741,7 @@ export function Sidebar({})} /></div>- <div className="sidebar-footer no-drag">- <div className="footer-actions">- <TooltipButton- type="button"- className={`footer-action ${page === "settings" ? "active" : ""}`}- data-nav="settings"- tooltip={t("nav.settings")}- ariaLabel={t("nav.settings")}- onClick={() => setPage("settings")}- aria-pressed={page === "settings"}- >- <IconSettings size={14} aria-hidden />- </TooltipButton>- <TooltipButton- type="button"- className={`footer-action ${page === "plugins" ? "active" : ""}`}- data-nav="plugins"- tooltip={t("nav.plugins")}- ariaLabel={t("nav.plugins")}- onClick={() => page === "plugins"- ? (canNavBack() ? navBack() : setPage("chat"))- : setPage("plugins")}- aria-pressed={page === "plugins"}- >- <IconPlug size={14} aria-hidden />- </TooltipButton>- {settings?.scheduledTasksEnabled !== false && (- <TooltipButton- type="button"- className={`footer-action ${page === "scheduled" ? "active" : ""}`}- data-nav="scheduled"- tooltip={t("scheduled.title")}- ariaLabel={t("scheduled.title")}- onClick={() => setPage("scheduled")}- aria-pressed={page === "scheduled"}- >- <IconClock size={14} aria-hidden />- </TooltipButton>- )}- <NotificationCenter onBeforeOpen={() => closeMenus(false)} />- </div>-- <TooltipButton- type="button"- className={`footer-build ${updateReady ? "has-update" : ""}`}- data-nav="build"- tooltip={buildTitle}- ariaLabel={buildTitle}- onClick={() => {- if (updateReady) {- setSettingsAnchor("updates.title");- setSettingsTab("about");- return;- }- void (async () => {- try {- await api.updatesCheck();- } catch { /* ignore */ }- })();- }}- >- <span className="footer-build-version">{buildLabel}</span>- {updateReady ? <span className="footer-build-dot" aria-hidden /> : null}- </TooltipButton>- </div>+ <SidebarFooter /></div>{renderFloatingMenu()}{sessionHoverCard ? (diff --git a/apps/desktop/src/components/SidebarNavigation.tsx b/apps/desktop/src/components/SidebarNavigation.tsxnew file mode 100644index 000000000..9518e2370--- /dev/null+++ b/apps/desktop/src/components/SidebarNavigation.tsx@@ -0,0 +1,151 @@+import { useTranslation } from "react-i18next";+import { useUpdateState } from "../hooks/use-update-state";+import { api } from "../lib/api";+import { usePluginBrowseState } from "../features/plugins/browse-state";+import { useAppStore } from "../stores/app-store";+import { IconClock, IconNewSession, IconPlug, IconSettings } from "./icons";+import { cx, TooltipButton } from "./ui";++/**+ * The sidebar's primary destinations, above the session lists: start a new+ * task, the Scheduled page and the plugin marketplace. Labelled rows rather+ * than footer icons, so each destination reads without a tooltip.+ */+export function SidebarPrimaryNav({+ onNewTask,+ onBeforeNavigate,+}: {+ onNewTask: () => void;+ /** Dismiss sidebar-owned menus before the destination changes. */+ onBeforeNavigate?: () => void;+}) {+ const { t } = useTranslation();+ const page = useAppStore((s) => s.page);+ const setPage = useAppStore((s) => s.setPage);+ const navBack = useAppStore((s) => s.navBack);+ const canNavBack = useAppStore((s) => s.canNavBack);+ const scheduledTasksEnabled = useAppStore(+ (s) => s.settings?.scheduledTasksEnabled !== false,+ );+ const openPluginMarket = () => {+ usePluginBrowseState.getState().setTab("market");+ setPage("plugins");+ };++ return (+ <nav className="sidebar-primary-nav" aria-label={t("nav.primary")}>+ <button+ type="button"+ className="sidebar-primary-item"+ data-nav="new-task"+ onClick={() => {+ onBeforeNavigate?.();+ onNewTask();+ }}+ >+ <IconNewSession size={15} aria-hidden />+ <span className="sidebar-primary-label">{t("nav.newTask")}</span>+ </button>+ {scheduledTasksEnabled && (+ <button+ type="button"+ className={cx("sidebar-primary-item", page === "scheduled" && "active")}+ data-nav="scheduled"+ aria-current={page === "scheduled" ? "page" : undefined}+ onClick={() => {+ onBeforeNavigate?.();+ setPage("scheduled");+ }}+ >+ <IconClock size={15} aria-hidden />+ <span className="sidebar-primary-label">{t("scheduled.title")}</span>+ </button>+ )}+ <button+ type="button"+ className={cx("sidebar-primary-item", page === "plugins" && "active")}+ data-nav="plugins"+ aria-current={page === "plugins" ? "page" : undefined}+ onClick={() => {+ onBeforeNavigate?.();+ // A second activation returns to where the user came from.+ if (page === "plugins") {+ if (canNavBack()) navBack();+ else setPage("chat");+ return;+ }+ openPluginMarket();+ }}+ >+ <IconPlug size={15} aria-hidden />+ <span className="sidebar-primary-label">{t("nav.pluginMarket")}</span>+ </button>+ </nav>+ );+}++/** Footer: Settings on the left, the build/version chip on the right. */+export function SidebarFooter() {+ const { t } = useTranslation();+ const settingsOpen = useAppStore((s) => s.settingsOpen);+ const openSettings = useAppStore((s) => s.openSettings);+ const setSettingsTab = useAppStore((s) => s.setSettingsTab);+ const setSettingsAnchor = useAppStore((s) => s.setSettingsAnchor);+ const version = useAppStore((s) => s.version);+ const update = useUpdateState();++ // An update only earns the accent dot once it is actionable — a pending+ // check or a failed one keeps the chip quiet.+ const updateReady =+ update?.status === "available" || update?.status === "downloaded";+ const appVersion = update?.currentVersion || version?.version || "";+ const buildLabel = updateReady+ ? `v${update?.availableVersion ?? appVersion}`+ : update?.status === "checking"+ ? t("updates.checking")+ : appVersion+ ? `v${appVersion}`+ : t("nav.buildUnknown");+ const buildTitle = updateReady+ ? t("updates.available", { version: update?.availableVersion ?? "" })+ : t("nav.checkForUpdates");++ return (+ <div className="sidebar-footer no-drag">+ <button+ type="button"+ className={cx("footer-settings", settingsOpen && "active")}+ data-nav="settings"+ aria-haspopup="dialog"+ aria-expanded={settingsOpen}+ onClick={() => openSettings()}+ >+ <IconSettings size={15} aria-hidden />+ <span>{t("nav.settings")}</span>+ </button>++ <TooltipButton+ type="button"+ className={`footer-build ${updateReady ? "has-update" : ""}`}+ data-nav="build"+ tooltip={buildTitle}+ ariaLabel={buildTitle}+ onClick={() => {+ if (updateReady) {+ setSettingsAnchor("updates.title");+ setSettingsTab("about");+ return;+ }+ void (async () => {+ try {+ await api.updatesCheck();+ } catch { /* ignore */ }+ })();+ }}+ >+ <span className="footer-build-version">{buildLabel}</span>+ {updateReady ? <span className="footer-build-dot" aria-hidden /> : null}+ </TooltipButton>+ </div>+ );+}diff --git a/apps/desktop/src/features/app/AppShell.tsx b/apps/desktop/src/features/app/AppShell.tsxindex 4767aea0e..af38c41cd 100644--- a/apps/desktop/src/features/app/AppShell.tsx+++ b/apps/desktop/src/features/app/AppShell.tsx@@ -26,17 +26,12 @@ import { WindowControls } from "../../components/WindowControls";import { useCopyTex } from "../../hooks/use-copy-tex";import { api } from "../../lib/api";import { installMaximizedWindowChrome } from "../../lib/maximized-window-chrome";-import { PortalVisibilityProvider } from "../../lib/portal-visibility";import { workPanelLayout } from "../../lib/work-panel-resize";import { LiveVoiceStatusHost } from "../voice/live/LiveVoiceStatusHost";+import { AppOverlayHost } from "../startup/AppOverlayHost";import { CollapsedTitlebarActions, RoutePending } from "./chrome";import { useAppShellRuntime } from "./useAppShellRuntime";-const SettingsPage = lazy(() =>- import("../../pages/SettingsPage").then((module) => ({- default: module.SettingsPage,- })),-);const ScheduledPage = lazy(() =>import("../../pages/ScheduledPage").then((module) => ({default: module.ScheduledPage,@@ -147,220 +142,210 @@ export function AppShell() {if (ready) {shell = (<>- <PortalVisibilityProvider visible={page !== "settings"}>- <div- className="app-chat-shell"- hidden={page === "settings"}- inert={page === "settings" ? true : undefined}- >- {!sidebarCollapsed || sidebarExiting ? (- <Sidebar- className={cx(sidebarEntering && "is-entering", sidebarExiting && "is-exiting")}- onAnimationEnd={handleSidebarAnimationEnd}- onToggleSidebar={toggleSidebar}- sidebarToggleShortcut={sidebarToggleShortcut}- sidebarWidth={sidebarWidth}- widthMax={sidebarWidthMax}- onWidthChange={handleSidebarWidthChange}- onWidthCommit={handleSidebarWidthCommit}- onResizeCollapse={handleSidebarResizeCollapse}- />- ) : null}-- {workPanelMaximized && (- /* MainChat is absent; the panel header owns dragging while this- pass-through row keeps the shell controls available. */- <div- className={cx(- "window-chrome-row",- !sidebarCollapsed && "sidebar-expanded",- )}- >- {sidebarCollapsed && (- <CollapsedTitlebarActions- onToggleSidebar={toggleSidebar}- onNewTask={() => void runMenuCommand("newTask")}- sidebarToggleShortcut={sidebarToggleShortcut}- />- )}- {!sidebarCollapsed && (- <TooltipButton- type="button"- className="title-nav-btn"- tooltip={t("nav.newTask")}- ariaLabel={t("nav.newTask")}- data-nav="new-task"- onClick={() => void runMenuCommand("newTask")}- >- <IconNewSession size={15} />- </TooltipButton>- )}- <div className="window-chrome-drag" aria-hidden />- </div>- )}+ <div className="app-chat-shell">+ {!sidebarCollapsed || sidebarExiting ? (+ <Sidebar+ className={cx(sidebarEntering && "is-entering", sidebarExiting && "is-exiting")}+ onAnimationEnd={handleSidebarAnimationEnd}+ onToggleSidebar={toggleSidebar}+ onNewTask={() => void runMenuCommand("newTask")}+ sidebarToggleShortcut={sidebarToggleShortcut}+ sidebarWidth={sidebarWidth}+ widthMax={sidebarWidthMax}+ onWidthChange={handleSidebarWidthChange}+ onWidthCommit={handleSidebarWidthCommit}+ onResizeCollapse={handleSidebarResizeCollapse}+ />+ ) : null}- {!workPanelMaximized && (- <section ref={setToastAnchor} className="main-pane">- {page === "chat" ? (- <ConversationTopbar- sidebarCollapsed={sidebarCollapsed}- workPanelOpen={presentedWorkPanelOpen}- onToggleSidebar={toggleSidebar}- onNewTask={() => void runMenuCommand("newTask")}- onOpenSearch={() => setSearchOpen(true)}- />- ) : (- <div- className={cx(- "main-titlebar",- presentedWorkPanelOpen && "work-panel-open",- )}- >- {sidebarCollapsed && (- <div className="main-titlebar-left no-drag">- <CollapsedTitlebarActions- onToggleSidebar={reopenSidebar}- onNewTask={() => void runMenuCommand("newTask")}- sidebarToggleShortcut={sidebarToggleShortcut}- />- </div>- )}- </div>- )}- {page !== "settings" ? <UpdateBanner /> : null}+ {workPanelMaximized && (+ /* MainChat is absent; the panel header owns dragging while this+ pass-through row keeps the shell controls available. */+ <div+ className={cx(+ "window-chrome-row",+ !sidebarCollapsed && "sidebar-expanded",+ )}+ >+ {sidebarCollapsed && (+ <CollapsedTitlebarActions+ onToggleSidebar={toggleSidebar}+ onNewTask={() => void runMenuCommand("newTask")}+ sidebarToggleShortcut={sidebarToggleShortcut}+ />+ )}+ {!sidebarCollapsed && (+ <TooltipButton+ type="button"+ className="title-nav-btn"+ tooltip={t("nav.newTask")}+ ariaLabel={t("nav.newTask")}+ data-nav="new-task"+ onClick={() => void runMenuCommand("newTask")}+ >+ <IconNewSession size={15} />+ </TooltipButton>+ )}+ <div className="window-chrome-drag" aria-hidden />+ </div>+ )}- {backendDown && (- <div- className={`backend-banner no-drag ${backendDown.fatal ? "fatal" : "warn"}`}- role="status"- >- <span className="backend-dot" aria-hidden />- <span>- {backendDown.fatal- ? backendDown.message === "GLIBC_UNSUPPORTED"- ? t("status.unsupportedGlibc")- : backendDown.message === "DB_SCHEMA_TOO_NEW"- ? t("status.dbSchemaTooNew", {- found: backendDown.schema?.found ?? "?",- supported: backendDown.schema?.supported ?? "?",- })- : t("status.fatal")- : t("status.restarting")}- </span>- {backendDown.fatal && (- <button- type="button"- className="backend-action"- onClick={() => void api.openLogs()}- >- {t("status.openLogs")}- </button>- )}- </div>- )}+ {!workPanelMaximized && (+ <section ref={setToastAnchor} className="main-pane">+ {page === "chat" ? (+ <ConversationTopbar+ sidebarCollapsed={sidebarCollapsed}+ workPanelOpen={presentedWorkPanelOpen}+ onToggleSidebar={toggleSidebar}+ onNewTask={() => void runMenuCommand("newTask")}+ onOpenSearch={() => setSearchOpen(true)}+ />+ ) : (+ <div+ className={cx(+ "main-titlebar",+ presentedWorkPanelOpen && "work-panel-open",+ )}+ >+ {sidebarCollapsed && (+ <div className="main-titlebar-left no-drag">+ <CollapsedTitlebarActions+ onToggleSidebar={reopenSidebar}+ onNewTask={() => void runMenuCommand("newTask")}+ sidebarToggleShortcut={sidebarToggleShortcut}+ />+ </div>+ )}+ </div>+ )}+ <UpdateBanner />- {archMismatch && (- <div className="backend-banner no-drag warn" role="status">- <span className="backend-dot" aria-hidden />- <span>- {t("status.archMismatch", {- buildArch: t(- `status.archNames.${archMismatch.platform}.${archMismatch.processArch}`,- { defaultValue: archMismatch.processArch },- ),- machineArch: t(- `status.archNames.${archMismatch.platform}.${archMismatch.machineArch}`,- { defaultValue: archMismatch.machineArch },- ),- })}- </span>+ {backendDown && (+ <div+ className={`backend-banner no-drag ${backendDown.fatal ? "fatal" : "warn"}`}+ role="status"+ >+ <span className="backend-dot" aria-hidden />+ <span>+ {backendDown.fatal+ ? backendDown.message === "GLIBC_UNSUPPORTED"+ ? t("status.unsupportedGlibc")+ : backendDown.message === "DB_SCHEMA_TOO_NEW"+ ? t("status.dbSchemaTooNew", {+ found: backendDown.schema?.found ?? "?",+ supported: backendDown.schema?.supported ?? "?",+ })+ : t("status.fatal")+ : t("status.restarting")}+ </span>+ {backendDown.fatal && (<buttontype="button"className="backend-action"- onClick={() => setArchMismatch(null)}+ onClick={() => void api.openLogs()}>- {t("status.dismissArchMismatch")}+ {t("status.openLogs")}</button>- </div>- )}-- <Suspense fallback={<RoutePending />}>- {page === "scheduled" ? (- <div className="route-surface route-page">- <ScheduledPage />- </div>- ) : page === "plugins" ? (- <div className="route-surface route-page">- <PluginsPage />- </div>- ) : (- <ChatSurface visible={page === "chat"} />)}- </Suspense>- </section>- )}+ </div>+ )}- {(presentedWorkPanelOpen || workPanelExiting) && (- <Suspense- fallback={- <aside- className="work-panel work-panel-pending"- role="status"- aria-label={t("app.loadingView")}- style={- {- "--work-panel-width": `${pendingWorkPanelWidth}px`,- } as CSSProperties- }+ {archMismatch && (+ <div className="backend-banner no-drag warn" role="status">+ <span className="backend-dot" aria-hidden />+ <span>+ {t("status.archMismatch", {+ buildArch: t(+ `status.archNames.${archMismatch.platform}.${archMismatch.processArch}`,+ { defaultValue: archMismatch.processArch },+ ),+ machineArch: t(+ `status.archNames.${archMismatch.platform}.${archMismatch.machineArch}`,+ { defaultValue: archMismatch.machineArch },+ ),+ })}+ </span>+ <button+ type="button"+ className="backend-action"+ onClick={() => setArchMismatch(null)}>- <span className="route-pending-indicator" aria-hidden />- </aside>- }- >- <WorkPanel- panelBlocked={searchOpen}- exiting={workPanelExiting}- onExitAnimationEnd={() =>- finishWorkPanelExit(workPanelExitGeneration.current)- }- containerWidth={shellWidth}- sidebarWidth={sidebarWidth}- sidebarCollapsed={sidebarCollapsed}- sidebarExiting={sidebarExiting}- onAutoCollapseSidebar={autoCollapseSidebar}- maximized={workPanelMaximized}- onToggleMaximize={toggleWorkPanelMaximize}- />+ {t("status.dismissArchMismatch")}+ </button>+ </div>+ )}++ <Suspense fallback={<RoutePending />}>+ {page === "scheduled" ? (+ <div className="route-surface route-page">+ <ScheduledPage />+ </div>+ ) : page === "plugins" ? (+ <div className="route-surface route-page">+ <PluginsPage />+ </div>+ ) : (+ <ChatSurface visible={page === "chat"} />+ )}</Suspense>- )}+ </section>+ )}- <TooltipButton- type="button"- className="app-work-panel-toggle no-drag"- tooltip={workPanelToggleTooltip}- ariaLabel={workPanelToggleTooltip}- aria-pressed={workPanelOpen || presentedWorkPanelOpen}- disabled={!activeSessionId && !presentedWorkPanelOpen && !workPanelExiting}- onClick={togglePresentedWorkPanel}+ {(presentedWorkPanelOpen || workPanelExiting) && (+ <Suspense+ fallback={+ <aside+ className="work-panel work-panel-pending"+ role="status"+ aria-label={t("app.loadingView")}+ style={+ {+ "--work-panel-width": `${pendingWorkPanelWidth}px`,+ } as CSSProperties+ }+ >+ <span className="route-pending-indicator" aria-hidden />+ </aside>+ }>- <span className="app-work-panel-toggle-icon" aria-hidden>- <IconPanel size={15} />- <IconPanelOpen size={15} />- </span>- </TooltipButton>- </div>- </PortalVisibilityProvider>- {page === "settings" ? (- <Suspense fallback={<RoutePending />}>- <SettingsPage />- </Suspense>- ) : null}+ <WorkPanel+ panelBlocked={searchOpen}+ exiting={workPanelExiting}+ onExitAnimationEnd={() =>+ finishWorkPanelExit(workPanelExitGeneration.current)+ }+ containerWidth={shellWidth}+ sidebarWidth={sidebarWidth}+ sidebarCollapsed={sidebarCollapsed}+ sidebarExiting={sidebarExiting}+ onAutoCollapseSidebar={autoCollapseSidebar}+ maximized={workPanelMaximized}+ onToggleMaximize={toggleWorkPanelMaximize}+ />+ </Suspense>+ )}++ <TooltipButton+ type="button"+ className="app-work-panel-toggle no-drag"+ tooltip={workPanelToggleTooltip}+ ariaLabel={workPanelToggleTooltip}+ aria-pressed={workPanelOpen || presentedWorkPanelOpen}+ disabled={!activeSessionId && !presentedWorkPanelOpen && !workPanelExiting}+ onClick={togglePresentedWorkPanel}+ >+ <span className="app-work-panel-toggle-icon" aria-hidden>+ <IconPanel size={15} />+ <IconPanelOpen size={15} />+ </span>+ </TooltipButton>+ </div>+ <AppOverlayHost active={!showSplash} /><SearchDialog open={searchOpen} onClose={() => setSearchOpen(false)} />- <ToastHost anchorElement={page === "settings" ? null : toastAnchor} />+ <ToastHost anchorElement={toastAnchor} /><LiveVoiceStatusHost /><PluginRendererHost /><ExtensionPromptHost />- {page === "settings" ? <UpdateBanner /> : null}</>);}@@ -371,7 +356,6 @@ export function AppShell() {className={cx("app-shell",!ready && "app-shell-boot",- page === "settings" && ready && "settings-mode",sidebarCollapsed && "sidebar-collapsed",workPanelMaximized && "work-panel-maximized",showSplash && "is-booting",diff --git a/apps/desktop/src/features/app/useAppShellRuntime.tsx b/apps/desktop/src/features/app/useAppShellRuntime.tsxindex 18df5716d..1d9c19b80 100644--- a/apps/desktop/src/features/app/useAppShellRuntime.tsx+++ b/apps/desktop/src/features/app/useAppShellRuntime.tsx@@ -117,7 +117,7 @@ export function useAppShellRuntime() {const [sidebarWidth, setSidebarWidth] = useState(() => loadSidebarWidth());const { sidebarEntering, sidebarExiting, handleSidebarAnimationEnd } = useSidebarTransition(sidebarCollapsed,- ready && page !== "settings",+ ready,);const [shellWidth, setShellWidth] = useState(0);const appShellRef = useRef<HTMLDivElement>(null);@@ -349,8 +349,7 @@ export function useAppShellRuntime() {}, []);useEffect(() => {- const pageHidesWorkPanel =- page === "settings" || page === "plugins" || page === "scheduled";+ const pageHidesWorkPanel = page === "plugins" || page === "scheduled";const shouldPresent =ready && !pageHidesWorkPanel && workPanelOpen;const request = ++workPanelReservationRequest.current;@@ -425,6 +424,7 @@ export function useAppShellRuntime() {switch (command) {case "newTask":if (workPanelMaximizedRef.current) setWorkPanelMaximized(false);+ store.closeSettings();await store.newSession();requestAnimationFrame(() =>document.querySelector<HTMLTextAreaElement>(".composer-input")?.focus(),@@ -945,7 +945,7 @@ export function useAppShellRuntime() {break;case "openWorkPanel": {const p = useAppStore.getState().page;- if (p !== "settings" && p !== "plugins" && p !== "scheduled") {+ if (p !== "plugins" && p !== "scheduled") {useAppStore.getState().toggleWorkPanel();}break;diff --git a/apps/desktop/src/features/chat/transcript/GeneratedImages.tsx b/apps/desktop/src/features/chat/transcript/GeneratedImages.tsxindex 020ed10e9..c7f54683f 100644--- a/apps/desktop/src/features/chat/transcript/GeneratedImages.tsx+++ b/apps/desktop/src/features/chat/transcript/GeneratedImages.tsx@@ -88,7 +88,6 @@ export function GeneratedImages({ message }: { message: UiMessage }) {const state = useAppStore.getState();state.setSettingsTab("agent");state.setSettingsAnchor("settings.imageModel");- state.setPage("settings");}}>{t("settings.configureImageModel")}diff --git a/apps/desktop/src/features/chat/transcript/shared.tsx b/apps/desktop/src/features/chat/transcript/shared.tsxindex 3f9400317..747d594e5 100644--- a/apps/desktop/src/features/chat/transcript/shared.tsx+++ b/apps/desktop/src/features/chat/transcript/shared.tsx@@ -311,7 +311,6 @@ export function AssistantErrorMessage({ message }: { message: UiMessage }) {className="copy-btn"onClick={() => {useAppStore.getState().setSettingsTab("agent");- useAppStore.getState().setPage("settings");}}>{t("errors.action.openSettings")}diff --git a/apps/desktop/src/features/settings/SettingsDestinationContent.tsx b/apps/desktop/src/features/settings/SettingsDestinationContent.tsxnew file mode 100644index 000000000..4c25b6722--- /dev/null+++ b/apps/desktop/src/features/settings/SettingsDestinationContent.tsx@@ -0,0 +1,140 @@+import { useTranslation } from "react-i18next";+import type { ShortcutPlatform } from "@pi-desktop/shared";+import type { useAppStore } from "../../stores/app-store";+import { Button } from "../../components/ui";+import { ModelConfigPage } from "../../components/settings/ModelConfigPage";+import { KeyboardShortcutsSection } from "../../components/settings/KeyboardShortcutsSection";+import { ProjectsPage } from "../../pages/ProjectsPage";+import { AgentSkillsPage } from "../../components/settings/AgentSkillsPage";+import { AgentMcpPage } from "../../components/settings/AgentMcpPage";+import { AgentSubagentsPage } from "../../components/settings/AgentSubagentsPage";+import { RemoteHostsPage } from "../../components/settings/RemoteHostsPage";+import { ConfigSyncPage } from "../../components/settings/ConfigSyncPage";+import { VoiceSettingsSection } from "./voice/VoiceSettingsSection";+import { AgentInstructionsSection } from "./agent-sections";+import { AboutSettings } from "./pages/AboutSettings";+import { AgentBehaviorSettings } from "./pages/AgentBehaviorSettings";+import { AppearanceSettings } from "./pages/AppearanceSettings";+import { ConversationSettings } from "./pages/ConversationSettings";+import { SystemSettings } from "./pages/SystemSettings";+import { ModesSettingsPage } from "../modes/ModesSettingsPage";+import { useSettingsPersistence } from "./useSettingsPersistence";++export type SettingsTab = ReturnType<typeof useAppStore.getState>["settingsTab"];++/** Destinations whose rows edit the app settings snapshot directly. */+const SETTINGS_BACKED_TABS: ReadonlySet<SettingsTab> = new Set<SettingsTab>([+ "appearance",+ "chat",+ "behavior",+ "system",+ "shortcuts",+ "agent",+]);++/**+ * One built-in Settings destination, without the dialog's rail or header.+ * Settings renders it for the selected tab; other surfaces (the startup+ * guide) embed a single destination the same way, so a row behaves+ * identically wherever it appears.+ */+export function SettingsDestinationContent({+ tab,+ tabHidden = false,+}: {+ tab: SettingsTab;+ /** The destination is hidden in this build/mode and must not render. */+ tabHidden?: boolean;+}) {+ const { t } = useTranslation();+ const { settings, saveSettings, recovering, recoveryFailed, recoverSettings } =+ useSettingsPersistence();+ const platform = (window.piDesktop?.platform ?? "darwin") as ShortcutPlatform;+ const tabNeedsSettings = SETTINGS_BACKED_TABS.has(tab);++ return (+ <>+ {tabNeedsSettings && !settings ? (+ <div className="settings-recovery" role="status" aria-live="polite">+ {recovering ? (+ <>+ <span className="route-pending-indicator" aria-hidden />+ <span>{t("common.loading")}</span>+ </>+ ) : recoveryFailed ? (+ <>+ <span>{t("errors.HOST_UNAVAILABLE")}</span>+ <Button variant="secondary" onClick={() => void recoverSettings()}>+ {t("errors.action.retry")}+ </Button>+ </>+ ) : null}+ </div>+ ) : null}++ {tab === "appearance" && settings && (+ <AppearanceSettings+ settings={settings}+ saveSettings={saveSettings}+ platform={platform}+ />+ )}++ {tab === "chat" && settings && (+ <ConversationSettings settings={settings} saveSettings={saveSettings} />+ )}++ {tab === "behavior" && settings && (+ <AgentBehaviorSettings settings={settings} saveSettings={saveSettings} />+ )}++ {tab === "system" && settings && (+ <SystemSettings+ settings={settings}+ saveSettings={saveSettings}+ platform={platform}+ />+ )}++ {tab === "voice" && !tabHidden && settings && (+ <VoiceSettingsSection+ t={t}+ settings={settings}+ saveSettings={saveSettings}+ />+ )}++ {tab === "shortcuts" && settings && (+ <div className="settings-stack">+ <KeyboardShortcutsSection+ settings={settings}+ platform={platform}+ saveSettings={saveSettings}+ />+ </div>+ )}++ {tab === "agent" && <ModelConfigPage />}++ {tab === "skills" && <AgentSkillsPage />}++ {tab === "mcp" && <AgentMcpPage />}++ {tab === "subagents" && <AgentSubagentsPage />}++ {tab === "modes" && <ModesSettingsPage />}++ {tab === "instructions" && <AgentInstructionsSection />}++ {tab === "projects" && <ProjectsPage />}++ {tab === "sync" && !tabHidden && <ConfigSyncPage />}++ {tab === "remoteHosts" && !tabHidden && <RemoteHostsPage />}++ {tab === "about" && (+ <AboutSettings settings={settings ?? null} saveSettings={saveSettings} />+ )}+ </>+ );+}diff --git a/apps/desktop/src/features/settings/SettingsDialog.tsx b/apps/desktop/src/features/settings/SettingsDialog.tsxnew file mode 100644index 000000000..9fcb5fd67--- /dev/null+++ b/apps/desktop/src/features/settings/SettingsDialog.tsx@@ -0,0 +1,47 @@+import { useRef } from "react";+import { useTranslation } from "react-i18next";+import { IconClose } from "../../components/icons";+import { OverlayBackdrop, portalOverlay, TooltipButton } from "../../components/ui";+import { useModalDialog } from "../../lib/use-modal-dialog";+import { SettingsPage } from "./SettingsPage";++/**+ * Settings as a modal dialog over the current page. The rail, search and+ * destinations are the same `SettingsPage`; only the frame is modal.+ */+export function SettingsDialog({ onClose }: { onClose: () => void }) {+ const { t } = useTranslation();+ const dialogRef = useRef<HTMLDivElement | null>(null);+ useModalDialog(dialogRef, { onClose });++ return portalOverlay(+ <OverlayBackdrop+ className="overlay settings-dialog-overlay"+ role="presentation"+ onClick={(event) => {+ if (event.target === event.currentTarget) onClose();+ }}+ >+ <div+ ref={dialogRef}+ className="dialog settings-dialog"+ role="dialog"+ aria-modal="true"+ aria-label={t("settings.title")}+ data-surface="settings-dialog"+ >+ <SettingsPage />+ <TooltipButton+ type="button"+ className="icon-btn settings-dialog-close"+ data-nav="close-settings"+ tooltip={t("settings.close")}+ ariaLabel={t("settings.close")}+ onClick={onClose}+ >+ <IconClose size={16} />+ </TooltipButton>+ </div>+ </OverlayBackdrop>,+ );+}diff --git a/apps/desktop/src/features/settings/SettingsPage.tsx b/apps/desktop/src/features/settings/SettingsPage.tsxindex 65245c705..526689935 100644--- a/apps/desktop/src/features/settings/SettingsPage.tsx+++ b/apps/desktop/src/features/settings/SettingsPage.tsx@@ -1,9 +1,8 @@-import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type ReactNode } from "react";+import { useEffect, useLayoutEffect, useMemo, useRef, useState, type ReactNode } from "react";import { useTranslation } from "react-i18next";import type {AppSettings,PluginScenicThemesDestinationMeta,- ShortcutPlatform,} from "@pi-desktop/shared";import { useAppStore } from "../../stores/app-store";import { api } from "../../lib/api";@@ -20,7 +19,6 @@ import {IconBookOpen,IconBot,IconChat,- IconChevronLeft,IconFileText,IconGlobe,IconInfo,@@ -35,26 +33,10 @@ import {IconMic,IconWorkflow,} from "../../components/icons";-import { Badge, Button, cx } from "../../components/ui";-import { ModelConfigPage } from "../../components/settings/ModelConfigPage";-import { KeyboardShortcutsSection } from "../../components/settings/KeyboardShortcutsSection";-import { ProjectsPage } from "../../pages/ProjectsPage";-import { AgentSkillsPage } from "../../components/settings/AgentSkillsPage";-import { AgentMcpPage } from "../../components/settings/AgentMcpPage";-import { AgentSubagentsPage } from "../../components/settings/AgentSubagentsPage";-import { RemoteHostsPage } from "../../components/settings/RemoteHostsPage";-import { VoiceSettingsSection } from "./voice/VoiceSettingsSection";-import { AgentInstructionsSection } from "./agent-sections";+import { Badge, cx } from "../../components/ui";import { PluginScenicThemesDestination } from "../../components/settings/PluginScenicThemesDestination";-import { ConfigSyncPage } from "../../components/settings/ConfigSyncPage";-import { AboutSettings } from "./pages/AboutSettings";-import { AgentBehaviorSettings } from "./pages/AgentBehaviorSettings";-import { AppearanceSettings } from "./pages/AppearanceSettings";-import { ConversationSettings } from "./pages/ConversationSettings";-import { SystemSettings } from "./pages/SystemSettings";-import { ModesSettingsPage } from "../modes/ModesSettingsPage";--type SettingsTab = ReturnType<typeof useAppStore.getState>["settingsTab"];+import { SettingsDestinationContent, type SettingsTab } from "./SettingsDestinationContent";+import { useSettingsPersistence } from "./useSettingsPersistence";type NavItem = {id: SettingsTab;@@ -68,6 +50,11 @@ type NavItem = {keywordKeys: string[];};+/**+ * Settings rail + destination content. Hosted by the Settings dialog; each+ * destination body comes from `SettingsDestinationContent` so other surfaces+ * can embed one destination without the rail.+ */export function SettingsPage() {const { t } = useTranslation();const tab = useAppStore((s) => s.settingsTab);@@ -75,10 +62,7 @@ export function SettingsPage() {const settingsAnchor = useAppStore((s) => s.settingsAnchor);const settingsTabNonce = useAppStore((s) => s.settingsTabNonce);const setSettingsAnchor = useAppStore((s) => s.setSettingsAnchor);- const setPage = useAppStore((s) => s.setPage);- const settings = useAppStore((s) => s.settings);- const refreshProviders = useAppStore((s) => s.refreshProviders);- const platform = (window.piDesktop?.platform ?? "darwin") as ShortcutPlatform;+ const { settings, saveSettings } = useSettingsPersistence();// Experimental feature surfaces remain available in development builds only.const includeDevelopmentOnly = import.meta.env.DEV;@@ -94,8 +78,6 @@ export function SettingsPage() {);const [query, setQuery] = useState("");- const [recoveringSettings, setRecoveringSettings] = useState(!settings);- const [settingsRecoveryFailed, setSettingsRecoveryFailed] = useState(false);const [extensions, setExtensions] = useState<PluginScenicThemesDestinationMeta[]>([]);const [activeExtension, setActiveExtension] = useState<PluginScenicThemesDestinationMeta | null>(null);const seenSettingsTabNonce = useRef(settingsTabNonce);@@ -143,24 +125,6 @@ export function SettingsPage() {setSettingsTab(DEFAULT_SETTINGS_TAB);}, [settings, tabHidden, setSettingsTab]);- const recoverSettings = useCallback(async () => {- setRecoveringSettings(true);- setSettingsRecoveryFailed(false);- try {- const recovered = await api.getSettings();- useAppStore.setState({ settings: recovered });- } catch {- setSettingsRecoveryFailed(true);- } finally {- setRecoveringSettings(false);- }- }, []);-- useEffect(() => {- if (settings) return;- void recoverSettings();- }, [settings, recoverSettings]);-// Arriving from the global search dialog: scroll to and flash the row// whose title matches the pending anchor key. This runs after the// destination reset and before paint, so a category change does not flash@@ -204,14 +168,6 @@ export function SettingsPage() {};}, [settingsAnchor, tab, t, setSettingsAnchor]);- const saveSettings = async (patch: Partial<AppSettings>) => {- if (!settings) return;- const nextSettings = { ...settings, ...patch };- await api.setSettings(nextSettings);- useAppStore.setState({ settings: nextSettings });- await refreshProviders();- };-const selectPluginTheme = async (theme: string) => {await saveSettings({ theme: theme as AppSettings["theme"] });};@@ -278,14 +234,12 @@ export function SettingsPage() {const activeNavItem = navItems.find((item) => item.id === tab);const activeTitleKey = activeNavItem?.titleKey ?? "settings.title";- const tabNeedsSettings = ["appearance", "chat", "behavior", "system", "shortcuts", "agent"].includes(tab);return (<div className="settings-shell settings-shell-full">- <div className="settings-titlebar" aria-hidden="true" /><aside className="settings-nav sidebar-surface" aria-label={t("settings.title")}>- <div className="settings-nav-top drag">- <div className="settings-search-wrap no-drag">+ <div className="settings-nav-top">+ <div className="settings-search-wrap"><IconSearch size={14} /><inputref={settingsSearchRef}@@ -301,7 +255,7 @@ export function SettingsPage() {</div></div>- <div className="settings-nav-scroll no-drag">+ <div className="settings-nav-scroll">{filteredGroups.length === 0 ? (<div className="settings-nav-empty">{t("settings.noResults")}</div>) : (@@ -354,20 +308,6 @@ export function SettingsPage() {)}</div>- {/* Pinned to the rail's bottom so it lands on the same line as the- main shell's sidebar footer icon row. Both the band and the control- stay explicitly non-draggable, like the rail's other controls. */}- <div className="settings-nav-footer no-drag">- <button- type="button"- className="settings-back no-drag"- data-nav="back-to-app"- onClick={() => setPage("chat")}- >- <IconChevronLeft size={15} />- <span>{t("settings.backToApp")}</span>- </button>- </div></aside><div className="settings-content" ref={contentRef}>@@ -405,88 +345,7 @@ export function SettingsPage() {<PluginScenicThemesDestination destination={activeExtension} selectTheme={selectPluginTheme} />) : <>- {tabNeedsSettings && !settings ? (- <div className="settings-recovery" role="status" aria-live="polite">- {recoveringSettings ? (- <>- <span className="route-pending-indicator" aria-hidden />- <span>{t("common.loading")}</span>- </>- ) : settingsRecoveryFailed ? (- <>- <span>{t("errors.HOST_UNAVAILABLE")}</span>- <Button variant="secondary" onClick={() => void recoverSettings()}>- {t("errors.action.retry")}- </Button>- </>- ) : null}- </div>- ) : null}-- {tab === "appearance" && settings && (- <AppearanceSettings- settings={settings}- saveSettings={saveSettings}- platform={platform}- />- )}-- {tab === "chat" && settings && (- <ConversationSettings settings={settings} saveSettings={saveSettings} />- )}-- {tab === "behavior" && settings && (- <AgentBehaviorSettings settings={settings} saveSettings={saveSettings} />- )}-- {tab === "system" && settings && (- <SystemSettings- settings={settings}- saveSettings={saveSettings}- platform={platform}- />- )}-- {tab === "voice" && !tabHidden && settings && (- <VoiceSettingsSection- t={t}- settings={settings}- saveSettings={saveSettings}- />- )}-- {tab === "shortcuts" && settings && (- <div className="settings-stack">- <KeyboardShortcutsSection- settings={settings}- platform={platform}- saveSettings={saveSettings}- />- </div>- )}-- {tab === "agent" && <ModelConfigPage />}-- {tab === "skills" && <AgentSkillsPage />}-- {tab === "mcp" && <AgentMcpPage />}-- {tab === "subagents" && <AgentSubagentsPage />}-- {tab === "modes" && <ModesSettingsPage />}-- {tab === "instructions" && <AgentInstructionsSection />}--- {tab === "projects" && <ProjectsPage />}-- {tab === "sync" && !tabHidden && <ConfigSyncPage />}-- {tab === "remoteHosts" && !tabHidden && <RemoteHostsPage />}-- {tab === "about" && (- <AboutSettings settings={settings ?? null} saveSettings={saveSettings} />- )}+ <SettingsDestinationContent tab={tab} tabHidden={tabHidden} /></>}</div>diff --git a/apps/desktop/src/features/settings/pages/AboutSettings.tsx b/apps/desktop/src/features/settings/pages/AboutSettings.tsxindex 24451daa3..9c578a657 100644--- a/apps/desktop/src/features/settings/pages/AboutSettings.tsx+++ b/apps/desktop/src/features/settings/pages/AboutSettings.tsx@@ -11,6 +11,7 @@ import { Button } from "../../../components/ui";import { UpdatesRow } from "../agent-sections";import { DeveloperSection } from "../developer-sections";import { SettingsCard, SettingsRow } from "../primitives";+import { useStartupGuideRequest } from "../../startup/startup-guide-request";export function AboutSettings({settings,@@ -38,6 +39,18 @@ export function AboutSettings({saveSettings={saveSettings}/><SettingsCard>+ <SettingsRow+ title={t("settings.startupGuide")}+ description={t("settings.startupGuideDesc")}+ >+ <Button+ variant="secondary"+ data-action="replay-startup-guide"+ onClick={() => useStartupGuideRequest.getState().request()}+ >+ {t("settings.openStartupGuide")}+ </Button>+ </SettingsRow><SettingsRow title={t("settings.logs")}><Button variant="secondary" onClick={() => void api.openLogs()}>{t("settings.openLogs")}diff --git a/apps/desktop/src/features/settings/useSettingsPersistence.ts b/apps/desktop/src/features/settings/useSettingsPersistence.tsnew file mode 100644index 000000000..b44552eb4--- /dev/null+++ b/apps/desktop/src/features/settings/useSettingsPersistence.ts@@ -0,0 +1,54 @@+import { useCallback, useEffect, useState } from "react";+import type { AppSettings } from "@pi-desktop/shared";+import { api } from "../../lib/api";+import { useAppStore } from "../../stores/app-store";++/**+ * Read and write app settings for any surface that hosts Settings content —+ * the Settings dialog, the startup guide, or another embedding. A missing+ * snapshot (host restarted under the renderer) is re-read once on mount and+ * can be retried by the caller.+ */+export function useSettingsPersistence() {+ const settings = useAppStore((s) => s.settings);+ const refreshProviders = useAppStore((s) => s.refreshProviders);+ const [recovering, setRecovering] = useState(!settings);+ const [recoveryFailed, setRecoveryFailed] = useState(false);++ const recoverSettings = useCallback(async () => {+ setRecovering(true);+ setRecoveryFailed(false);+ try {+ const recovered = await api.getSettings();+ useAppStore.setState({ settings: recovered });+ } catch {+ setRecoveryFailed(true);+ } finally {+ setRecovering(false);+ }+ }, []);++ useEffect(() => {+ if (settings) return;+ void recoverSettings();+ }, [settings, recoverSettings]);++ const saveSettings = useCallback(+ async (patch: Partial<AppSettings>) => {+ if (!settings) return;+ const nextSettings = { ...settings, ...patch };+ await api.setSettings(nextSettings);+ useAppStore.setState({ settings: nextSettings });+ await refreshProviders();+ },+ [settings, refreshProviders],+ );++ return {+ settings,+ saveSettings,+ recovering,+ recoveryFailed,+ recoverSettings,+ };+}diff --git a/apps/desktop/src/features/startup/AnnouncementDialog.tsx b/apps/desktop/src/features/startup/AnnouncementDialog.tsxnew file mode 100644index 000000000..9c4d6aeaa--- /dev/null+++ b/apps/desktop/src/features/startup/AnnouncementDialog.tsx@@ -0,0 +1,116 @@+import { type ComponentProps, useEffect, useMemo, useRef, useState } from "react";+import { useTranslation } from "react-i18next";+import ReactMarkdown, { type Components } from "react-markdown";+import remarkGfm from "remark-gfm";+import { IconClose } from "../../components/icons";+import { Button, OverlayBackdrop, portalOverlay, TooltipButton } from "../../components/ui";+import { api } from "../../lib/api";+import { useModalDialog } from "../../lib/use-modal-dialog";+import {+ type AnnouncementContent,+ loadAnnouncementContent,+} from "./announcements/catalog";++/**+ * Release announcement: a short, plain-language Markdown note (text and+ * local images) bundled with the release. Shown at most once per release,+ * after the startup guide.+ */+export function AnnouncementDialog({+ id,+ onClose,+ onUnavailable,+}: {+ id: string;+ onClose: () => void;+ /** The content could not be loaded; the host drops the announcement. */+ onUnavailable: () => void;+}) {+ const { t, i18n } = useTranslation();+ const dialogRef = useRef<HTMLDivElement | null>(null);+ const [content, setContent] = useState<AnnouncementContent | null>(null);+ const language = i18n.resolvedLanguage ?? i18n.language;+ const onUnavailableRef = useRef(onUnavailable);+ onUnavailableRef.current = onUnavailable;+ useModalDialog(dialogRef, { onClose });++ useEffect(() => {+ let cancelled = false;+ void loadAnnouncementContent(id, language).then(+ (loaded) => {+ if (cancelled) return;+ if (loaded) setContent(loaded);+ else onUnavailableRef.current();+ },+ (error: unknown) => {+ console.error(`Failed to load announcement ${id}`, error);+ if (!cancelled) onUnavailableRef.current();+ },+ );+ return () => {+ cancelled = true;+ };+ }, [id, language]);++ const components = useMemo<Components>(() => ({+ img: ({ node: _node, src, alt, ...rest }: ComponentProps<"img"> & { node?: unknown }) => {+ const resolved = typeof src === "string" ? content?.resolveImage(src) : null;+ if (!resolved) return null;+ return <img {...rest} src={resolved} alt={alt ?? ""} loading="lazy" />;+ },+ a: ({ node: _node, href, children, ...rest }: ComponentProps<"a"> & { node?: unknown }) => (+ <a+ {...rest}+ href={href}+ onClick={(event) => {+ event.preventDefault();+ if (href && /^https:\/\//i.test(href)) void api.browserOpenExternal(href);+ }}+ >+ {children}+ </a>+ ),+ }), [content]);++ return portalOverlay(+ <OverlayBackdrop className="overlay app-announcement-overlay" role="presentation">+ <div+ ref={dialogRef}+ className="dialog app-announcement-dialog"+ role="dialog"+ aria-modal="true"+ aria-labelledby="app-announcement-title"+ data-surface="announcement"+ >+ <header className="app-announcement-header">+ <h2 id="app-announcement-title">{t("announcement.title")}</h2>+ <TooltipButton+ type="button"+ className="icon-btn"+ tooltip={t("announcement.close")}+ ariaLabel={t("announcement.close")}+ onClick={onClose}+ >+ <IconClose size={16} />+ </TooltipButton>+ </header>+ <div className="app-announcement-body prose-chat selectable">+ {content ? (+ <ReactMarkdown remarkPlugins={[remarkGfm]} components={components}>+ {content.markdown}+ </ReactMarkdown>+ ) : (+ <div className="route-pending" role="status" aria-label={t("app.loadingView")}>+ <span className="route-pending-indicator" aria-hidden />+ </div>+ )}+ </div>+ <footer className="app-announcement-footer">+ <Button variant="primary" onClick={onClose}>+ {t("announcement.gotIt")}+ </Button>+ </footer>+ </div>+ </OverlayBackdrop>,+ );+}diff --git a/apps/desktop/src/features/startup/AppOverlayHost.tsx b/apps/desktop/src/features/startup/AppOverlayHost.tsxnew file mode 100644index 000000000..2e2c9ac60--- /dev/null+++ b/apps/desktop/src/features/startup/AppOverlayHost.tsx@@ -0,0 +1,145 @@+import { imageGenerationBindings } from "@pi-desktop/shared";+import { lazy, Suspense, useCallback, useEffect, useMemo, useState } from "react";+import { providerServesChatModels } from "../../components/settings/default-model";+import { useAppStore } from "../../stores/app-store";+import {+ type AnnouncementSchedule,+ announcementShown,+ planStartupGuide,+ resolveAppOverlay,+ shouldShowAnnouncement,+ STARTUP_GUIDE_VERSION,+ startupGuideFor,+ type StartupGuidePlan,+} from "./app-overlay-model";+import {+ loadAnnouncementRecord,+ loadStartupGuideCompletedVersion,+ saveAnnouncementRecord,+ saveStartupGuideCompletedVersion,+} from "./app-overlay-preferences";+import { hasAnnouncementContent, RELEASE_ANNOUNCEMENT } from "./announcements/catalog";+import { useStartupGuideRequest } from "./startup-guide-request";+import type { StartupGuideExit } from "./StartupGuideDialog";++// The dialogs carry the Settings destinations and a Markdown renderer; keep+// them out of the startup bundle until one is actually shown.+const SettingsDialog = lazy(() =>+ import("../settings/SettingsDialog").then((module) => ({ default: module.SettingsDialog })),+);+const StartupGuideDialog = lazy(() =>+ import("./StartupGuideDialog").then((module) => ({ default: module.StartupGuideDialog })),+);+const AnnouncementDialog = lazy(() =>+ import("./AnnouncementDialog").then((module) => ({ default: module.AnnouncementDialog })),+);++/** Whether any configured provider can run a chat model right now. */+function useHasUsableModel(): boolean {+ const providers = useAppStore((s) => s.providers);+ const providerModels = useAppStore((s) => s.providerModels);+ const imageGeneration = useAppStore((s) => s.settings?.imageGeneration);+ const imageGenerationModels = useAppStore((s) => s.settings?.imageGenerationModels);+ return useMemo(() => {+ const images = imageGenerationBindings(imageGenerationModels, imageGeneration);+ return providers.some((provider) =>+ providerServesChatModels(provider, images, providerModels),+ );+ }, [providers, providerModels, imageGeneration, imageGenerationModels]);+}++type ActiveGuide = { plan: StartupGuidePlan; source: "auto" | "manual" };++/**+ * Owns the app-level modal overlays and shows at most one of them, by+ * priority: startup guide > release announcement > Settings. A Settings+ * request made while a higher overlay is up stays pending (`settingsOpen`)+ * and opens once they are gone.+ *+ * The automatic guide and the announcement are decided once, when the shell+ * first becomes interactive (`active`), so the audience cannot change+ * mid-guide. A replay requested from Settings shows the guide for the user's+ * current state and never touches the first-launch marker.+ */+export function AppOverlayHost({ active }: { active: boolean }) {+ const settingsOpen = useAppStore((s) => s.settingsOpen);+ const closeSettings = useAppStore((s) => s.closeSettings);+ const setSettingsTab = useAppStore((s) => s.setSettingsTab);+ const replayRequested = useStartupGuideRequest((s) => s.requested);+ const clearReplay = useStartupGuideRequest((s) => s.clear);+ const hasUsableModel = useHasUsableModel();+ const [decided, setDecided] = useState(false);+ const [guide, setGuide] = useState<ActiveGuide | null>(null);+ const [announcement, setAnnouncement] = useState<AnnouncementSchedule | null>(null);++ useEffect(() => {+ if (!active || decided) return;+ setDecided(true);+ // Screenshot capture drives a fixed scene; first-run hints would cover it.+ if (window.__PI_CAPTURE__) return;+ const plan = planStartupGuide({+ completedVersion: loadStartupGuideCompletedVersion(),+ hasUsableModel,+ });+ if (plan) setGuide({ plan, source: "auto" });+ const schedule = RELEASE_ANNOUNCEMENT;+ if (+ schedule &&+ hasAnnouncementContent(schedule.id) &&+ shouldShowAnnouncement(schedule, loadAnnouncementRecord())+ ) {+ setAnnouncement(schedule);+ }+ }, [active, decided, hasUsableModel]);++ useEffect(() => {+ if (!replayRequested) return;+ clearReplay();+ setGuide((current) => current ?? { plan: startupGuideFor(hasUsableModel), source: "manual" });+ }, [replayRequested, clearReplay, hasUsableModel]);++ const overlay = active+ ? resolveAppOverlay({+ guide: guide !== null,+ announcement: announcement !== null,+ settings: settingsOpen,+ })+ : null;++ // Once per release: the announcement counts as seen as soon as it is on+ // screen, not when the guide was still holding it back.+ useEffect(() => {+ if (overlay !== "announcement" || !announcement) return;+ saveAnnouncementRecord(announcementShown(announcement, loadAnnouncementRecord()));+ }, [overlay, announcement]);++ const exitGuide = useCallback((exit: StartupGuideExit) => {+ if (guide?.source === "auto") saveStartupGuideCompletedVersion(STARTUP_GUIDE_VERSION);+ setGuide(null);+ if (exit === "openShortcuts") setSettingsTab("shortcuts");+ }, [guide?.source, setSettingsTab]);++ const closeAnnouncement = useCallback(() => setAnnouncement(null), []);++ let dialog = null;+ if (overlay === "guide" && guide) {+ dialog = (+ <StartupGuideDialog+ plan={guide.plan}+ hasUsableModel={hasUsableModel}+ onExit={exitGuide}+ />+ );+ } else if (overlay === "announcement" && announcement) {+ dialog = (+ <AnnouncementDialog+ id={announcement.id}+ onClose={closeAnnouncement}+ onUnavailable={closeAnnouncement}+ />+ );+ } else if (overlay === "settings") {+ dialog = <SettingsDialog onClose={closeSettings} />;+ }+ return dialog ? <Suspense fallback={null}>{dialog}</Suspense> : null;+}diff --git a/apps/desktop/src/features/startup/StartupGuideDialog.tsx b/apps/desktop/src/features/startup/StartupGuideDialog.tsxnew file mode 100644index 000000000..145801307--- /dev/null+++ b/apps/desktop/src/features/startup/StartupGuideDialog.tsx@@ -0,0 +1,209 @@+import { useEffect, useRef, useState } from "react";+import { useTranslation } from "react-i18next";+import {+ KEYBOARD_SHORTCUTS,+ keybindingDisplayParts,+ keybindingMatchesEvent,+ resolveKeybinding,+ type ShortcutPlatform,+} from "@pi-desktop/shared";+import { IconCheck, IconClose, IconSearch } from "../../components/icons";+import { Badge, Button, cx, OverlayBackdrop, portalOverlay, TooltipButton } from "../../components/ui";+import { api } from "../../lib/api";+import { useModalDialog } from "../../lib/use-modal-dialog";+import { useAppStore } from "../../stores/app-store";+import { SettingsDestinationContent } from "../settings/SettingsDestinationContent";+import type { StartupGuidePlan, StartupGuideStep } from "./app-overlay-model";++export type StartupGuideExit = "finished" | "skipped" | "openShortcuts";++/**+ * Startup guide. Users without a usable model may configure one with the+ * same Models destination Settings shows (optional); everyone then learns+ * the plugin launcher shortcut.+ */+export function StartupGuideDialog({+ plan,+ hasUsableModel,+ onExit,+}: {+ plan: StartupGuidePlan;+ hasUsableModel: boolean;+ onExit: (exit: StartupGuideExit) => void;+}) {+ const { t } = useTranslation();+ const dialogRef = useRef<HTMLDivElement | null>(null);+ const [index, setIndex] = useState(0);+ const step: StartupGuideStep = plan.steps[Math.min(index, plan.steps.length - 1)];+ const last = index >= plan.steps.length - 1;+ useModalDialog(dialogRef, { onClose: () => onExit("skipped") });++ const next = () => {+ if (last) onExit("finished");+ else setIndex((value) => value + 1);+ };++ return portalOverlay(+ <OverlayBackdrop className="overlay startup-guide-overlay" role="presentation">+ <div+ ref={dialogRef}+ className="dialog startup-guide-dialog"+ role="dialog"+ aria-modal="true"+ aria-labelledby="startup-guide-title"+ aria-describedby="startup-guide-description"+ data-surface="startup-guide"+ data-step={step}+ >+ <header className="startup-guide-header">+ <div className="startup-guide-heading">+ {plan.steps.length > 1 ? (+ <span className="startup-guide-progress">+ {t("startupGuide.progress", { current: index + 1, total: plan.steps.length })}+ </span>+ ) : null}+ <h2 id="startup-guide-title">{t(`startupGuide.${step}.title`)}</h2>+ <p id="startup-guide-description">{t(`startupGuide.${step}.description`)}</p>+ </div>+ <TooltipButton+ type="button"+ className="icon-btn"+ tooltip={t("startupGuide.skip")}+ ariaLabel={t("startupGuide.skip")}+ onClick={() => onExit("skipped")}+ >+ <IconClose size={16} />+ </TooltipButton>+ </header>++ <div className="startup-guide-body">+ {step === "model" ? (+ <div className="startup-guide-settings settings-content-inner">+ <SettingsDestinationContent tab="agent" />+ </div>+ ) : (+ <LauncherShortcutStep onOpenShortcuts={() => onExit("openShortcuts")} />+ )}+ </div>++ <footer className="startup-guide-footer">+ {step === "model" ? (+ hasUsableModel ? (+ <Badge tone="success" className="startup-guide-status">+ <IconCheck size={12} aria-hidden />+ {t("startupGuide.model.ready")}+ </Badge>+ ) : (+ <span className="startup-guide-hint">{t("startupGuide.model.pending")}</span>+ )+ ) : null}+ <div className="startup-guide-actions">+ <Button variant="ghost" onClick={() => (last ? onExit("skipped") : next())}>+ {t("startupGuide.skip")}+ </Button>+ <Button variant="primary" onClick={next}>+ {last+ ? t("startupGuide.finish")+ : step === "model" && !hasUsableModel+ ? t("startupGuide.later")+ : t("startupGuide.next")}+ </Button>+ </div>+ </footer>+ </div>+ </OverlayBackdrop>,+ );+}++/**+ * Left: the shortcut as keycaps plus actions. Right: a thumbnail of the+ * plugin launcher. The keycaps stay dimmed until the user actually opens the+ * launcher — by its global shortcut (Main reports the launcher shown) or by+ * the same keys reaching this window.+ */+function LauncherShortcutStep({ onOpenShortcuts }: { onOpenShortcuts: () => void }) {+ const { t } = useTranslation();+ const keybindings = useAppStore((s) => s.settings?.keybindings);+ const platform = (window.piDesktop?.platform ?? "darwin") as ShortcutPlatform;+ const definition = KEYBOARD_SHORTCUTS.find((entry) => entry.id === "openPluginLauncher");+ const binding = definition ? resolveKeybinding(definition, keybindings, platform) : null;+ const parts = binding ? keybindingDisplayParts(binding, platform) : [];+ const [pressed, setPressed] = useState(false);++ useEffect(() => api.onPluginLauncherShown(() => setPressed(true)), []);+ useEffect(() => {+ if (!binding) return;+ const onKeyDown = (event: KeyboardEvent) => {+ if (keybindingMatchesEvent(binding, event, platform)) setPressed(true);+ };+ window.addEventListener("keydown", onKeyDown, true);+ return () => window.removeEventListener("keydown", onKeyDown, true);+ }, [binding, platform]);++ return (+ <div className="startup-guide-launcher">+ <div className="startup-guide-launcher-main">+ <div+ className={cx("startup-guide-keys", pressed && "is-active")}+ data-pressed={pressed ? "true" : "false"}+ aria-label={parts.join("+") || t("startupGuide.launcher.unbound")}+ >+ {parts.length > 0 ? (+ parts.map((part, position) => (+ <span key={`${part}-${position}`} className="startup-guide-key-part">+ {position > 0 ? <span className="startup-guide-key-plus" aria-hidden>+</span> : null}+ <kbd>{part}</kbd>+ </span>+ ))+ ) : (+ <span className="startup-guide-hint">{t("startupGuide.launcher.unbound")}</span>+ )}+ </div>+ <p className="startup-guide-press-status" role="status" aria-live="polite">+ {pressed ? t("startupGuide.launcher.pressed") : t("startupGuide.launcher.pressPrompt")}+ </p>+ <ul className="startup-guide-points">+ <li>{t("startupGuide.launcher.pointAnywhere")}</li>+ <li>{t("startupGuide.launcher.pointPlugins")}</li>+ </ul>+ <div className="startup-guide-launcher-actions">+ <Button+ variant="secondary"+ onClick={() => {+ void api.togglePluginLauncher().catch((error: unknown) => {+ console.error("Failed to open the plugin launcher", error);+ });+ }}+ >+ {t("startupGuide.launcher.tryIt")}+ </Button>+ <Button variant="ghost" onClick={onOpenShortcuts}>+ {t("startupGuide.launcher.customize")}+ </Button>+ </div>+ </div>+ <LauncherPreview />+ </div>+ );+}++/** Static thumbnail of the plugin launcher panel. Decorative only. */+function LauncherPreview() {+ const { t } = useTranslation();+ return (+ <div className="startup-guide-preview" aria-hidden>+ <div className="startup-guide-preview-panel">+ <div className="startup-guide-preview-search">+ <IconSearch size={13} />+ <span>{t("startupGuide.launcher.previewSearch")}</span>+ </div>+ {[0, 1, 2, 3].map((row) => (+ <div key={row} className={cx("startup-guide-preview-row", row === 0 && "is-selected")}>+ <span className="startup-guide-preview-icon" />+ <span className="startup-guide-preview-line" />+ </div>+ ))}+ </div>+ </div>+ );+}diff --git a/apps/desktop/src/features/startup/announcements/README.md b/apps/desktop/src/features/startup/announcements/README.mdnew file mode 100644index 000000000..e40bf246d--- /dev/null+++ b/apps/desktop/src/features/startup/announcements/README.md@@ -0,0 +1,38 @@+# Release announcements++A release announcement is a short, plain-language note about an important+change in a release ("what this means for you", not a changelog). It is+bundled with the app; there is no server component.++It is **off by default**. Ship one only when a release needs it.++## Behaviour++- Shown at most once per release (the id is the release version), after the+ startup guide; the Settings dialog waits behind both+ (priority: guide > announcement > settings).+- Counted as seen as soon as it is on screen; it never repeats for that id.+ State lives in renderer `localStorage` (`pi.desktop.announcement`).++## Shipping one++1. Use the release version as the id, e.g. `0.24.0`.+2. Add `content/<id>/en.md` (required) and any localized files named by+ locale id: `zh-CN.md`, `zh-TW.md`, `de.md`, `es.md`, `fr.md`, `ko.md`,+ `pt-BR.md`, `tr.md`. Missing locales fall back to the base language, then+ English.+3. Put images in `content/<id>/assets/` and reference them as+ ``. Only bundled assets render; any other image+ reference is dropped.+4. Set `RELEASE_ANNOUNCEMENT` in `catalog.ts`:++ ```ts+ export const RELEASE_ANNOUNCEMENT: AnnouncementSchedule | null = {+ id: "0.24.0",+ };+ ```++5. Set it back to `null` (and delete the content folder) in a later release.++Markdown supports GFM (lists, tables, links). Raw HTML is not rendered. Links+open in the system browser and must be `https://`.diff --git a/apps/desktop/src/features/startup/announcements/catalog.ts b/apps/desktop/src/features/startup/announcements/catalog.tsnew file mode 100644index 000000000..6a271ae4b--- /dev/null+++ b/apps/desktop/src/features/startup/announcements/catalog.ts@@ -0,0 +1,59 @@+import {+ announcementLocaleCandidates,+ type AnnouncementSchedule,+} from "../app-overlay-model";++/**+ * The release announcement, filled per release (see ./README.md).+ *+ * `null` keeps the announcement off — the normal state. Set it only when a+ * release carries a change users must hear about in plain words; the id is+ * that release's version, and the matching `content/<id>/<locale>.md` files+ * must exist (English is required). Each id is shown at most once.+ */+export const RELEASE_ANNOUNCEMENT: AnnouncementSchedule | null = null;++// Markdown is loaded on demand; image assets resolve to bundled URLs.+const documents = import.meta.glob<string>("./content/*/*.md", {+ query: "?raw",+ import: "default",+});+const assets = import.meta.glob<string>("./content/*/assets/*", {+ query: "?url",+ import: "default",+ eager: true,+});++function documentKey(id: string, locale: string): string {+ return `./content/${id}/${locale}.md`;+}++/** Whether the announcement ships at least its English text. */+export function hasAnnouncementContent(id: string): boolean {+ return documentKey(id, "en") in documents;+}++export type AnnouncementContent = {+ markdown: string;+ /** Map a Markdown image reference to a bundled asset; anything else is dropped. */+ resolveImage: (src: string) => string | null;+};++export async function loadAnnouncementContent(+ id: string,+ language: string | undefined,+): Promise<AnnouncementContent | null> {+ const locale = announcementLocaleCandidates(language).find(+ (candidate) => documentKey(id, candidate) in documents,+ );+ if (!locale) return null;+ const markdown = await documents[documentKey(id, locale)]();+ return {+ markdown,+ resolveImage: (src) => {+ const relative = src.replace(/^\.\//, "");+ if (!/^assets\/[^/]+$/.test(relative)) return null;+ return assets[`./content/${id}/${relative}`] ?? null;+ },+ };+}diff --git a/apps/desktop/src/features/startup/app-overlay-model.ts b/apps/desktop/src/features/startup/app-overlay-model.tsnew file mode 100644index 000000000..89f63c867--- /dev/null+++ b/apps/desktop/src/features/startup/app-overlay-model.ts@@ -0,0 +1,111 @@+/**+ * Pure rules for the app-level modal overlays: the startup guide, the release+ * announcement and the Settings dialog. Only one is on screen at a time, in+ * the fixed priority guide > announcement > settings; a lower one waits until+ * every higher one is gone.+ */++export type AppOverlay = "guide" | "announcement" | "settings";++export function resolveAppOverlay(pending: {+ guide: boolean;+ announcement: boolean;+ settings: boolean;+}): AppOverlay | null {+ if (pending.guide) return "guide";+ if (pending.announcement) return "announcement";+ if (pending.settings) return "settings";+ return null;+}++// ---------------------------------------------------------------------------+// Startup guide++/** Bump to show the guide again to everyone after it gains new steps. */+export const STARTUP_GUIDE_VERSION = 1;++export type StartupGuideStep = "model" | "launcher";++export type StartupGuidePlan = {+ /** New users have no usable chat model yet; returning users already do. */+ audience: "new" | "returning";+ steps: readonly StartupGuideStep[];+};++/**+ * The guide for the user's current state: users who have not configured a+ * usable model yet get the (skippable) model step first.+ */+export function startupGuideFor(hasUsableModel: boolean): StartupGuidePlan {+ return hasUsableModel+ ? { audience: "returning", steps: ["launcher"] }+ : { audience: "new", steps: ["model", "launcher"] };+}++/**+ * The guide a launch shows automatically, or null once this guide version was+ * finished or skipped. Decided once per launch: configuring a model during+ * the guide must not switch the audience underneath the user.+ */+export function planStartupGuide(input: {+ completedVersion: number;+ hasUsableModel: boolean;+}): StartupGuidePlan | null {+ if (input.completedVersion >= STARTUP_GUIDE_VERSION) return null;+ return startupGuideFor(input.hasUsableModel);+}++// ---------------------------------------------------------------------------+// Release announcement++/** The announcement a release ships (see features/startup/announcements). */+export type AnnouncementSchedule = {+ /**+ * The release version it belongs to, e.g. `0.24.0`; also the content folder+ * name. Each id is shown at most once.+ */+ id: string;+};++/** Announcement ids this renderer has already shown. */+export type AnnouncementRecord = {+ shownIds: readonly string[];+};++/** Most recent ids kept; older releases can never be shipped again anyway. */+const ANNOUNCEMENT_HISTORY_LIMIT = 20;++/** Show a release's announcement once; closing it retires it for good. */+export function shouldShowAnnouncement(+ schedule: AnnouncementSchedule | null,+ record: AnnouncementRecord,+): boolean {+ return schedule !== null && !record.shownIds.includes(schedule.id);+}++export function announcementShown(+ schedule: AnnouncementSchedule,+ record: AnnouncementRecord,+): AnnouncementRecord {+ if (record.shownIds.includes(schedule.id)) return record;+ return {+ shownIds: [...record.shownIds, schedule.id].slice(-ANNOUNCEMENT_HISTORY_LIMIT),+ };+}++/**+ * Content locale candidates, most specific first: `zh-TW` → `zh-TW`, `zh`,+ * then English as the release baseline.+ */+export function announcementLocaleCandidates(language: string | undefined): string[] {+ const candidates: string[] = [];+ const push = (value: string) => {+ if (value && !candidates.includes(value)) candidates.push(value);+ };+ if (language) {+ push(language);+ push(language.split("-")[0] ?? "");+ }+ push("en");+ return candidates;+}diff --git a/apps/desktop/src/features/startup/app-overlay-preferences.ts b/apps/desktop/src/features/startup/app-overlay-preferences.tsnew file mode 100644index 000000000..72b8884e6--- /dev/null+++ b/apps/desktop/src/features/startup/app-overlay-preferences.ts@@ -0,0 +1,65 @@+import type { AnnouncementRecord } from "./app-overlay-model";++/*+ * Renderer-local memory for the startup guide and the release announcement.+ * Both are presentation state of this window — whether a hint was already+ * seen — so they live in localStorage, like the sidebar width, and never in+ * host-owned settings. A blocked or corrupt store degrades to "not seen".+ */++export const STARTUP_GUIDE_STORAGE_KEY = "pi.desktop.startupGuide";+export const ANNOUNCEMENT_STORAGE_KEY = "pi.desktop.announcement";++function storage(): Storage | null {+ try {+ return typeof globalThis !== "undefined" && "localStorage" in globalThis+ ? globalThis.localStorage+ : null;+ } catch {+ return null;+ }+}++function read(key: string): unknown {+ try {+ const value = storage()?.getItem(key);+ return value ? JSON.parse(value) : undefined;+ } catch {+ return undefined;+ }+}++function write(key: string, value: unknown): void {+ try {+ storage()?.setItem(key, JSON.stringify(value));+ } catch {+ // A full or blocked store only means the hint may show again.+ }+}++export function loadStartupGuideCompletedVersion(): number {+ const value = read(STARTUP_GUIDE_STORAGE_KEY);+ if (!value || typeof value !== "object") return 0;+ const version = (value as { completedVersion?: unknown }).completedVersion;+ return typeof version === "number" && Number.isFinite(version) ? version : 0;+}++export function saveStartupGuideCompletedVersion(version: number): void {+ write(STARTUP_GUIDE_STORAGE_KEY, { completedVersion: version });+}++export function loadAnnouncementRecord(): AnnouncementRecord {+ const value = read(ANNOUNCEMENT_STORAGE_KEY);+ const ids = value && typeof value === "object"+ ? (value as { shownIds?: unknown }).shownIds+ : undefined;+ return {+ shownIds: Array.isArray(ids)+ ? ids.filter((id): id is string => typeof id === "string")+ : [],+ };+}++export function saveAnnouncementRecord(record: AnnouncementRecord): void {+ write(ANNOUNCEMENT_STORAGE_KEY, record);+}diff --git a/apps/desktop/src/features/startup/startup-guide-request.ts b/apps/desktop/src/features/startup/startup-guide-request.tsnew file mode 100644index 000000000..00f470d72--- /dev/null+++ b/apps/desktop/src/features/startup/startup-guide-request.ts@@ -0,0 +1,16 @@+import { create } from "zustand";++/**+ * A user request to replay the startup guide (Settings → About). Kept apart+ * from the automatic first-launch decision: a replay never touches the+ * "guide completed" marker.+ */+export const useStartupGuideRequest = create<{+ requested: boolean;+ request: () => void;+ clear: () => void;+}>((set) => ({+ requested: false,+ request: () => set({ requested: true }),+ clear: () => set({ requested: false }),+}));diff --git a/apps/desktop/src/features/voice/live/live-voice-navigation.ts b/apps/desktop/src/features/voice/live/live-voice-navigation.tsindex 1130eb9f2..1ab4d7666 100644--- a/apps/desktop/src/features/voice/live/live-voice-navigation.ts+++ b/apps/desktop/src/features/voice/live/live-voice-navigation.ts@@ -9,5 +9,4 @@ export function openLiveVoiceSettings() {import.meta.env.DEV,);store.setSettingsTab(voiceHidden ? "agent" : "voice");- store.setPage("settings");}diff --git a/apps/desktop/src/lib/open-http-url.ts b/apps/desktop/src/lib/open-http-url.tsindex 1e7c141f9..177e35db2 100644--- a/apps/desktop/src/lib/open-http-url.ts+++ b/apps/desktop/src/lib/open-http-url.ts@@ -57,7 +57,11 @@ export function planHttpUrlOpen(*/export function openHttpUrl(url: string): void {const state = useAppStore.getState();- const plan = planHttpUrlOpen(url, state);+ // The Settings dialog covers the dock just as a full page does.+ const plan = planHttpUrlOpen(url, {+ ...state,+ page: state.settingsOpen ? "settings" : state.page,+ });if (plan.action === "ignore") return;if (plan.action === "workpanel") {if (plan.returnToChat) {diff --git a/apps/desktop/src/lib/settings-search.ts b/apps/desktop/src/lib/settings-search.tsindex 144cc8cb3..7205bde1f 100644--- a/apps/desktop/src/lib/settings-search.ts+++ b/apps/desktop/src/lib/settings-search.ts@@ -411,6 +411,7 @@ export const SETTINGS_NAV: SettingsNavEntry[] = [group: "system",keywordKeys: ["settings.application",+ "settings.startupGuide","settings.logs","settings.feedback","updates.title",diff --git a/apps/desktop/src/lib/use-modal-dialog.ts b/apps/desktop/src/lib/use-modal-dialog.tsnew file mode 100644index 000000000..c319cd157--- /dev/null+++ b/apps/desktop/src/lib/use-modal-dialog.ts@@ -0,0 +1,95 @@+import { type RefObject, useEffect, useRef } from "react";+import { useBlockingOverlay } from "./blocking-overlay";++const FOCUSABLE =+ 'button:not([disabled]), a[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';++/** Whether a key event belongs to this dialog rather than a layer above it. */+export function eventBelongsToDialog(+ dialog: HTMLElement | null,+ target: EventTarget | null,+ ownerDocument: Document,+): boolean {+ if (!dialog) return false;+ // Focus lost to the document body still answers to the topmost dialog.+ if (target === ownerDocument.body || target === ownerDocument.documentElement) {+ return true;+ }+ return target instanceof Node && dialog.contains(target);+}++/**+ * Modal behaviour shared by app-level dialogs (Settings, startup guide,+ * announcement): hide native plugin views beneath, move focus in, keep Tab+ * inside, close on Escape, and hand focus back on unmount.+ *+ * Escape and Tab are only claimed for events that originate inside the dialog+ * and were not already handled: a menu, recorder or nested dialog that+ * prevents the default keeps its own Escape.+ */+export function useModalDialog(+ dialogRef: RefObject<HTMLElement | null>,+ options: {+ onClose?: () => void;+ /** Element to focus first; falls back to the dialog's first focusable. */+ initialFocusRef?: RefObject<HTMLElement | null>;+ } = {},+) {+ useBlockingOverlay();+ const onCloseRef = useRef(options.onClose);+ onCloseRef.current = options.onClose;+ const initialFocusRef = options.initialFocusRef;+ // Read during the first render: child layout effects may already have moved+ // focus into the dialog by the time this hook's effect runs.+ const restoreFocusRef = useRef<HTMLElement | null | undefined>(undefined);+ if (restoreFocusRef.current === undefined) {+ restoreFocusRef.current =+ typeof document !== "undefined" && document.activeElement instanceof HTMLElement+ ? document.activeElement+ : null;+ }++ useEffect(() => {+ const previouslyFocused = restoreFocusRef.current;+ const dialog = dialogRef.current;+ // Content that already placed focus inside (Settings focuses its search+ // field in a layout effect) keeps it.+ if (!dialog?.contains(document.activeElement)) {+ const initial =+ initialFocusRef?.current ?? dialog?.querySelector<HTMLElement>(FOCUSABLE) ?? dialog;+ initial?.focus({ preventScroll: true });+ }++ const onKeyDown = (event: KeyboardEvent) => {+ if (event.defaultPrevented) return;+ const current = dialogRef.current;+ if (!eventBelongsToDialog(current, event.target, document)) return;+ if (event.key === "Escape") {+ if (!onCloseRef.current) return;+ event.preventDefault();+ onCloseRef.current();+ return;+ }+ if (event.key !== "Tab" || !current) return;+ const focusable = [...current.querySelectorAll<HTMLElement>(FOCUSABLE)].filter(+ (node) => !node.closest("[inert]"),+ );+ if (focusable.length === 0) return;+ const first = focusable[0];+ const last = focusable[focusable.length - 1];+ if (event.shiftKey && document.activeElement === first) {+ event.preventDefault();+ last.focus();+ } else if (!event.shiftKey && document.activeElement === last) {+ event.preventDefault();+ first.focus();+ }+ };++ window.addEventListener("keydown", onKeyDown);+ return () => {+ window.removeEventListener("keydown", onKeyDown);+ if (previouslyFocused?.isConnected) previouslyFocused.focus({ preventScroll: true });+ };+ }, [dialogRef, initialFocusRef]);+}diff --git a/apps/desktop/src/stores/app-state.ts b/apps/desktop/src/stores/app-state.tsindex cc3761123..e45e43b59 100644--- a/apps/desktop/src/stores/app-state.ts+++ b/apps/desktop/src/stores/app-state.ts@@ -197,7 +197,12 @@ export type AppState = {toasts: ToastItem[];notifications: AppNotification[];unreadNotificationCount: number;- page: "chat" | "scheduled" | "plugins" | "settings";+ page: "chat" | "scheduled" | "plugins";+ /**+ * Settings is a modal dialog over the current page, not a route. The dialog+ * may still wait behind higher-priority startup overlays (guide, notice).+ */+ settingsOpen: boolean;/** Tab ids come from the shared settings index. */settingsTab: SettingsTabId;/** Pending row anchor (i18n key) to flash after landing on a settings tab. */@@ -371,6 +376,10 @@ export type AppState = {handleAgentEvent: (envelope: AgentEventEnvelope) => void;handlePlansChanged: (event: PlanningStateEvent) => void;setPage: (page: AppState["page"], opts?: { record?: boolean }) => void;+ /** Open the Settings dialog on its current (or the given) destination. */+ openSettings: (tab?: AppState["settingsTab"]) => void;+ closeSettings: () => void;+ /** Open the Settings dialog on `tab`, even when that tab is already shown. */setSettingsTab: (tab: AppState["settingsTab"]) => void;setSettingsAnchor: (key: string | null) => void;navBack: () => void;diff --git a/apps/desktop/src/stores/slices/initial-state.ts b/apps/desktop/src/stores/slices/initial-state.tsindex 455d4166e..256f09f9a 100644--- a/apps/desktop/src/stores/slices/initial-state.ts+++ b/apps/desktop/src/stores/slices/initial-state.ts@@ -80,6 +80,7 @@ export function createInitialState(): AppStateData {planCheckpoints: {},sessionTodos: {},page: "chat",+ settingsOpen: false,settingsTab: DEFAULT_SETTINGS_TAB,settingsAnchor: null,settingsTabNonce: 0,diff --git a/apps/desktop/src/stores/slices/interaction-slice.ts b/apps/desktop/src/stores/slices/interaction-slice.tsindex 72bb73fc5..9ce1abb03 100644--- a/apps/desktop/src/stores/slices/interaction-slice.ts+++ b/apps/desktop/src/stores/slices/interaction-slice.ts@@ -48,6 +48,8 @@ export function createInteractionSlice({}: InteractionSliceDependencies): Pick<AppState,| "setPage"+ | "openSettings"+ | "closeSettings"| "setSettingsTab"| "setSettingsAnchor"| "canNavBack"@@ -77,8 +79,10 @@ export function createInteractionSlice({setPage: (page, opts) => {runtime.beginNavigationIntent();const record = opts?.record !== false;+ // Settings is a dialog over the page; a page navigation dismisses it,+ // exactly as leaving the former full-window Settings route did.set((state) => {- if (!record) return { page };+ if (!record) return { page, settingsOpen: false };const entry = {page,sessionId: page === "chat" ? state.activeSessionId : undefined,@@ -90,6 +94,7 @@ export function createInteractionSlice({const nextStack = same ? stack : [...stack, entry].slice(-50);return {page,+ settingsOpen: false,navStack: nextStack,navIndex: nextStack.length - 1,};@@ -102,12 +107,20 @@ export function createInteractionSlice({// Resolving it here lands a retired id on its successor instead of// rendering an empty content pane.const settingsTab = resolveSettingsTab(requested);- get().setPage("settings");set((state) => ({+ settingsOpen: true,settingsTab,settingsTabNonce: state.settingsTabNonce + 1,}));},+ openSettings: (requested) => {+ if (requested !== undefined) {+ get().setSettingsTab(requested);+ return;+ }+ set({ settingsOpen: true });+ },+ closeSettings: () => set({ settingsOpen: false, settingsAnchor: null }),setSettingsAnchor: (settingsAnchor) => set({ settingsAnchor }),canNavBack: () => get().navIndex > 0,canNavForward: () => get().navIndex < get().navStack.length - 1,diff --git a/apps/desktop/src/stores/slices/project-slice.ts b/apps/desktop/src/stores/slices/project-slice.tsindex 6cb23b786..bf5aa5e3d 100644--- a/apps/desktop/src/stores/slices/project-slice.ts+++ b/apps/desktop/src/stores/slices/project-slice.ts@@ -115,7 +115,7 @@ async function createNamedProjectGroup(if (!workspace || !runtime.navigationIntentIsCurrent(intent)) return;const onboarding = await api.getOnboarding();if (!runtime.navigationIntentIsCurrent(intent)) return;- set({ createProjectDialogOpen: false, createProjectDialogRemoteHostKey: undefined, onboarding, page: "chat" });+ set({ createProjectDialogOpen: false, createProjectDialogRemoteHostKey: undefined, onboarding, page: "chat", settingsOpen: false });return;}}@@ -132,7 +132,7 @@ async function createNamedProjectGroup(get().renameProject(groupPrimary, normalizedName);const onboarding = await api.getOnboarding();if (!runtime.navigationIntentIsCurrent(intent)) return;- set({ createProjectDialogOpen: false, createProjectDialogRemoteHostKey: undefined, onboarding, page: "chat" });+ set({ createProjectDialogOpen: false, createProjectDialogRemoteHostKey: undefined, onboarding, page: "chat", settingsOpen: false });}/**@@ -416,7 +416,7 @@ export function createProjectSlice({get().renameProject(group.primaryPath, normalizedName);const onboarding = await api.getOnboarding();if (!runtime.navigationIntentIsCurrent(intent)) return;- set({ createProjectDialogOpen: false, createProjectDialogRemoteHostKey: undefined, onboarding, page: "chat" });+ set({ createProjectDialogOpen: false, createProjectDialogRemoteHostKey: undefined, onboarding, page: "chat", settingsOpen: false });},createProjectFromGit: async ({ name, url, parentPath }) => {// Clone first, then create the project through the same group path, so adiff --git a/apps/desktop/src/stores/slices/session-slice.ts b/apps/desktop/src/stores/slices/session-slice.tsindex 7da6d0838..afe900877 100644--- a/apps/desktop/src/stores/slices/session-slice.ts+++ b/apps/desktop/src/stores/slices/session-slice.ts@@ -410,7 +410,7 @@ export function createSessionSlice({stateAtStart.sessionHistory[stateAtStart.activeSessionId],);}- set({ selectingSessionId: id, page: "chat" });+ set({ selectingSessionId: id, page: "chat", settingsOpen: false });const outcomeAcknowledgement = get().acknowledgeSessionOutcome(id);const commitSelection = (diff --git a/apps/desktop/src/styles/base.css b/apps/desktop/src/styles/base.cssindex d6e236e19..1440bdaf7 100644--- a/apps/desktop/src/styles/base.css+++ b/apps/desktop/src/styles/base.css@@ -170,16 +170,11 @@ html {color: var(--ds-text-primary);}-/* Keep the chat tree mounted while Settings is open without changing the- shell's flex layout or exposing the hidden tree to focus and accessibility. */+/* Groups the chat shell's regions without adding a flex level of its own. */.app-chat-shell {display: contents;}-.app-chat-shell[hidden] {- display: none;-}-.app-scenic-backdrop {position: fixed;inset: 0;diff --git a/apps/desktop/src/styles/chat-shell.css b/apps/desktop/src/styles/chat-shell.cssindex b0828d91b..c22a6a7c3 100644--- a/apps/desktop/src/styles/chat-shell.css+++ b/apps/desktop/src/styles/chat-shell.css@@ -964,11 +964,6 @@opacity: 0.6;}-.home-onboarding-checklist {- margin-top: 0;- max-width: 100%;-}-@media (max-height: 760px) {.home-stack-inner {padding-top: 24px;diff --git a/apps/desktop/src/styles/chrome.css b/apps/desktop/src/styles/chrome.cssindex 522dc8a4f..09bdfec92 100644--- a/apps/desktop/src/styles/chrome.css+++ b/apps/desktop/src/styles/chrome.css@@ -12,8 +12,7 @@:root[data-platform="darwin"],:root[data-platform="darwin"] body,:root[data-platform="darwin"] #root,-:root[data-platform="darwin"] .app-shell,-:root[data-platform="darwin"] .settings-shell {+:root[data-platform="darwin"] .app-shell {background: transparent;}@@ -1379,9 +1378,7 @@/* End every native drag rectangle before the window-control hit targets.* Visual padding alone does not exclude an Electron draggable region. */:root[data-platform="win32"] .main-titlebar,-:root[data-platform="linux"] .main-titlebar,-:root[data-platform="win32"] .settings-titlebar,-:root[data-platform="linux"] .settings-titlebar {+:root[data-platform="linux"] .main-titlebar {right: var(--ds-window-controls-width);}diff --git a/apps/desktop/src/styles/globals.css b/apps/desktop/src/styles/globals.cssindex b37ad23b5..c42018840 100644--- a/apps/desktop/src/styles/globals.css+++ b/apps/desktop/src/styles/globals.css@@ -23,6 +23,7 @@@import "./theme-overrides.css";@import "./composer-menus.css";@import "./settings.css";+@import "./startup-overlays.css";@import "./destinations.css";@import "./projects.css";@import "./project-create-dialog.css";diff --git a/apps/desktop/src/styles/overlays.css b/apps/desktop/src/styles/overlays.cssindex 0118bde93..9c4304280 100644--- a/apps/desktop/src/styles/overlays.css+++ b/apps/desktop/src/styles/overlays.css@@ -223,10 +223,6 @@animation: update-notice-in var(--motion-duration-normal) var(--motion-ease-out);}-.settings-mode > .update-notice {- position: fixed;-}-.update-notice-icon {display: inline-flex;width: 32px;diff --git a/apps/desktop/src/styles/settings.css b/apps/desktop/src/styles/settings.cssindex fb54081c4..fdfc68424 100644--- a/apps/desktop/src/styles/settings.css+++ b/apps/desktop/src/styles/settings.css@@ -1,32 +1,30 @@/*- Settings — full-window shell, search, nav, section cards and rows, keyboard+ Settings — modal dialog frame, search, nav, section cards and rows, keyboardshortcut recorder, toggles, and the appearance theme/language pickers.*/-/* Codex settings: full-window page (no app sidebar) */-.app-shell.settings-mode {- background: var(--ds-bg-primary);+/* Settings dialog: a large modal over the current page (rail + content). */+.settings-dialog-overlay {+ /* z-dialog, like every other overlay: leaf popups (60) and toasts (50) keep+ painting above it. */+ z-index: 40;}-:root[data-plugin-theme^="plugin:io.github.akshayxkill.nexus-scenic-themes:"] .app-shell.settings-mode,-:root[data-plugin-theme^="plugin:io.github.akshayxkill.nexus-scenic-themes:"] .settings-shell,-:root[data-plugin-theme^="plugin:io.github.akshayxkill.nexus-scenic-themes:"] .settings-shell-full,-:root[data-plugin-theme^="plugin:io.github.akshayxkill.nexus-scenic-themes:"] .settings-content,-:root[data-plugin-theme^="plugin:io.github.akshayxkill.nexus-scenic-themes:"] .settings-content-inner,-:root[data-plugin-theme^="plugin:io.github.akshayxkill.nexus-scenic-themes:"] .settings-titlebar {- background: transparent !important;+.settings-dialog {+ position: relative;+ display: flex;+ width: min(100%, 1080px);+ height: min(100%, 760px);+ overflow: hidden;+ padding: 0;+ color: var(--ds-text-primary);}-/* Scenic plugin themes own the image canvas. Keep the host Settings page as- * transparent compositing surfaces so the single root scenic layer remains- * visible beneath it; ordinary themes never match this attribute. */-:root[data-plugin-theme^="plugin:io.github.akshayxkill.nexus-scenic-themes:"] .app-shell.settings-mode,-:root[data-plugin-theme^="plugin:io.github.akshayxkill.nexus-scenic-themes:"] .settings-shell,-:root[data-plugin-theme^="plugin:io.github.akshayxkill.nexus-scenic-themes:"] .settings-shell-full,-:root[data-plugin-theme^="plugin:io.github.akshayxkill.nexus-scenic-themes:"] .settings-content,-:root[data-plugin-theme^="plugin:io.github.akshayxkill.nexus-scenic-themes:"] .settings-content-inner,-:root[data-plugin-theme^="plugin:io.github.akshayxkill.nexus-scenic-themes:"] .settings-titlebar {- background: transparent !important;+.settings-dialog-close {+ position: absolute;+ top: 12px;+ right: 12px;+ z-index: 2;}:root[data-plugin-theme^="plugin:io.github.akshayxkill.nexus-scenic-themes:"] .settings-shell-full .settings-nav.sidebar-surface {@@ -105,30 +103,8 @@.plugin-scenic-theme-card, .plugin-scenic-blur-control { background: var(--ds-bg-elevated); }}-/* The band spans the content column only. Spanning the full window width- * painted --ds-bg-primary over the nav rail, so the strip above the rail read- * as a different color from the rail underneath it. */-.settings-titlebar {- pointer-events: none;- position: absolute;- /* Physical insets on purpose: chrome.css narrows this band on Windows/Linux- * with `right`, and a logical `inset-inline-end` here would beat it on- * declaration order rather than lose on specificity. The app never renders- * RTL, so there is no directional cost. */- left: var(--ds-settings-nav-width);- right: 0;- top: 0;- z-index: 10;- height: var(--ds-toolbar-height);- background: var(--ds-bg-primary);- /* Let the settings content and titlebar read as one surface. */- border-bottom: 0;- --window-drag-region: drag;- -webkit-app-region: drag;-}-.settings-shell-full .settings-nav {- /* Column rail: search band, scrolling directory, pinned back-to-app footer. */+ /* Column rail: search band and scrolling directory. */display: flex;flex-direction: column;/* Gold coding-shell settings rail ~275px at 1200-wide captures */@@ -140,53 +116,13 @@overflow: hidden;}-/*- * The rail's top band keeps only the search pill: traffic-light clearance plus- * the rail's control grid.- */+/* The rail's top band keeps only the search pill. */.settings-nav-top {display: flex;flex: 0 0 auto;flex-direction: column;gap: 8px;- /* traffic-light / titlebar clearance */- padding: 48px 12px 6px;-}--/*- * Back to app is pinned to the foot of the rail, on the same horizontal line as- * the main shell's sidebar footer icon row. That row centres its 32px controls- * 24px above the window bottom (.sidebar-body's 6px inset + .sidebar-footer's- * own 2px + half of the 32px control). The rail has no body inset of its own,- * so the footer carries the whole 8px and the same 32px control lands on the- * same centre line. Band height and top padding mirror .sidebar-footer.- */-.settings-nav-footer {- display: flex;- min-height: 40px;- flex: 0 0 auto;- align-items: center;- padding: 7px 12px 8px;-}--/* 32px, like the footer icon buttons it lines up with. */-.settings-back {- display: inline-flex;- height: 32px;- align-items: center;- gap: 2px;- width: fit-content;- border-radius: var(--radius-sm);- padding: 0 8px 0 4px;- color: var(--ds-text-secondary);- font-size: var(--text-md);- line-height: var(--leading-tighter);- transition: background var(--motion-duration-fast) var(--motion-ease-out), color var(--motion-duration-fast) var(--motion-ease-out);-}--.settings-back:hover {- background: var(--ds-bg-hover);- color: var(--ds-text-primary);+ padding: 14px 12px 6px;}.settings-search-wrap {@@ -316,8 +252,7 @@min-width: 0;flex: 1;overflow: auto;- /* webContents has no traffic-light chrome; keep airy top like gold content band */- padding: calc(var(--ds-toolbar-height) + 8px) 48px 56px 40px;+ padding: 28px 48px 48px 40px;background: var(--ds-bg-primary);}@@ -4376,3 +4311,18 @@.sklm-page-jump::placeholder {color: var(--ds-text-muted);}++@media (max-width: 760px) {+ .settings-dialog-overlay {+ padding: 12px;+ }++ .settings-dialog .settings-shell-full .settings-nav {+ width: 200px;+ flex-basis: 200px;+ }++ .settings-dialog .settings-content {+ padding: 24px 20px 32px;+ }+}diff --git a/apps/desktop/src/styles/startup-overlays.css b/apps/desktop/src/styles/startup-overlays.cssnew file mode 100644index 000000000..1ef860c93--- /dev/null+++ b/apps/desktop/src/styles/startup-overlays.css@@ -0,0 +1,291 @@+/*+ Startup overlays — the first-launch guide and the release announcement.+ Both sit on the shared dialog layer (z 40) like Settings; only one of the+ three is ever mounted (features/startup/AppOverlayHost).+*/++.startup-guide-overlay,+.app-announcement-overlay {+ z-index: 40;+}++.app-announcement-dialog {+ display: flex;+ width: min(100%, 560px);+ max-height: min(86vh, 720px);+ flex-direction: column;+ overflow: hidden;+ padding: 0;+ color: var(--ds-text-primary);+}++/* Fixed frame: the model step embeds the full Settings destination, and the+ launcher step must not jump in size when the user moves between them. */+.startup-guide-dialog {+ display: flex;+ width: min(100%, 920px);+ height: min(86vh, 680px);+ flex-direction: column;+ overflow: hidden;+ padding: 0;+ color: var(--ds-text-primary);+}++.startup-guide-header,+.app-announcement-header {+ display: flex;+ flex: 0 0 auto;+ align-items: flex-start;+ justify-content: space-between;+ gap: 16px;+ padding: 20px 20px 12px 24px;+}++.startup-guide-heading {+ display: grid;+ min-width: 0;+ gap: 4px;+}++.startup-guide-progress {+ color: var(--ds-text-muted);+ font-size: var(--text-xs-plus);+ font-variant-numeric: tabular-nums;+}++.startup-guide-heading h2,+.app-announcement-header h2 {+ margin: 0;+ color: var(--ds-text-primary);+ font-size: var(--text-lg);+ font-weight: var(--font-weight-semibold);+ line-height: var(--leading-heading);+}++.startup-guide-heading p {+ margin: 0;+ color: var(--ds-text-secondary);+ font-size: var(--text-md);+ line-height: var(--leading-body);+}++.startup-guide-body,+.app-announcement-body {+ min-height: 0;+ flex: 1 1 auto;+ overflow-y: auto;+ overscroll-behavior: contain;+ padding: 4px 24px 16px;+}++.startup-guide-footer,+.app-announcement-footer {+ display: flex;+ flex: 0 0 auto;+ align-items: center;+ justify-content: flex-end;+ gap: 12px;+ border-top: 1px solid var(--ds-border-subtle);+ padding: 12px 20px;+}++.startup-guide-footer > :first-child:not(.startup-guide-actions) {+ margin-right: auto;+}++.startup-guide-actions {+ display: flex;+ align-items: center;+ gap: 8px;+}++.startup-guide-status {+ display: inline-flex;+ align-items: center;+ gap: 4px;+}++.startup-guide-hint {+ color: var(--ds-text-muted);+ font-size: var(--text-sm);+}++/* Launcher step: actions on the left, launcher thumbnail on the right. */+.startup-guide-launcher {+ display: grid;+ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);+ align-items: center;+ gap: 32px;+ min-height: 100%;+ padding: 8px 0 4px;+}++.startup-guide-launcher-main {+ display: grid;+ justify-items: start;+ gap: 16px;+}++.startup-guide-keys {+ display: inline-flex;+ align-items: center;+ gap: 6px;+}++.startup-guide-key-part {+ display: inline-flex;+ align-items: center;+ gap: 6px;+}++.startup-guide-key-plus {+ color: var(--ds-text-muted);+ font-size: var(--text-md);+}++/* Keycaps start dimmed and light up once the user presses the shortcut. */+.startup-guide-keys kbd {+ display: inline-flex;+ min-width: 40px;+ height: 36px;+ align-items: center;+ justify-content: center;+ border-radius: var(--radius-sm);+ background: var(--ds-tile);+ box-shadow: inset 0 -2px 0 var(--ds-border-subtle);+ padding: 0 10px;+ color: var(--ds-text-faint);+ font-family: inherit;+ font-size: var(--text-lg);+ font-weight: var(--font-weight-semibold);+ transition: background var(--motion-duration-fast) var(--motion-ease-out),+ color var(--motion-duration-fast) var(--motion-ease-out);+}++.startup-guide-keys.is-active kbd {+ background: var(--ds-accent);+ color: var(--ds-bg-primary);+ box-shadow: inset 0 -2px 0 color-mix(in oklab, var(--ds-bg-primary) 30%, transparent);+}++.startup-guide-press-status {+ margin: 0;+ color: var(--ds-text-secondary);+ font-size: var(--text-md);+}++.startup-guide-keys.is-active + .startup-guide-press-status {+ color: var(--ds-success);+}++.startup-guide-points {+ display: grid;+ gap: 6px;+ margin: 0;+ padding-inline-start: 18px;+ color: var(--ds-text-secondary);+ font-size: var(--text-md);+ line-height: var(--leading-body);+}++.startup-guide-launcher-actions {+ display: flex;+ flex-wrap: wrap;+ gap: 8px;+}++.startup-guide-preview {+ display: flex;+ align-items: center;+ justify-content: center;+ border-radius: var(--radius-lg);+ background: var(--ds-tile);+ padding: 28px 20px;+}++.startup-guide-preview-panel {+ display: grid;+ width: min(100%, 300px);+ gap: 4px;+ border: 1px solid var(--ds-border-subtle);+ border-radius: var(--radius-md-plus);+ background: var(--ds-bg-elevated-opaque);+ box-shadow: var(--ds-shadow-dialog);+ padding: 8px;+}++.startup-guide-preview-search {+ display: flex;+ align-items: center;+ gap: 8px;+ border-radius: var(--radius-sm);+ background: var(--ds-field-inset-bg);+ padding: 8px 10px;+ color: var(--ds-text-muted);+ font-size: var(--text-sm);+}++.startup-guide-preview-row {+ display: flex;+ align-items: center;+ gap: 10px;+ border-radius: var(--radius-sm);+ padding: 7px 10px;+}++.startup-guide-preview-row.is-selected {+ background: var(--ds-bg-active);+}++.startup-guide-preview-icon {+ width: 18px;+ height: 18px;+ flex: 0 0 auto;+ border-radius: var(--radius-xs);+ background: var(--ds-tile-deep);+}++.startup-guide-preview-line {+ height: 8px;+ flex: 1;+ border-radius: var(--radius-full);+ background: var(--ds-tile-deep);+}++.startup-guide-preview-row:nth-child(odd) .startup-guide-preview-line {+ max-width: 60%;+}++.app-announcement-body img {+ display: block;+ max-width: 100%;+ height: auto;+ border-radius: var(--radius-md);+}++@media (max-width: 720px) {+ .startup-guide-launcher {+ grid-template-columns: minmax(0, 1fr);+ }++ .startup-guide-preview {+ display: none;+ }+}++@media (max-width: 560px) {+ .startup-guide-overlay,+ .app-announcement-overlay {+ padding: 12px;+ }++ .startup-guide-header,+ .app-announcement-header {+ padding: 16px 16px 10px;+ }++ .startup-guide-body,+ .app-announcement-body {+ padding: 4px 16px 12px;+ }+}diff --git a/apps/desktop/src/styles/theme-overrides.css b/apps/desktop/src/styles/theme-overrides.cssindex a6d46416f..f79c3391a 100644--- a/apps/desktop/src/styles/theme-overrides.css+++ b/apps/desktop/src/styles/theme-overrides.css@@ -167,36 +167,85 @@background: var(--ds-accent);}-.footer-actions {- display: flex;+/* Footer Settings entry: a labelled row on the sidebar's 32px control line. */+.footer-settings {+ display: inline-flex;+ min-width: 0;+ height: 32px;+ flex: 0 1 auto;align-items: center;- gap: 0;+ gap: 8px;+ border-radius: var(--radius-md);+ padding: 0 10px 0 8px;+ color: var(--ds-text-secondary);+ font-size: var(--text-md);+ line-height: var(--leading-none);+ transition: background var(--motion-duration-fast) var(--motion-ease-out),+ color var(--motion-duration-fast) var(--motion-ease-out);}-/* Shares the notification trigger's 32px hit target so the row reads as one bar. */-.footer-action {- display: inline-flex;- width: 32px;- height: 32px;+.footer-settings:hover {+ background: var(--ds-bg-hover);+ color: var(--ds-text-primary);+}++.footer-settings.active {+ background: var(--ds-bg-active);+ color: var(--ds-text-primary);+}++/* Primary destinations above the session lists (new task, scheduled, plugins). */+.sidebar-primary-nav {+ display: flex;flex: 0 0 auto;+ flex-direction: column;+ gap: 1px;+ padding: 2px 0 6px;+}++.sidebar-primary-item {+ display: flex;+ min-width: 0;+ height: 32px;align-items: center;- justify-content: center;- border-radius: var(--radius-md);- color: var(--ds-text-muted);+ gap: 8px;+ border-radius: var(--radius-sm);+ padding: 0 8px;+ color: var(--ds-text-secondary);+ font-size: var(--text-md);+ line-height: var(--leading-none);+ text-align: left;transition: background var(--motion-duration-fast) var(--motion-ease-out),color var(--motion-duration-fast) var(--motion-ease-out);}-.footer-action:hover {+.sidebar-primary-item:hover {background: var(--ds-bg-hover);color: var(--ds-text-primary);}-.footer-action.active {+.sidebar-primary-item.active {background: var(--ds-bg-active);color: var(--ds-text-primary);}+.sidebar-primary-item > svg {+ flex: 0 0 auto;+ color: var(--ds-text-muted);+}++.sidebar-primary-item:hover > svg,+.sidebar-primary-item.active > svg {+ color: currentColor;+}++.sidebar-primary-label {+ min-width: 0;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+}+.composer-toolbar .icon-btn {height: 28px;min-width: 28px;diff --git a/apps/desktop/test/app-overlays.test.mjs b/apps/desktop/test/app-overlays.test.mjsnew file mode 100644index 000000000..a46b9b3a6--- /dev/null+++ b/apps/desktop/test/app-overlays.test.mjs@@ -0,0 +1,158 @@+import assert from "node:assert/strict";+import { readFile } from "node:fs/promises";+import { register } from "node:module";+import test from "node:test";++register(new URL("./helpers/ts-import-hooks.mjs", import.meta.url));+const model = await import("../src/features/startup/app-overlay-model.ts");+const { createInteractionSlice } = await import("../src/stores/slices/interaction-slice.ts");++const read = (path) => readFile(new URL(path, import.meta.url), "utf8");++test("only one app overlay shows, by priority guide > announcement > settings", () => {+ const all = { guide: true, announcement: true, settings: true };+ assert.equal(model.resolveAppOverlay(all), "guide");+ assert.equal(model.resolveAppOverlay({ ...all, guide: false }), "announcement");+ assert.equal(+ model.resolveAppOverlay({ guide: false, announcement: false, settings: true }),+ "settings",+ );+ assert.equal(+ model.resolveAppOverlay({ guide: false, announcement: false, settings: false }),+ null,+ );+});++test("startup guide: new users configure a model, returning users learn the launcher", () => {+ assert.deepEqual(+ model.planStartupGuide({ completedVersion: 0, hasUsableModel: false }),+ { audience: "new", steps: ["model", "launcher"] },+ );+ assert.deepEqual(+ model.planStartupGuide({ completedVersion: 0, hasUsableModel: true }),+ { audience: "returning", steps: ["launcher"] },+ );+ assert.equal(+ model.planStartupGuide({+ completedVersion: model.STARTUP_GUIDE_VERSION,+ hasUsableModel: false,+ }),+ null,+ "a finished or skipped guide version never returns",+ );+});++test("announcement is off by default and shows at most once per release", () => {+ const release = { id: "0.24.0" };+ const empty = { shownIds: [] };+ assert.equal(model.shouldShowAnnouncement(null, empty), false, "off by default");+ assert.equal(model.shouldShowAnnouncement(release, empty), true);+ const shown = model.announcementShown(release, empty);+ assert.equal(model.shouldShowAnnouncement(release, shown), false, "closed means never again");+ assert.strictEqual(model.announcementShown(release, shown), shown, "recording twice is a no-op");+ assert.equal(model.shouldShowAnnouncement({ id: "0.25.0" }, shown), true, "next release starts fresh");+ let history = empty;+ for (let i = 0; i < 30; i += 1) history = model.announcementShown({ id: `v${i}` }, history);+ assert.equal(history.shownIds.length, 20, "history stays bounded");+});++test("a replayed guide follows the user's current model state", () => {+ assert.deepEqual(model.startupGuideFor(true).steps, ["launcher"]);+ assert.deepEqual(model.startupGuideFor(false).steps, ["model", "launcher"]);+});++test("announcement locale fallback", () => {+ assert.deepEqual(model.announcementLocaleCandidates("zh-TW"), ["zh-TW", "zh", "en"]);+ assert.deepEqual(model.announcementLocaleCandidates("en"), ["en"]);+ assert.deepEqual(model.announcementLocaleCandidates(undefined), ["en"]);+});++function harness() {+ let state = {+ page: "chat",+ activeSessionId: "s1",+ settingsOpen: false,+ settingsTab: "appearance",+ settingsAnchor: null,+ settingsTabNonce: 0,+ navStack: [{ page: "chat", sessionId: "s1" }],+ navIndex: 0,+ };+ const actions = createInteractionSlice({+ get: () => state,+ set: (update) => {+ state = { ...state, ...(typeof update === "function" ? update(state) : update) };+ },+ runtime: { beginNavigationIntent: () => 1 },+ interactionRuntime: {},+ });+ state = { ...state, ...actions };+ return { get: () => state };+}++test("Settings is a dialog over the current page, not a route", () => {+ const h = harness();+ h.get().openSettings();+ assert.equal(h.get().settingsOpen, true);+ assert.equal(h.get().page, "chat", "the page underneath stays");+ assert.equal(h.get().navStack.length, 1, "opening Settings records no history");++ h.get().setSettingsTab("about");+ assert.equal(h.get().settingsTab, "about");+ assert.equal(h.get().settingsTabNonce, 1);++ h.get().setSettingsAnchor("updates.title");+ h.get().closeSettings();+ assert.equal(h.get().settingsOpen, false);+ assert.equal(h.get().settingsAnchor, null, "a pending anchor does not outlive the dialog");++ h.get().openSettings("shortcuts");+ assert.equal(h.get().settingsOpen, true);+ assert.equal(h.get().settingsTab, "shortcuts");+ h.get().setPage("plugins");+ assert.equal(h.get().settingsOpen, false, "navigating to a page dismisses Settings");+ assert.equal(h.get().page, "plugins");+});++test("the shell mounts one overlay host and Settings no longer replaces the shell", async () => {+ const [shell, host, runtime] = await Promise.all([+ read("../src/features/app/AppShell.tsx"),+ read("../src/features/startup/AppOverlayHost.tsx"),+ read("../src/features/app/useAppShellRuntime.tsx"),+ ]);+ assert.match(shell, /<AppOverlayHost active=\{!showSplash\} \/>/);+ assert.doesNotMatch(shell, /page === "settings"/);+ assert.doesNotMatch(runtime, /"settings"/);+ assert.match(host, /resolveAppOverlay\(/);+ assert.match(host, /<SettingsDialog onClose=\{closeSettings\} \/>/);+});++test("the startup guide embeds the shared Settings destination", async () => {+ const [guide, settingsPage] = await Promise.all([+ read("../src/features/startup/StartupGuideDialog.tsx"),+ read("../src/features/settings/SettingsPage.tsx"),+ ]);+ assert.match(guide, /<SettingsDestinationContent tab="agent" \/>/);+ assert.match(settingsPage, /<SettingsDestinationContent tab=\{tab\} tabHidden=\{tabHidden\} \/>/);+});++test("guide replay and launcher detection are wired end to end", async () => {+ const [host, about, guide, launcher] = await Promise.all([+ read("../src/features/startup/AppOverlayHost.tsx"),+ read("../src/features/settings/pages/AboutSettings.tsx"),+ read("../src/features/startup/StartupGuideDialog.tsx"),+ read("../electron/main/bootstrap/launcher.ts"),+ ]);+ // Settings → About replays the guide without touching the first-launch marker.+ assert.match(about, /useStartupGuideRequest\.getState\(\)\.request\(\)/);+ assert.match(host, /if \(guide\?\.source === "auto"\) saveStartupGuideCompletedVersion/);+ // Keycaps light up when the launcher actually opens.+ assert.match(guide, /api\.onPluginLauncherShown\(\(\) => setPressed\(true\)\)/);+ assert.match(guide, /keybindingMatchesEvent\(binding, event, platform\)/);+ assert.match(launcher, /mainWindow\.webContents\.send\(IPC\.event\.pluginLauncherShown\)/);+});++test("the chat home no longer carries the first-run checklist", async () => {+ const chat = await read("../src/components/ChatSurface.tsx");+ assert.doesNotMatch(chat, /OnboardingChecklist/);+});diff --git a/apps/desktop/test/app-shell-settings-accessibility.test.mjs b/apps/desktop/test/app-shell-settings-accessibility.test.mjsindex a0cebb1a3..23063717a 100644--- a/apps/desktop/test/app-shell-settings-accessibility.test.mjs+++ b/apps/desktop/test/app-shell-settings-accessibility.test.mjs@@ -11,15 +11,20 @@ const settingsPage = await readFile("utf8",);-test("settings hides and inerts chat without aria-hiding a focused descendant", () => {+test("Settings is a modal over the chat shell, which stays mounted and visible", async () => {const chatShell = appShell.match(/<div\s+className="app-chat-shell"[\s\S]*?>/,)?.[0];+ const dialog = await readFile(+ new URL("../src/features/settings/SettingsDialog.tsx", import.meta.url),+ "utf8",+ );assert.ok(chatShell, "chat shell must exist");- assert.match(chatShell, /hidden=\{page === "settings"\}/);- assert.match(chatShell, /inert=\{page === "settings" \? true : undefined\}/);- assert.doesNotMatch(chatShell, /aria-hidden/);+ assert.doesNotMatch(chatShell, /hidden=|inert=|aria-hidden/);+ assert.match(dialog, /role="dialog"/);+ assert.match(dialog, /aria-modal="true"/);+ assert.match(dialog, /useModalDialog\(dialogRef, \{ onClose \}\)/);});test("entering Settings moves focus to its first search control", () => {@@ -31,7 +36,7 @@ test("entering Settings moves focus to its first search control", () => {assert.match(settingsPage, /<input\s+ref=\{settingsSearchRef\}/);});-test("chat code loads inside the existing route boundary and stays mounted in Settings", () => {+test("chat code loads inside the existing route boundary and stays mounted under Settings", () => {assert.match(appShell,/const loadChatSurface = \(\) => import\("\.\.\/\.\.\/components\/ChatSurface"\)/,@@ -45,6 +50,6 @@ test("chat code loads inside the existing route boundary and stays mounted in Se);assert.match(appShell,- /className="app-chat-shell"[\s\S]*?hidden=\{page === "settings"\}[\s\S]*?<ChatSurface visible=\{page === "chat"\} \/>/,+ /className="app-chat-shell"[\s\S]*?<ChatSurface visible=\{page === "chat"\} \/>/,);});diff --git a/apps/desktop/test/config-sync-settings.test.mjs b/apps/desktop/test/config-sync-settings.test.mjsindex 1bb508e18..918a15b1b 100644--- a/apps/desktop/test/config-sync-settings.test.mjs+++ b/apps/desktop/test/config-sync-settings.test.mjs@@ -10,7 +10,10 @@ import {const read = (relativePath) =>readFile(new URL(relativePath, import.meta.url), "utf8");-const settingsPage = await read("../src/features/settings/SettingsPage.tsx");+// The rail lives in SettingsPage; destination bodies in SettingsDestinationContent.+const settingsPage =+ (await read("../src/features/settings/SettingsPage.tsx")) ++ (await read("../src/features/settings/SettingsDestinationContent.tsx"));const settingsIndex = await read("../src/lib/settings-search.ts");const syncPage = await read("../src/components/settings/ConfigSyncPage.tsx");const connectionFields = await read("../src/components/settings/ConfigSyncConnectionFields.tsx");diff --git a/apps/desktop/test/home-empty-layout.test.mjs b/apps/desktop/test/home-empty-layout.test.mjsindex 0e6d1afde..8335e520e 100644--- a/apps/desktop/test/home-empty-layout.test.mjs+++ b/apps/desktop/test/home-empty-layout.test.mjs@@ -6,10 +6,9 @@ import { loadStyles } from "./helpers/styles.mjs";const read = (path) => readFile(new URL(path, import.meta.url), "utf8");-const [chatSurface, styles, checklist, composer] = await Promise.all([+const [chatSurface, styles, composer] = await Promise.all([read("../src/components/ChatSurface.tsx"),loadStyles(),- read("../src/components/OnboardingChecklist.tsx"),readComposerSource(),]);@@ -24,7 +23,8 @@ test("empty home uses a single scrollable stack instead of dual-grow portals", (chatSurface,/empty-hero-subtitle|emptySubtitle(?:Temporary)?/,);- assert.match(chatSurface, /<OnboardingChecklist \/>/);+ // First-run help moved to the startup guide (issue #2431).+ assert.doesNotMatch(chatSurface, /OnboardingChecklist/);assert.match(chatSurface, /<div className="home-composer-wrap">/);assert.doesNotMatch(chatSurface,@@ -60,11 +60,8 @@ test("empty home keeps the primary task surface focused", () => {const emptyEnd = chatSurface.indexOf("<SessionPane", emptyStart);assert.notEqual(emptyEnd, -1, "the pane branch must follow the empty block");const emptyBlock = chatSurface.slice(emptyStart, emptyEnd);- const onboardingAt = emptyBlock.indexOf("<OnboardingChecklist />");const composerAt = emptyBlock.indexOf("home-composer-wrap");- assert.notEqual(onboardingAt, -1);assert.notEqual(composerAt, -1);- assert.ok(onboardingAt < composerAt, "onboarding must precede composer in markup");assert.match(emptyBlock,/<div className="home-scroll">[\s\S]*?<\/div>\s*<div className="home-composer-wrap">/,@@ -79,8 +76,6 @@ test("empty home keeps the primary task surface focused", () => {test("short windows keep the empty stack scrollable rather than overlapping", () => {assert.match(styles, /@media \(max-height:\s*760px\)/);assert.match(styles, /@media \(max-height:\s*640px\)/);- assert.match(checklist, /home-onboarding-checklist/);- assert.doesNotMatch(checklist, /\bmt-6\b/);});test("empty home keeps the composer in a bottom region", () => {diff --git a/apps/desktop/test/interaction-performance.test.mjs b/apps/desktop/test/interaction-performance.test.mjsindex 7d25f14c5..96b0c2149 100644--- a/apps/desktop/test/interaction-performance.test.mjs+++ b/apps/desktop/test/interaction-performance.test.mjs@@ -38,13 +38,17 @@ test("streaming state stays inside the chat render boundary", () => {});test("chat configuration errors still navigate to agent settings", () => {+ // setSettingsTab opens the Settings dialog on that destination.assert.match(chatSurface, /store\.setSettingsTab\("agent"\)/);- assert.match(chatSurface, /store\.setPage\("settings"\)/);});-test("secondary destinations stay outside the initial shell bundle", () => {- assert.match(appShell, /const SettingsPage = lazy/);- assert.match(appShell, /import\("\.\.\/\.\.\/pages\/SettingsPage"\)/);+test("secondary destinations stay outside the initial shell bundle", async () => {+ const overlayHost = await read("../src/features/startup/AppOverlayHost.tsx");+ assert.match(overlayHost, /const SettingsDialog = lazy\(/);+ assert.match(overlayHost, /import\("\.\.\/settings\/SettingsDialog"\)/);+ assert.match(overlayHost, /const StartupGuideDialog = lazy\(/);+ assert.match(overlayHost, /const AnnouncementDialog = lazy\(/);+ assert.doesNotMatch(overlayHost, /^import \{[^}]*\} from "\.\.\/settings\/SettingsDialog"/m);assert.match(appShell, /import\("\.\.\/\.\.\/pages\/PluginsPage"\)/);assert.match(appShell, /<Suspense fallback=\{<RoutePending \/>\}>/);});diff --git a/apps/desktop/test/interaction-polish.test.mjs b/apps/desktop/test/interaction-polish.test.mjsindex 4377e0d87..0e585e74f 100644--- a/apps/desktop/test/interaction-polish.test.mjs+++ b/apps/desktop/test/interaction-polish.test.mjs@@ -11,7 +11,8 @@ test("high-traffic chrome uses shared motion tokens on hover fills", () => {".stop-btn",".composer-plus-item",".search-item",- ".footer-action",+ ".footer-settings",+ ".sidebar-primary-item",".notification-item",".work-panel-tab-close",]) {diff --git a/apps/desktop/test/macos-opaque-window-surface.test.mjs b/apps/desktop/test/macos-opaque-window-surface.test.mjsindex 9036c0d44..a68344fe6 100644--- a/apps/desktop/test/macos-opaque-window-surface.test.mjs+++ b/apps/desktop/test/macos-opaque-window-surface.test.mjs@@ -165,7 +165,7 @@ test("only macOS sidebar and splash surfaces receive the translucent glass treatconst macAncestorBlock =stylesSource.match(- /:root\[data-platform="darwin"\],\n:root\[data-platform="darwin"\] body,\n:root\[data-platform="darwin"\] #root,\n:root\[data-platform="darwin"\] \.app-shell,\n:root\[data-platform="darwin"\] \.settings-shell\s*\{[^}]*\}/,+ /:root\[data-platform="darwin"\],\n:root\[data-platform="darwin"\] body,\n:root\[data-platform="darwin"\] #root,\n:root\[data-platform="darwin"\] \.app-shell\s*\{[^}]*\}/,)?.[0] ?? "";assert.match(macAncestorBlock, /background:\s*transparent/);diff --git a/apps/desktop/test/notification-contract.test.mjs b/apps/desktop/test/notification-contract.test.mjsindex 441daf4b4..588f36fda 100644--- a/apps/desktop/test/notification-contract.test.mjs+++ b/apps/desktop/test/notification-contract.test.mjs@@ -67,8 +67,10 @@ test("terminal notifications flow from host completion to the renderer", () => {assert.match(storeSource, /receiveNotification:/);assert.match(storeSource, /unreadNotificationCount/);assert.match(appSource, /api\.onNotificationChanged/);- assert.match(sidebarSource, /<NotificationCenter onBeforeOpen=\{\(\) => closeMenus\(false\)\} \/>/);- assert.doesNotMatch(appSource, /<NotificationCenter \/>/);+ // The sidebar no longer carries a notification entry (issue #2431); the+ // durable inbox state keeps flowing for sidebar outcome badges.+ assert.doesNotMatch(sidebarSource, /<NotificationCenter\b/);+ assert.doesNotMatch(appSource, /<NotificationCenter\b/);const changedHandler = appSource.match(/api\.onNotificationChanged[\s\S]*?\n\s*\}\);/,)?.[0] ?? "";diff --git a/apps/desktop/test/plugin-themes.test.mjs b/apps/desktop/test/plugin-themes.test.mjsindex 31cbe3da3..d1394dcb7 100644--- a/apps/desktop/test/plugin-themes.test.mjs+++ b/apps/desktop/test/plugin-themes.test.mjs@@ -106,15 +106,13 @@ test("scenic plugins use the normal full-window shell for compositing", () => {// context and pin route overlays underneath the window chrome.assert.doesNotMatch(baseSrc, /\.app-shell\s*>\s*:not\(\.app-scenic-backdrop\)/);assert.match(settingsSrc, /data-plugin-theme\^="plugin:io\.github\.akshayxkill\.nexus-scenic-themes:/);- assert.match(settingsSrc, /\.app-shell\.settings-mode[^}]*background:\s*transparent\s*!important/s);- assert.match(settingsSrc, /\.settings-content[^}]*background:\s*transparent\s*!important/s);+ // Settings is a modal dialog now, not a full-window takeover of the shell.+ assert.doesNotMatch(settingsSrc, /\.settings-mode\b/);});-test("scenic plugin themes expose a full-window settings compositing hook", () => {+test("scenic plugin themes tint the Settings dialog rail and panels", () => {const settingsCss = readFileSync(join(desktopRoot, "src/styles/settings.css"), "utf8");assert.match(settingsCss, /data-plugin-theme\^="plugin:io\.github\.akshayxkill\.nexus-scenic-themes:/);- assert.match(settingsCss, /\.app-shell\.settings-mode[^}]*background:\s*transparent\s*!important/s);- assert.match(settingsCss, /\.settings-content[^}]*background:\s*transparent\s*!important/s);assert.match(settingsCss, /\.settings-shell-full\s+\.settings-nav\.sidebar-surface[^}]*background:\s*color-mix/s);assert.match(settingsCss, /\.settings-panel[^}]*background:\s*color-mix/s);});diff --git a/apps/desktop/test/project-create-dialog.test.mjs b/apps/desktop/test/project-create-dialog.test.mjsindex faebc060a..4cc4d43fb 100644--- a/apps/desktop/test/project-create-dialog.test.mjs+++ b/apps/desktop/test/project-create-dialog.test.mjs@@ -82,7 +82,7 @@ test("project creation creates one logical group with a primary workspace", () =assert.match(store, /get\(\)\.renameProject\(groupPrimary, normalizedName\)/);assert.match(store,- /set\(\{\s*createProjectDialogOpen: false,\s*createProjectDialogRemoteHostKey: undefined,\s*onboarding,\s*page: "chat"\s*\}\)/,+ /set\(\{\s*createProjectDialogOpen: false,\s*createProjectDialogRemoteHostKey: undefined,\s*onboarding,\s*page: "chat",\s*settingsOpen: false\s*\}\)/,);// Folder picks and git checkouts share one project creation semantic.assert.match(store, /async function createNamedProjectGroup\(/);diff --git a/apps/desktop/test/session-switch-performance.test.mjs b/apps/desktop/test/session-switch-performance.test.mjsindex 8c9bcb678..9be5bae26 100644--- a/apps/desktop/test/session-switch-performance.test.mjs+++ b/apps/desktop/test/session-switch-performance.test.mjs@@ -71,7 +71,7 @@ test("only the latest navigation may commit a loaded transcript", () => {const selection = sessionSlice.match(/selectSession: async[\s\S]*?\n newSession: async/,)?.[0] ?? "";- assert.match(selection, /set\(\{ selectingSessionId: id, page: "chat" \}\)/);+ assert.match(selection, /set\(\{ selectingSessionId: id, page: "chat", settingsOpen: false \}\)/);assert.match(selection, /navigationIntentIsCurrent\(intent\)/);// The final commit carries the loaded detail window — unless a concurrent// idle edit superseded the read while it was in flight, in which case thediff --git a/apps/desktop/test/settings-developer-only-destinations.test.mjs b/apps/desktop/test/settings-developer-only-destinations.test.mjsindex fdfa4ecac..60fa90942 100644--- a/apps/desktop/test/settings-developer-only-destinations.test.mjs+++ b/apps/desktop/test/settings-developer-only-destinations.test.mjs@@ -16,10 +16,13 @@ import {visibleSettingsNav,} from "../src/lib/settings-search.ts";-const settingsPage = readFileSync(- new URL("../src/features/settings/SettingsPage.tsx", import.meta.url),- "utf8",-);+// The rail lives in SettingsPage; destination bodies in SettingsDestinationContent.+const settingsPage =+ readFileSync(new URL("../src/features/settings/SettingsPage.tsx", import.meta.url), "utf8") ++ readFileSync(+ new URL("../src/features/settings/SettingsDestinationContent.tsx", import.meta.url),+ "utf8",+ );const searchDialog = readFileSync(new URL("../src/components/SearchDialog.tsx", import.meta.url),"utf8",diff --git a/apps/desktop/test/settings-drag-region.test.mjs b/apps/desktop/test/settings-drag-region.test.mjsindex f0f5b34e8..34e3f057f 100644--- a/apps/desktop/test/settings-drag-region.test.mjs+++ b/apps/desktop/test/settings-drag-region.test.mjs@@ -1,55 +1,23 @@import { readSettingsSource } from "./helpers/source-contracts.mjs";import assert from "node:assert/strict";-import { readFile } from "node:fs/promises";import test from "node:test";import { loadStyles } from "./helpers/styles.mjs";const settingsSource = await readSettingsSource();const globalStyles = await loadStyles();-test("settings exposes a native drag region over the content column", () => {- assert.match(- settingsSource,- /<div className="settings-titlebar" aria-hidden="true" \/>/,- );- assert.match(- globalStyles,- /\.settings-titlebar\s*\{[^}]*height:\s*var\(--ds-toolbar-height\);[^}]*background:\s*var\(--ds-bg-primary\);[^}]*border-bottom:\s*0;[^}]*-webkit-app-region:\s*drag;/s,- );+test("the Settings dialog owns no window drag region", () => {+ // Settings is a modal over the shell; the shell keeps its own titlebar drag+ // band, so the dialog must not add one that would swallow control clicks.+ assert.doesNotMatch(settingsSource, /settings-titlebar/);+ assert.doesNotMatch(settingsSource, /className="[^"]*\bdrag\b[^"]*"/);+ assert.doesNotMatch(globalStyles, /\.settings-titlebar\b/);});-test("settings drag band stops at the nav rail so surfaces stay consistent", () => {- // The band paints --ds-bg-primary. Spanning the full window width laid that- // surface over the rail's own tone, so the strip above the rail no longer- // matched the rail beneath it.- // Anchor to the base rule; platform overrides also mention the class.- const band = /\n\.settings-titlebar\s*\{([^}]*)\}/s.exec(globalStyles);- assert.ok(band, "expected a .settings-titlebar rule");- assert.match(band[1], /left:\s*var\(--ds-settings-nav-width\);/);- assert.match(band[1], /right:\s*0;/);- assert.doesNotMatch(band[1], /inset-inline:\s*0;/);- // Physical insets keep chrome.css's `right` override winning on specificity;- // a logical inset here would instead win on declaration order and push the- // band under the Windows/Linux window-control capsule.- assert.doesNotMatch(band[1], /inset-inline-end:/);-- // Rail and band must read the same width token or the seam drifts apart.+test("the Settings rail keeps the shared width token", () => {assert.match(globalStyles,/\.settings-shell-full \.settings-nav\s*\{[^}]*width:\s*var\(--ds-settings-nav-width\);[^}]*flex:\s*0 0 var\(--ds-settings-nav-width\);/s,);assert.match(globalStyles, /--ds-settings-nav-width:\s*275px;/);-- // The rail still drags the window even though the band no longer covers it.- assert.match(settingsSource, /className="settings-nav-top drag"/);-});--test("settings drag region does not capture control clicks", () => {- assert.match(- globalStyles,- /\.settings-titlebar\s*\{[^}]*pointer-events:\s*none;/s,- );- assert.match(settingsSource, /className="settings-back no-drag"/);- assert.match(settingsSource, /className="settings-search-wrap no-drag"/);- assert.match(settingsSource, /className="settings-nav-scroll no-drag"/);});diff --git a/apps/desktop/test/sidebar-collapse-animation.test.mjs b/apps/desktop/test/sidebar-collapse-animation.test.mjsindex 7038fc84d..b2d1021a7 100644--- a/apps/desktop/test/sidebar-collapse-animation.test.mjs+++ b/apps/desktop/test/sidebar-collapse-animation.test.mjs@@ -304,7 +304,7 @@ test("the sidebar toggle never captures a stale collapsed state", () => {appSource,/setSidebarCollapsed\(\(collapsed\) => !collapsed\)/,);- assert.match(appSource, /useSidebarTransition\(\s*sidebarCollapsed,\s*ready && page !== "settings"/);+ assert.match(appSource, /useSidebarTransition\(\s*sidebarCollapsed,\s*ready,?\s*\)/);assert.match(appSource, /if \(current !== transition\) setTransition\(current\)/);assert.match(appSource, /return \(\) => window\.clearTimeout\(timer\)/);assert.match(appSource, /state === current \? \{ \.\.\.state, phase: "idle" \} : state/);diff --git a/apps/desktop/test/sidebar-footer.test.mjs b/apps/desktop/test/sidebar-footer.test.mjsindex fe86c7ec0..91586a96a 100644--- a/apps/desktop/test/sidebar-footer.test.mjs+++ b/apps/desktop/test/sidebar-footer.test.mjs@@ -3,10 +3,10 @@ import { readFile } from "node:fs/promises";import test from "node:test";import { loadStyles } from "./helpers/styles.mjs";-const sidebarSource = await readFile(- new URL("../src/components/Sidebar.tsx", import.meta.url),- "utf8",-);+const sidebarSource =+ (await readFile(new URL("../src/components/Sidebar.tsx", import.meta.url), "utf8")) ++ (await readFile(new URL("../src/components/SidebarNavigation.tsx", import.meta.url), "utf8"));+const footerSource = sidebarSource.slice(sidebarSource.indexOf("export function SidebarFooter"));const globalStyles = await loadStyles();const zhLocale = await readFile(new URL("../../../packages/i18n/src/locales/zh-CN/index.ts", import.meta.url),@@ -31,50 +31,20 @@ test("the sidebar footer is an action bar, not a fabricated identity", () => {}});-test("footer exposes settings, plugins, scheduled tasks and notifications in one row", () => {- assert.match(sidebarSource, /className="footer-actions"/);- assert.match(sidebarSource, /data-nav="settings"/);- assert.match(sidebarSource, /data-nav="plugins"/);- const pluginsAction = sidebarSource.match(- /<TooltipButton[\s\S]*?data-nav="plugins"[\s\S]*?<\/TooltipButton>/,- )?.[0] ?? "";- assert.match(pluginsAction, /<IconPlug size=\{14\} aria-hidden \/>/);- assert.doesNotMatch(sidebarSource, /data-nav="theme"/);- assert.match(- sidebarSource,- /<NotificationCenter onBeforeOpen=\{\(\) => closeMenus\(false\)\} \/>/,+test("footer keeps only Settings and the version chip", () => {+ assert.deepEqual(+ [...footerSource.matchAll(/data-nav="([^"]+)"/g)].map((match) => match[1]),+ ["settings", "build"],);+ // Settings is a labelled entry that opens the Settings dialog.+ assert.match(footerSource, /className=\{cx\("footer-settings", settingsOpen && "active"\)\}/);+ assert.match(footerSource, /aria-haspopup="dialog"/);+ assert.match(footerSource, /onClick=\{\(\) => openSettings\(\)\}/);+ assert.match(footerSource, /t\("nav\.settings"\)/);+ // The notification entry is gone from the sidebar (issue #2431).+ assert.doesNotMatch(sidebarSource, /NotificationCenter/);// Logs live in Settings → About; the footer stays down to daily controls.assert.doesNotMatch(sidebarSource, /openLogs/);- // Every action is icon-only, so each needs a label for pointer and AT users.- const actions = sidebarSource- .split("<TooltipButton")- .filter((chunk) => /className=(?:"footer-action"|\{`footer-action )/.test(chunk));- assert.equal(actions.length, 3);- for (const action of actions) {- const attrs = action.slice(0, action.indexOf(">"));- assert.match(attrs, /tooltip=/);- assert.match(attrs, /ariaLabel=/);- }- // All footer destinations report their active state to assistive tech; the- // Plugins button also reports the Back toggle a second activation performs.- const footerAttributes = (marker) => {- const at = sidebarSource.indexOf(marker);- if (at < 0) return "";- return sidebarSource.slice(- sidebarSource.lastIndexOf("<TooltipButton", at),- sidebarSource.indexOf("</TooltipButton>", at),- );- };- assert.match(- footerAttributes('data-nav="settings"'),- /aria-pressed=\{page === "settings"\}/,- );- assert.match(- footerAttributes('data-nav="plugins"'),- /aria-pressed=\{page === "plugins"\}/,- );- assert.match(footerAttributes('data-nav="scheduled"'), /aria-pressed=\{page === "scheduled"\}/);});test("footer sits on the sidebar content grid without a hairline", () => {@@ -87,11 +57,11 @@ test("footer sits on the sidebar content grid without a hairline", () => {assert.match(globalStyles, /\.footer-build\s*\{[^}]*padding:\s*5px 8px/s);});-test("footer action buttons share the notification trigger's hit target", () => {- const block = globalStyles.match(/\.footer-action\s*\{[^}]+\}/)?.[0] ?? "";- assert.match(block, /width:\s*32px/);+test("footer Settings entry shares the 32px control line", () => {+ const block = globalStyles.match(/\.footer-settings\s*\{[^}]+\}/)?.[0] ?? "";assert.match(block, /height:\s*32px/);assert.match(block, /transition:[^;]*var\(--motion-duration-fast\)/);+ assert.doesNotMatch(globalStyles, /\.footer-action\s*\{/);});test("build chip surfaces the version and only dots an actionable update", () => {diff --git a/apps/desktop/test/sidebar-navigation.test.mjs b/apps/desktop/test/sidebar-navigation.test.mjsindex 550429bd4..aa796ed04 100644--- a/apps/desktop/test/sidebar-navigation.test.mjs+++ b/apps/desktop/test/sidebar-navigation.test.mjs@@ -26,12 +26,33 @@ const shortcutSource = await readFile(new URL("../../../packages/shared/src/keyboard-shortcuts.ts", import.meta.url),"utf8",);-test("home sidebar exposes only the supported destination entries", () => {+test("home sidebar exposes only the supported destination entries", async () => {+ const navigationSource = await readFile(+ new URL("../src/components/SidebarNavigation.tsx", import.meta.url),+ "utf8",+ );assert.match(sidebarSource, /data-nav="home"/);- assert.match(sidebarSource, /data-nav="plugins"/);- assert.doesNotMatch(sidebarSource, /data-nav="projects"/);- assert.match(sidebarSource, /data-nav="scheduled"/);- assert.doesNotMatch(sidebarSource, /t\("nav\.scheduled"\)/);+ assert.match(sidebarSource, /<SidebarPrimaryNav onNewTask=\{onNewTask\}/);+ assert.match(sidebarSource, /<SidebarFooter \/>/);+ // Top: new task, scheduled, plugin market. Footer: settings + version only.+ const primary = navigationSource.slice(+ navigationSource.indexOf("export function SidebarPrimaryNav"),+ navigationSource.indexOf("export function SidebarFooter"),+ );+ const footer = navigationSource.slice(navigationSource.indexOf("export function SidebarFooter"));+ assert.deepEqual(+ [...primary.matchAll(/data-nav="([^"]+)"/g)].map((match) => match[1]),+ ["new-task", "scheduled", "plugins"],+ );+ assert.deepEqual(+ [...footer.matchAll(/data-nav="([^"]+)"/g)].map((match) => match[1]),+ ["settings", "build"],+ );+ assert.match(primary, /t\("nav\.pluginMarket"\)/);+ assert.match(primary, /usePluginBrowseState\.getState\(\)\.setTab\("market"\)/);+ assert.match(primary, /settings\?\.scheduledTasksEnabled !== false/);+ assert.doesNotMatch(sidebarSource + navigationSource, /data-nav="projects"/);+ assert.doesNotMatch(sidebarSource + navigationSource, /t\("nav\.scheduled"\)/);});test("sidebar brand returns to the chat home", () => {diff --git a/apps/desktop/test/sidebar-settings-return.test.mjs b/apps/desktop/test/sidebar-settings-return.test.mjsindex 514462562..5a62131c7 100644--- a/apps/desktop/test/sidebar-settings-return.test.mjs+++ b/apps/desktop/test/sidebar-settings-return.test.mjs@@ -6,26 +6,18 @@ import { loadStyles } from "./helpers/styles.mjs";const idle = (collapsed = false, presented = true) => ({ collapsed, presented, phase: "idle" });-test("Settings hides the mounted chat shell and keeps its portal layers out of view", async () => {- const [appShell, styles, portalVisibility] = await Promise.all([+test("Settings opens as a dialog over the mounted chat shell", async () => {+ const [appShell, styles] = await Promise.all([readFile(new URL("../src/features/app/AppShell.tsx", import.meta.url), "utf8"),loadStyles(),- readFile(new URL("../src/lib/portal-visibility.tsx", import.meta.url), "utf8"),]);- assert.match(appShell, /<PortalVisibilityProvider visible=\{page !== "settings"\}>/);- assert.match(appShell, /className="app-chat-shell"[\s\S]*?hidden=\{page === "settings"\}/);- assert.match(appShell, /inert=\{page === "settings" \? true : undefined\}/);- const chatShell = appShell.match(/<div\s+className="app-chat-shell"[\s\S]*?>/)?.[0];- assert.ok(chatShell, "chat shell must exist");- assert.doesNotMatch(chatShell, /aria-hidden/);- assert.match(appShell, /className="app-chat-shell"[\s\S]*?<ChatSurface visible=\{page === "chat"\} \/>/);- assert.match(appShell, /\{page === "settings" \? \([\s\S]*?<SettingsPage \/>/);+ assert.doesNotMatch(appShell, /PortalVisibilityProvider|settings-mode/);+ assert.match(appShell, /<div className="app-chat-shell">/);assert.match(appShell, /<ChatSurface visible=\{page === "chat"\} \/>/);+ assert.match(appShell, /<AppOverlayHost active=\{!showSplash\} \/>/);assert.match(appShell, /<SearchDialog open=\{searchOpen\}/);assert.match(styles, /\.app-chat-shell\s*\{\s*display:\s*contents;/);- assert.match(styles, /\.app-chat-shell\[hidden\]\s*\{\s*display:\s*none;/);- assert.match(portalVisibility, /<PortalVisibilityContext\.Consumer>[\s\S]*visible \? node : null/);- assert.match(portalVisibility, /createPortal\(visiblePortalContent\(node\), document\.body\)/);+ assert.match(styles, /\.settings-dialog\s*\{[^}]*width:\s*min\(100%, 1080px\);/);});test("initial shell presentation and settings return never play sidebar entrance", () => {@@ -70,10 +62,7 @@ test("home and settings use the same material without animating the settings plaassert.match(settings, /className="settings-nav sidebar-surface"/);assert.match(styles, /\.sidebar-surface,\s*\.sidebar-rail\s*\{[^}]*background-color:\s*var\(--ds-bg-sidebar[^}]*background-image:\s*var\(--ds-bg-sidebar-image/);assert.match(styles, /:root\[data-platform="darwin"\] \.sidebar-surface,/);- assert.match(styles, /:root\[data-platform="darwin"\] \.settings-shell\s*\{\s*background:\s*transparent;/);- for (const selector of ["settings-content", "settings-titlebar"]) {- assert.match(styles, new RegExp(`\\.${selector}\\s*\\{[^}]*background:\\s*var\\(--ds-bg-primary\\);`));- }+ assert.match(styles, /\.settings-content\s*\{[^}]*background:\s*var\(--ds-bg-primary\);/);assert.doesNotMatch(styles, /\.settings-shell-full \.settings-nav\s*\{[^}]*background:/);assert.match(styles, /\.route-surface,\s*\.settings-content-enter\s*\{[^}]*animation:\s*route-surface-in/);assert.doesNotMatch(styles, /\.route-surface,\s*\.settings-shell-full\s*\{/);diff --git a/apps/desktop/test/topbar-consistency.test.mjs b/apps/desktop/test/topbar-consistency.test.mjsindex 4eeb0c670..675fce2a8 100644--- a/apps/desktop/test/topbar-consistency.test.mjs+++ b/apps/desktop/test/topbar-consistency.test.mjs@@ -12,7 +12,6 @@ test("shell titlebar surfaces share the toolbar metric and borderless surface",for (const selector of ["\\.main-titlebar","\\.conversation-topbar",- "\\.settings-titlebar",]) {const block = styleBlock(selector);assert.match(block, /height:\s*var\(--ds-toolbar-height\);/);@@ -41,8 +40,6 @@ test("sidebar and work-panel headers use the shared toolbar metric", () => {assert.match(styleBlock("\\.sidebar-header"), /height:\s*var\(--ds-toolbar-height\);/);assert.match(styleBlock("\\.sidebar-header"), /flex:\s*0 0 var\(--ds-toolbar-height\);/);assert.match(styleBlock("\\.work-panel-header"), /height:\s*var\(--ds-toolbar-height\);/);- assert.match(- styleBlock("\\.settings-content"),- /padding:\s*calc\(var\(--ds-toolbar-height\) \+ 8px\) 48px 56px 40px;/,- );+ // The Settings dialog has no titlebar band to clear.+ assert.match(styleBlock("\\.settings-content"), /padding:\s*28px 48px 48px 40px;/);});diff --git a/apps/desktop/test/utility-navigation.test.mjs b/apps/desktop/test/utility-navigation.test.mjsindex 7f0de2869..4315307d5 100644--- a/apps/desktop/test/utility-navigation.test.mjs+++ b/apps/desktop/test/utility-navigation.test.mjs@@ -8,10 +8,10 @@ register(new URL("./helpers/ts-import-hooks.mjs", import.meta.url));const { createInteractionSlice } = await import("../src/stores/slices/interaction-slice.ts");const { usePluginBrowseState } = await import("../src/features/plugins/browse-state.ts");-// Execute the actual footer handler against the real history slice. Native-// rendering and retained composer behavior are covered by the manual UI journey.-const source = ts.createSourceFile("Sidebar.tsx",- readFileSync(new URL("../src/components/Sidebar.tsx", import.meta.url), "utf8"),+// Execute the actual sidebar Plugin market handler against the real history+// slice. Native rendering is covered by the manual UI journey.+const source = ts.createSourceFile("SidebarNavigation.tsx",+ readFileSync(new URL("../src/components/SidebarNavigation.tsx", import.meta.url), "utf8"),ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX);const handlers = [];function visit(node) {@@ -23,9 +23,12 @@ function visit(node) {ts.forEachChild(node, visit);}visit(source);-assert.equal(handlers.length, 1, "identify the Plugins footer handler uniquely");+assert.equal(handlers.length, 1, "identify the Plugin market handler uniquely");const clickFooter = new Function("state",- `const { page, canNavBack, navBack, setPage } = state; return (${handlers[0]})();`);+ `const { page, canNavBack, navBack, setPage } = state;+ const onBeforeNavigate = undefined;+ const openPluginMarket = () => setPage("plugins");+ return (${handlers[0]})();`);function harness(page = "chat") {let intents = 0;@@ -46,8 +49,8 @@ function harness(page = "chat") {set: (patch) => { state = { ...state, ...patch }; } };}-for (const page of ["chat", "scheduled", "settings"]) {- test(`Plugins footer goes back one history entry to ${page}`, () => {+for (const page of ["chat", "scheduled"]) {+ test(`Plugin market goes back one history entry to ${page}`, () => {const h = harness(page);h.click();assert.equal(h.get().page, "plugins");@@ -66,20 +69,20 @@ for (const page of ["chat", "scheduled", "settings"]) {});}-test("Plugins footer respects the immediate history entry, including Settings", () => {- const h = harness("scheduled");- h.actions.setPage("settings");+test("Plugin market respects the immediate history entry", () => {+ const h = harness("chat");+ h.actions.setPage("scheduled");h.click();h.click();- assert.equal(h.get().page, "settings");+ assert.equal(h.get().page, "scheduled");assert.equal(h.get().navIndex, 1);h.actions.navForward();assert.equal(h.get().page, "plugins");h.click();- assert.equal(h.get().page, "settings");+ assert.equal(h.get().page, "scheduled");});-test("Plugins without earlier history falls back to chat", () => {+test("Plugin market without earlier history falls back to chat", () => {for (const navStack of [[], [{ page: "plugins" }]]) {const h = harness("plugins");h.set({ navStack, navIndex: navStack.length - 1 });diff --git a/apps/desktop/test/window-menu.test.mjs b/apps/desktop/test/window-menu.test.mjsindex 146aa7e87..6ae92a1a8 100644--- a/apps/desktop/test/window-menu.test.mjs+++ b/apps/desktop/test/window-menu.test.mjs@@ -223,7 +223,7 @@ test("Windows and Linux use menu-free frameless chrome with window controls", ()assert.match(stylesSource, /--ds-window-controls-width:\s*120px;/);assert.match(stylesSource,- /:root\[data-platform="win32"\] \.main-titlebar,[\s\S]*:root\[data-platform="linux"\] \.settings-titlebar\s*\{[^}]*right:\s*var\(--ds-window-controls-width\);/,+ /:root\[data-platform="win32"\] \.main-titlebar,\s*:root\[data-platform="linux"\] \.main-titlebar\s*\{[^}]*right:\s*var\(--ds-window-controls-width\);/,);assert.match(stylesSource,diff --git a/docs/spec/04-ux/01-ui-ia.md b/docs/spec/04-ux/01-ui-ia.mdindex e075a9356..63726a108 100644--- a/docs/spec/04-ux/01-ui-ia.md+++ b/docs/spec/04-ux/01-ui-ia.md@@ -17,23 +17,28 @@ destination, chat as the home surface, tools and permissions inline.| Platform titlebar: macOS traffic lights / Windows/Linux actions |+------------------+--------------------------------+------------------+| Sidebar (275px) | Main pane (active destination) | Work panel |-| | chat home / transcript | (optional, |-| | or Extensions page | resizable |-| | | ≥244px, dynamic|-| Sessions +↕ | | surface |-| Recent rows ↕ | | |-| Projects + | | ◫ | App.tsx ⌄ × |-| Project A | | > | |-| Project B | | ◎ | Active |-| Footer [⚙][plug][☾][bell] | Floating composer (chat) | | resource |+| [⇤] | chat home / transcript | (optional, |+| + New task | or Extensions page | resizable |+| ◷ Scheduled | | ≥244px, dynamic|+| ⧉ Plugin market | | surface |+| Sessions +↕ | | |+| Recent rows ↕ | | ◫ | App.tsx ⌄ × |+| Projects + | | > | |+| Project A | | ◎ | Active |+| ⚙ Settings v0.x | Floating composer (chat) | | resource |+------------------+--------------------------------+------------------+```- **Sidebar**: primary navigation — path-less conversations under a compact**Sessions** section with new-session and sort actions, retained open-projectgroups under a following **Projects** section with a persistent new-project- action, and the WorkBuddy-inspired footer. The footer keeps compact Settings,- Extensions, Scheduled (clock), and notification icon actions. Each retained+ action. Above the lists, three labelled primary rows: **New task**,+ **Scheduled** (hidden while scheduled tasks are disabled) and **Plugin+ market** (opens the Extensions page on its Market tab; activating it again+ while Extensions is active performs one Back step). The footer holds only a+ labelled **Settings** entry (opens the Settings dialog) on the left and the+ version/update chip on the right. The sidebar has no notification entry+ (issue #2431). Each retainedproject is apath-keyed tab/group that can becollapsed independently. Project and conversation rows expose@@ -82,10 +87,10 @@ destination, chat as the home surface, tools and permissions inline.macOS keeps native traffic lights and its existing fullscreen insets.Destination history isshortcut-first (`Cmd/Ctrl+[` and `Cmd/Ctrl+]`) with no dedicated back/forward- chrome; while Extensions is active, the footer Plugins button performs one- Back step as the only pointer affordance. The main titlebar has no- notification action; the durable local inbox opens from the sidebar footer- bell instead (D130/D117). In work-panel preview mode, MainChat is unmounted+ chrome; while Extensions is active, the sidebar Plugin market row performs one+ Back step as the only pointer affordance. Neither the main titlebar nor the+ sidebar has a notification action (D130/D117 superseded by issue #2431); the+ durable local inbox keeps feeding sidebar outcome badges. In work-panel preview mode, MainChat is unmountedand a window-level 46px chrome row keeps New Task, sidebar, and native windowcontrols available without owning a drag or no-drag rectangle across thepanel. The panel header alone owns dragging in the preview pane; its actual@@ -319,7 +324,7 @@ read without closing the editor or waiting for the old request to settle.A replacement failure exposes the existing Retry action.Settings → Behavior → Execution → Scheduled tasks controls this feature, on by default-(`scheduledTasksEnabled` absent or true). Off hides the footer and search page+(`scheduledTasksEnabled` absent or true). Off hides the sidebar Scheduled row and search pageentries and prevents new runs without deleting tasks or run history. Thesettings switch remains searchable so the feature can be re-enabled.@@ -352,7 +357,7 @@ session search never list it, and Open conversation is the explicit action thatcarries it into the chat route, and the chat top bar then offers thatconversation's own way back: the row names the task it belongs to, and returningrestores the same task and the same run, reusing the navigation history when-this route is directly behind it. The footer clock and global search open+this route is directly behind it. The sidebar Scheduled row and global search openthis route. Run now dispatches in the background, selects the run it admitted,and leaves the reader on this page. Automatic runs never steal foregroundfocus. See [desktop automations](../../adr/scheduled-desktop-automations.md).@@ -468,19 +473,21 @@ shared capability contract:|---|---|---|| Command palette | Cmd/Ctrl+K (also Cmd/Ctrl+Shift+P per D014) | builtin + plugin commands || Model menu | Composer-right model × reasoning chip | configured provider/model choices + settings entry (D091) |-| Profile menu | sidebar footer | Settings / Logs / Theme cycle (D041) |-| Notification inbox | sidebar footer bell | All/Unread views, task failure rows only (successful completions are hidden, D295), mark-all-read and clear actions (D130/D117) |+| Settings dialog | sidebar footer Settings, `Mod+,`, deep links | modal over the current page; waits behind the startup guide and announcement ([06-settings-ia](06-settings-ia.md) §1) |+| Startup guide / announcement | first launch (once) or Settings → About / first launch of a release with an enabled announcement (once) | [05-onboarding](05-onboarding.md) §3–§5 |+| Notification inbox | none (entry removed, issue #2431) | All/Unread views, task failure rows only (successful completions are hidden, D295), mark-all-read and clear actions (D130/D117) || Toasts | events (plugin toast, backend restored, copy) | top-center of the live main-content safe area; viewport fallback; 4s default, 8s for errors || Project switcher | empty-home underlined project name | sidebar open projects + search + clone git project + open project |## 5. Navigation model-- `page` state: `chat | scheduled | plugins | settings`; `chat` is the- conversation-surface route, not an operating mode. The project+- `page` state: `chat | scheduled | plugins`; `chat` is the+ conversation-surface route, not an operating mode. Settings is a modal+ dialog (`settingsOpen`), not a page; it records no history. The projectarchive is the `projects` settings tab rather than a standalone page.- Destination history is linear; `Cmd/Ctrl+[` and `Cmd/Ctrl+]` traverse itwithout persistent back/forward chrome. While Extensions is active, the- footer Plugins button reuses one Back step (§2 shell regions); no separate+ sidebar Plugin market row reuses one Back step (§2 shell regions); no separateback or forward control is added.- Selecting a project tab reuses `project.set` when its path differs from theselected host workspace and keeps the other tabs retained.@@ -533,7 +540,7 @@ shared capability contract:- Completed/failed turn not already visible → host-core appends one durableinbox row. A result shown in the visible, focused current chat and every`aborted` turn append none. Background sessions and any turn finishing while- the window is unfocused still append. The sidebar footer bell lists only+ the window is unfocused still append. The (currently unmounted) notification inbox lists only`task.failed` rows and its badge counts only unread failures; successfulcompletions stay in the durable record for the sidebar outcome badge andnative notification but never appear in the inbox (D295). Selecting a rowdiff --git a/docs/spec/04-ux/05-onboarding.md b/docs/spec/04-ux/05-onboarding.mdindex 150077f2b..bd31d7aca 100644--- a/docs/spec/04-ux/05-onboarding.md+++ b/docs/spec/04-ux/05-onboarding.md@@ -1,60 +1,71 @@# 05. Onboarding-## 1. Decision for MVP+## 1. Decision-Use an **inline first-run checklist**, not a multi-page modal wizard.+First-run help is a short, skippable **startup guide** modal (§3). The former+inline chat-home checklist is removed so users are not guided twice+(issue #2431). The host-side onboarding state (`app.getOnboarding`) is still+read but no longer rendered.-Reasons:--- faster to first value-- less blocking-- easier to skip/return--## 2. First-run detection--Show checklist when any of these is true:--1. no provider configured-2. no secret present for default provider-3. no session exists yet--Persist dismissal state, but incomplete critical steps can reappear as banners.--## 3. Checklist steps--1. **Add a provider**-2. **Save an API key**-3. **Open a project folder**-4. **Send your first prompt**-5. *(Optional)* Load a development plugin--## 4. Placement--- shown in main chat empty state-- provider and key items deep-link to Settings → Agent-- the optional plugin item opens the app shell's Plugins destination-- project and prompt items invoke their relevant app actions-- checklist collapses after core steps complete--## 5. Copy tone--English source, concise, action-oriented.--Example:--- “Add a model provider”-- “Save your API key”-- “Open a project to enable local tools”--## 6. Non-goals+## 2. Non-goals- account signup- cloud sync setup- long product tour overlays-- forced tutorial for returning users--## 7. Acceptance-1. Fresh profile shows checklist-2. Completing provider+key+prompt removes critical empty-state blocker-3. User can dismiss optional parts without breaking app use+## 3. Startup guide++A modal shown when the shell first becomes interactive (after the boot+splash). Implementation: `features/startup/` (`app-overlay-model.ts` holds the+rules, `AppOverlayHost.tsx` owns presentation).++- **Audience**: users with a usable chat model (an enabled, credentialed+ provider with at least one non-image model) are *returning* users; everyone+ else is *new*, even with other configuration or data. Decided once per+ launch; configuring a model during the guide does not switch the audience.+ - *New*: **Model** → **Plugin launcher**.+ - *Returning*: **Plugin launcher** only.+- **Model step** embeds the same Models destination as Settings+ (`SettingsDestinationContent tab="agent"`). It is optional: *Set up later* /+ *Skip* move on without a model; the footer shows whether one is ready.+- **Plugin launcher step** is two columns. Left: the resolved+ `openPluginLauncher` binding as keycaps (user overrides respected), a status+ line, *Open plugin launcher* and *Change shortcut* (ends the guide and opens+ Settings → Shortcuts). Right: a static thumbnail of the launcher panel.+ Keycaps start dimmed and turn active once the user opens the launcher — Main+ forwards `pluginLauncher/event/shown` to the main window, and a matching+ keydown that reaches the window counts too. The step can be skipped.+- **Automatic guide shows once**: Skip, close, `Escape` or Finish marks+ `STARTUP_GUIDE_VERSION` done in renderer `localStorage`+ `pi.desktop.startupGuide` `{ completedVersion }`. Bumping the version shows+ it again. A blocked store degrades to showing the guide.+- **Replay**: Settings → About → *Startup guide* opens the guide for the+ user's current state. A replay never writes the completion marker. While it+ is up, Settings waits underneath and returns when the guide ends.+- Not shown in screenshot capture (`window.__PI_CAPTURE__`).++## 4. Release announcement++A reserved, normally-off modal for a plain-language note about an important+release change. Content is Markdown (text + images) bundled with the release+under `features/startup/announcements/` (see its README); there is no server+component.++- Off while `RELEASE_ANNOUNCEMENT` is `null` (the default) or its English+ content is missing. Its id is the release version.+- Shown at most once per release: it is recorded as seen as soon as it is on+ screen and never repeats for that id. State: `localStorage`+ `pi.desktop.announcement` `{ shownIds }` (bounded).+- Locale fallback: exact locale → base language → English.+- Images must be bundled assets under the announcement's `assets/` folder;+ any other image reference is dropped. Links open in the system browser+ (`https://` only). Raw HTML is not rendered.++## 5. Modal priority++The startup guide, the release announcement and the Settings dialog share one+host and only one is mounted: **guide > announcement > settings**. At launch the+guide is decided first; when it ends, an enabled and not-yet-shown+announcement follows. A Settings request made while either is open is kept+and opens afterwards. The model configuration inside the guide is part of the+guide, not a Settings request.diff --git a/docs/spec/04-ux/06-settings-ia.md b/docs/spec/04-ux/06-settings-ia.mdindex ff03f312e..e7a83e3a1 100644--- a/docs/spec/04-ux/06-settings-ia.md+++ b/docs/spec/04-ux/06-settings-ia.md@@ -1,9 +1,28 @@# 06. Settings Information Architecture-## 1. Settings root (Codex full-page shell)+## 1. Settings root (modal dialog)-Settings is a **full-window page** that replaces the app sidebar + main chrome (Codex electron behavior):+Settings is a **modal dialog** over the current page (chat, Scheduled or+Extensions). It is not a route: opening it records no navigation history and+the page underneath keeps its state.+- Opened from the sidebar footer **Settings** entry, `Mod+,`, the native menu,+ global search hits and in-app deep links (`setSettingsTab` / `openSettings`).+ Closed by the dialog's close button, `Escape`, or a press on the backdrop.+ `Escape` belongs to the innermost layer: a menu, shortcut recorder or nested+ dialog that handles it keeps the dialog open. Navigating to a page+ (`setPage`), selecting a session, creating a project, or **New task** closes+ the dialog, as leaving the former full-window page did.+- Settings is the lowest of the three app-level modals. It waits while the+ startup guide or the release announcement is open and appears after them+ (priority guide > announcement > settings, see `05-onboarding.md`).+- The dialog is up to 1080 × 760px inside a 24px viewport margin (12px below+ 760px wide), portaled to the `#pi-desktop-overlays` host on the dialog layer+ (z 40). Native plugin views beneath are hidden while it is open.+- Each destination body is `SettingsDestinationContent`, shared with other+ surfaces (the startup guide embeds the Models destination) so a row behaves+ identically wherever it appears. Settings reads/writes go through+ `useSettingsPersistence`.- Switching to a different Settings destination starts the content pane at thetop, including plugin destinations. Re-selecting the current destination orupdating settings in place preserves the current scroll position. Global@@ -16,33 +35,17 @@ Settings is a **full-window page** that replaces the app sidebar + main chrome (shows a compact loading/failure state with a retry action instead of an emptysection.-- Left settings rail only, **275px**, using the same `sidebar-surface` material- as the main sidebar: native vibrancy with shared tint/sheen on macOS, opaque- `--ds-bg-sidebar` on Windows/Linux, and shared optional background imagery.- macOS settings-wrapper ancestry is transparent; the content pane and its- titlebar remain opaque. Only a nested settings content enter wrapper plays a- route animation; the scrolling inner pane, rail, and backing never fade or- translate. That entrance is opacity-only. Settings dialogs and sheets portal- to a viewport-fixed `#pi-desktop-overlays` host on the document element and- cover the full window, including the rail.-- Returning to the app restores the prior sidebar collapsed/expanded state- without a sidebar entrance animation or a width ramp. Real toggle and- automatic collapse/restore transitions on the visible shell still animate;- initial presentation and route restoration do not.-- Top of rail: traffic-light clearance and the pill **Search settings…**-- The **Back to app** (`返回应用`) action is pinned to the foot of the rail, not- the top: it keeps its chevron + label form as a 32px control, and it shares- the horizontal band of the main shell's sidebar footer icon row (settings /- plugins / notifications), so the action does not jump vertically when the- full-page takeover opens or closes. The directory above it scrolls when the- window is too short for every destination, so a pinned action never covers a- row-- The 46px top band is a native window drag region across both the rail and the- content pane, but it is drawn in two parts so each keeps its own surface: the- rail drags via its own top strip on the rail surface, and the content pane's- band starts at the rail edge on the primary surface. The band must never paint- the primary surface over the rail, which would show two colors in one top row.- Interactive controls remain explicitly non-draggable+- Left settings rail only, **275px** (200px below 760px wide), using the same+ `sidebar-surface` material as the main sidebar. Only a nested settings+ content enter wrapper plays a route animation; the scrolling inner pane,+ rail, and backing never fade or translate. That entrance is opacity-only.+ Dialogs and sheets opened from Settings portal to the same overlay host and+ stack above it.+- Top of rail: the pill **Search settings…**. The rail has no footer action;+ the dialog's close button sits at its top-right corner.+- The dialog is not a window drag region.+- Info (About) carries a **Startup guide** row that replays the startup guide+ (`05-onboarding.md` §3) without resetting its first-launch marker.- A compact navigation directory with short, parallel labels and icons, in thisexact order. **One destination owns one subject** (D684 / ADR 0345): adestination is never the landing place for whatever did not fit elsewhere,@@ -1057,8 +1060,9 @@ system while preserving their different data ownership:## 3. Navigation rules-- Profile footer / command palette open Settings full page (default Appearance,- the first destination in the directory)+- The sidebar footer Settings entry / command palette open the Settings dialog+ on its last destination (default Appearance, the first destination in the+ directory)- Composer model menu and provider setup actions deep-link to the Providerscard inside Models- Plugin management remains available from the app shell's independent@@ -1066,7 +1070,8 @@ system while preserving their different data ownership:not duplicated in Settings- Project archive is indexed by Settings search and is not duplicated as a homesidebar destination or standalone global-search page-- Back to app returns to chat shell from the rail's pinned footer action+- Closing the dialog (close button, Escape, backdrop) returns to the page+ underneath unchanged- Developer-only destinations, where declared, join and leave the rail, page,and search as one unit. Cloud sync and Remote Hosts are Experimental but notdeveloper-only, so both remain available in packaged builds and are not@@ -1074,9 +1079,10 @@ system while preserving their different data ownership:## 4. Acceptance-1. Opening Settings hides the coding app sidebar (full-page takeover)-2. Rail shows the search pill at the top, the back-to-app action pinned at the- foot on the main sidebar's footer icon line, and exactly Appearance / 外观,+1. Opening Settings shows a modal dialog over the current page; the app+ sidebar and page stay mounted underneath and keep their state+2. Rail shows the search pill at the top, no footer action, and exactly+ Appearance / 外观,Conversation / 对话, Shortcuts / 快捷键, Voice / 语音, Behavior / 行为,Models / 模型, Instructions / 指令, Skills / 技能, MCP, Subagents / 子智能体,Projects / 项目, System / 系统, Cloud sync / 云同步 and Remote Hosts /diff --git a/docs/spec/04-ux/08-component-spec.md b/docs/spec/04-ux/08-component-spec.mdindex 519ea2d3c..3c03ce2d2 100644--- a/docs/spec/04-ux/08-component-spec.md+++ b/docs/spec/04-ux/08-component-spec.md@@ -4055,7 +4055,7 @@ Guidance surfaces when key data is absent. Must always provide an **action link*### 15.5 MVP constraints- No animated empty-state illustrations-- No product tour overlays (per [05-onboarding.md](05-onboarding.md) §6)+- No product tour overlays (per [05-onboarding.md](05-onboarding.md) §2)---diff --git a/docs/spec/06-delivery/e2e/ui-shell.md b/docs/spec/06-delivery/e2e/ui-shell.mdindex 8cfa519dc..0e4cfac40 100644--- a/docs/spec/06-delivery/e2e/ui-shell.md+++ b/docs/spec/06-delivery/e2e/ui-shell.md@@ -344,8 +344,9 @@window and complete another turn in A. 4) Restore/focus the app from itstaskbar or Dock without switching sessions and confirm A's visible terminaloutcome is acknowledged. 5) Abort a fourth turn. 6) Repeat each terminal- RPC. 7) Confirm the main titlebar has no bell, then open the bell in- the expanded sidebar footer and switch between All and Unread. 8) Mark one+ RPC. 7) Confirm neither the main titlebar nor the sidebar has a bell+ (issue #2431); the remaining steps verify durable inbox state through the+ host fixture rather than a visible inbox. 8) Mark onerow read and confirm its session has no terminal sidebar mark, thenclose/reopen the popover and restart the app. 9) Select the other sessionfrom its terminal-marked sidebar row. 10) Generate a host fixture with 205@@ -362,8 +363,7 @@matching durable outcome and taskbar count without clearing B. Exactly tworows exist, newest first: the unfocused A completion and background B failure,with localized labels, snapshotted session titles, and B's stable code.- Abort/repeated terminal calls create no row. The former footer Help shortcut- is absent; the 32px footer bell and its upward-opening popover replace it.+ Abort/repeated terminal calls create no row. No bell is rendered.Badge and Unread show the exact unread count without opening implicitlyreading rows. Read state and bothrecords survive restart. Row selection marks it read and activates its bound@@ -1209,11 +1209,12 @@remains a dotted-underline action when a workspace is open.## US-UI-03 Sidebar destinations-- Expect the expanded home sidebar to show Sessions and Projects without- standalone Plugins or Scheduled rows.-- Click the plug-shaped Plugins icon in the sidebar footer, immediately to the- right of Settings, and expect it to replace the main pane with a dedicated- page.+- Expect the expanded home sidebar to show, top to bottom: New task,+ Scheduled, Plugin market, then Sessions and Projects. The footer holds only+ Settings and the version chip; there is no notification entry.+- Click Plugin market and expect the Extensions page to replace the main pane+ on its Market tab, with the Installed tab and enable/disable controls still+ available.- Open Settings → Project archive and use it to open, switch, and close a localfolder workspace.@@ -1225,8 +1226,8 @@## US-UI-05 Locale chrome- On a zh-CN system locale, sidebar labels render in Chinese (项目 / 临时会话),- with no extra standalone destination rows. The footer plug-shaped Plugins icon- exposes the localized accessible name 插件.+ and the primary rows read 新建任务 / 定时任务 / 插件市场; the footer reads 设置+ plus the version chip.- Empty-thread hero and supporting line are localized Chinese copy; projectname remains a dotted-underline action when a workspace is open.- Composer omits the 本地 workspace label and shows Agent/Plan/Goal plus the@@ -1290,11 +1291,9 @@## US-UI-16 Sidebar footer utility layout- On the light/dark home shell, the sidebar footer is a transparent utility- band with no separator. Settings, Plugins, and notification actions- are grouped on the left, while the build/version chip is right-aligned.-- The notification Bell remains visible in the left action group with its- unread badge and opens the inbox above the footer; the main titlebar has no- duplicate Bell.+ band with no separator. A labelled Settings entry sits on the left and the+ build/version chip is right-aligned; nothing else is in the footer.+- Clicking Settings opens the Settings dialog over the current page.- Clicking the build/version chip checks for updates when current, or opensSettings → Info when an actionable update is available.- Traffic lights sit at Codex `{x:16,y:16}` with a 46px toolbar; the expanded@@ -1394,17 +1393,42 @@- Switch the sort to Name and expect rows to reorder inside every section withno row hidden; clear the search and expect the complete index back.-## US-UI-24 Settings full-page shell-- Open Settings (footer profile → Settings).-- Expect **full-page** Codex settings (no app sidebar/nav). Left rail has Back- to app, search, and exactly General / AI / Shortcuts / Instructions / Models /- Skills / MCP / Subagents / Projects, Cloud sync / Remote Hosts / Info in that- order; packaged builds show both Cloud sync and Remote Hosts with Experimental- badges. The content pane shows the selected destination.-- Return to the app shell and expect Plugins to remain an independent- sidebar-footer destination.-- Drag the empty 46px top band over either the rail or content pane; the native- window moves while Back, search, and navigation remain clickable.+## US-UI-24 Settings dialog+- Open Settings from the sidebar footer, `Mod+,`, global search, or an in-app+ "Open settings" deep link.+- Expect a **modal dialog** over the current page (sidebar and page stay+ mounted beneath the scrim). The rail has search and the destination+ directory of `04-ux/06-settings-ia.md` §2, plus any plugin-contributed+ destinations; the close button sits at the dialog's top-right.+- Deep links land on their destination and flash the anchored row. A plugin+ settings destination renders inside the dialog.+- Close with the close button, `Escape`, or a backdrop press and expect the+ page underneath unchanged. `Escape` inside an open menu, the shortcut+ recorder, or a nested dialog closes only that layer.+- Opening a project or session from Settings → Project archive closes the+ dialog and lands on chat.++## US-UI-24a Startup guide+- **Fresh profile, no model**: on first launch the guide opens after the boot+ splash with *Model* then *Plugin launcher*. The model step shows the same+ Models page as Settings; *Set up later* continues without a model.+- **Profile with a usable model**: only the *Plugin launcher* step shows.+- The launcher step shows actions on the left and a launcher thumbnail on the+ right. Keycaps start dimmed; pressing the configured shortcut (or *Open+ plugin launcher*) opens the launcher and the keycaps turn active. *Skip*+ and *Done* both end the guide.+- Relaunch: the guide does not reappear. Settings → Info → *Startup guide*+ replays it for the current state, Settings returns when it ends, and the+ next launch still shows no guide.+- The chat home shows no first-run checklist.++## US-UI-24b Release announcement and modal priority+- With `RELEASE_ANNOUNCEMENT` null (default) nothing extra appears.+- With an announcement enabled (fixture build): first launch shows the guide,+ then the announcement (Markdown text + bundled image), then nothing.+ Relaunch: the announcement does not reappear for the same release.+- Press `Mod+,` while the guide or announcement is open: Settings does not+ cover it and opens once both are closed.## US-UI-27 Dark destination pages- Force dark theme and open Plugins and Settings → Project archive.diff --git a/packages/i18n/src/locales/de/index.ts b/packages/i18n/src/locales/de/index.tsindex a408c1b0c..c95699531 100644--- a/packages/i18n/src/locales/de/index.ts+++ b/packages/i18n/src/locales/de/index.ts@@ -228,6 +228,8 @@ export const de = {},"nav": {"pinnedSessions": "Angeheftet",+ "primary": "Hauptnavigation",+ "pluginMarket": "Plugin-Marktplatz","home": "Startseite","newTask": "Neue Aufgabe","newProject": "Neues Projekt",@@ -960,7 +962,40 @@ export const de = {"loadPlugin": "Laden Sie ein Entwicklungs-Plugin (optional)","dismiss": "Verwerfen"},+ "startupGuide": {+ "progress": "Schritt {{current}} von {{total}}",+ "skip": "Überspringen",+ "next": "Weiter",+ "later": "Später einrichten",+ "finish": "Fertig",+ "model": {+ "title": "Erstes Modell einrichten",+ "description": "Verbinde einen KI-Anbieter, damit PI loslegen kann: Füge unten einen Anbieter hinzu und speichere seinen API-Schlüssel oder melde dich an.",+ "ready": "Modell bereit",+ "pending": "Noch kein nutzbares Modell",+ },+ "launcher": {+ "title": "Plugins mit einem Tastenkürzel aufrufen",+ "description": "Drücke dieses Tastenkürzel jederzeit, um den Plugin-Starter zu öffnen.",+ "unbound": "Kein Tastenkürzel zugewiesen",+ "pointAnywhere": "Funktioniert auch, wenn PI-Desktop im Hintergrund läuft.",+ "pointPlugins": "Installierte Plugins an einem Ort suchen und ausführen.",+ "tryIt": "Jetzt ausprobieren",+ "customize": "Tastenkürzel ändern",+ "pressPrompt": "Drücke das Tastenkürzel, um es auszuprobieren",+ "pressed": "Plugin-Starter geöffnet",+ "previewSearch": "Plugins suchen",+ },+ },+ "announcement": {+ "title": "Neuigkeiten",+ "close": "Schließen",+ "gotIt": "Verstanden",+ },"settings": {+ "startupGuide": "Einführung",+ "startupGuideDesc": "Tipps zur Modelleinrichtung und zum Tastenkürzel des Plugin-Starters erneut ansehen.",+ "openStartupGuide": "Einführung öffnen",scheduledTasks: "Geplante Aufgaben",scheduledTasksDesc: "Wenn deaktiviert, werden geplante Aufgaben ausgeblendet und keine neuen Ausführungen gestartet. Vorhandene Aufgaben und der Verlauf bleiben erhalten.",storage: {diff --git a/packages/i18n/src/locales/en/index.ts b/packages/i18n/src/locales/en/index.tsindex 73de63591..c0a8c24a1 100644--- a/packages/i18n/src/locales/en/index.ts+++ b/packages/i18n/src/locales/en/index.ts@@ -235,6 +235,8 @@ export const en = {},nav: {"pinnedSessions": "Pinned",+ primary: "Primary navigation",+ pluginMarket: "Plugin marketplace",home: "Home",newTask: "New task",newProject: "New project",@@ -972,7 +974,40 @@ deleteRunningSessionBlocked: "Stop the running session before deleting it.",loadPlugin: "Load a development plugin (optional)",dismiss: "Dismiss",},+ startupGuide: {+ progress: "Step {{current}} of {{total}}",+ skip: "Skip",+ next: "Next",+ later: "Set up later",+ finish: "Done",+ model: {+ title: "Set up your first model",+ description: "Connect an AI provider so PI can start working: add a provider below, then save its API key or sign in.",+ ready: "Model ready",+ pending: "No usable model yet",+ },+ launcher: {+ title: "Call up plugins with one shortcut",+ description: "Press this shortcut any time to open the plugin launcher.",+ unbound: "No shortcut assigned",+ pointAnywhere: "Works even while PI-Desktop is in the background.",+ pointPlugins: "Search and run your installed plugins in one place.",+ tryIt: "Try it now",+ customize: "Change shortcut",+ pressPrompt: "Press the shortcut to try it",+ pressed: "Plugin launcher opened",+ previewSearch: "Search plugins",+ },+ },+ announcement: {+ title: "What's new",+ close: "Close",+ gotIt: "Got it",+ },settings: {+ startupGuide: "Startup guide",+ startupGuideDesc: "Replay the model setup and plugin launcher shortcut tips.",+ openStartupGuide: "Open guide",storage: {unavailableHint: "The storage directory is currently unavailable. Reconnect the drive before starting; the app will not create empty data or switch to another directory.",browserSource: "Browser data source",diff --git a/packages/i18n/src/locales/es/index.ts b/packages/i18n/src/locales/es/index.tsindex 0aaf9d543..8a47c0687 100644--- a/packages/i18n/src/locales/es/index.ts+++ b/packages/i18n/src/locales/es/index.ts@@ -228,6 +228,8 @@ export const es = {},"nav": {"pinnedSessions": "Fijadas",+ "primary": "Navegación principal",+ "pluginMarket": "Mercado de plugins","home": "Inicio","newTask": "Nueva tarea","newProject": "Nuevo proyecto",@@ -960,7 +962,40 @@ export const es = {"loadPlugin": "Cargue un complemento de desarrollo (opcional)","dismiss": "Descartar"},+ "startupGuide": {+ "progress": "Paso {{current}} de {{total}}",+ "skip": "Omitir",+ "next": "Siguiente",+ "later": "Configurar más tarde",+ "finish": "Listo",+ "model": {+ "title": "Configura tu primer modelo",+ "description": "Conecta un proveedor de IA para que PI empiece a trabajar: añade un proveedor abajo y guarda su clave de API o inicia sesión.",+ "ready": "Modelo listo",+ "pending": "Aún no hay un modelo utilizable",+ },+ "launcher": {+ "title": "Abre los plugins con un atajo",+ "description": "Pulsa este atajo en cualquier momento para abrir el lanzador de plugins.",+ "unbound": "No hay ningún atajo asignado",+ "pointAnywhere": "Funciona incluso con PI-Desktop en segundo plano.",+ "pointPlugins": "Busca y ejecuta tus plugins instalados en un solo lugar.",+ "tryIt": "Probar ahora",+ "customize": "Cambiar atajo",+ "pressPrompt": "Pulsa el atajo para probarlo",+ "pressed": "Lanzador de plugins abierto",+ "previewSearch": "Buscar plugins",+ },+ },+ "announcement": {+ "title": "Novedades",+ "close": "Cerrar",+ "gotIt": "Entendido",+ },"settings": {+ "startupGuide": "Guía de inicio",+ "startupGuideDesc": "Vuelve a ver las indicaciones de configuración del modelo y del atajo del lanzador de plugins.",+ "openStartupGuide": "Abrir guía",scheduledTasks: "Tareas programadas",scheduledTasksDesc: "Al desactivar, se ocultan las tareas programadas y se detienen las nuevas ejecuciones. Se conservan las tareas existentes y el historial.",storage: {diff --git a/packages/i18n/src/locales/fr/index.ts b/packages/i18n/src/locales/fr/index.tsindex 5e072985b..3fa7c3d30 100644--- a/packages/i18n/src/locales/fr/index.ts+++ b/packages/i18n/src/locales/fr/index.ts@@ -228,6 +228,8 @@ export const fr = {},"nav": {"pinnedSessions": "Épinglées",+ "primary": "Navigation principale",+ "pluginMarket": "Catalogue de plugins","home": "Accueil","newTask": "Nouvelle tâche","newProject": "Nouveau projet",@@ -960,7 +962,40 @@ export const fr = {"loadPlugin": "Charger un plugin de développement (facultatif)","dismiss": "Ignorer"},+ "startupGuide": {+ "progress": "Étape {{current}} sur {{total}}",+ "skip": "Passer",+ "next": "Suivant",+ "later": "Configurer plus tard",+ "finish": "Terminé",+ "model": {+ "title": "Configurer votre premier modèle",+ "description": "Connectez un fournisseur d’IA pour que PI puisse commencer : ajoutez un fournisseur ci-dessous, puis enregistrez sa clé API ou connectez-vous.",+ "ready": "Modèle prêt",+ "pending": "Aucun modèle utilisable pour l’instant",+ },+ "launcher": {+ "title": "Appelez vos plugins d’un raccourci",+ "description": "Appuyez sur ce raccourci à tout moment pour ouvrir le lanceur de plugins.",+ "unbound": "Aucun raccourci attribué",+ "pointAnywhere": "Fonctionne même quand PI-Desktop est en arrière-plan.",+ "pointPlugins": "Recherchez et lancez vos plugins installés au même endroit.",+ "tryIt": "Essayer maintenant",+ "customize": "Modifier le raccourci",+ "pressPrompt": "Appuyez sur le raccourci pour essayer",+ "pressed": "Lanceur de plugins ouvert",+ "previewSearch": "Rechercher des plugins",+ },+ },+ "announcement": {+ "title": "Nouveautés",+ "close": "Fermer",+ "gotIt": "Compris",+ },"settings": {+ "startupGuide": "Guide de démarrage",+ "startupGuideDesc": "Revoir les conseils de configuration du modèle et du raccourci du lanceur de plugins.",+ "openStartupGuide": "Ouvrir le guide",scheduledTasks: "Tâches planifiées",scheduledTasksDesc: "Désactiver masque les tâches planifiées et empêche de nouvelles exécutions. Les tâches existantes et leur historique sont conservés.",storage: {diff --git a/packages/i18n/src/locales/ko/index.ts b/packages/i18n/src/locales/ko/index.tsindex 085742c3f..fe85e5b63 100644--- a/packages/i18n/src/locales/ko/index.ts+++ b/packages/i18n/src/locales/ko/index.ts@@ -237,6 +237,8 @@ export const ko = {},nav: {"pinnedSessions": "고정됨",+ primary: "주 탐색",+ pluginMarket: "플러그인 마켓",home: "홈",newTask: "새 작업",newProject: "새 프로젝트",@@ -969,7 +971,40 @@ export const ko = {loadPlugin: "개발 플러그인 불러오기 (선택 사항)",dismiss: "닫기",},+ startupGuide: {+ progress: "{{total}}단계 중 {{current}}단계",+ skip: "건너뛰기",+ next: "다음",+ later: "나중에 설정",+ finish: "완료",+ model: {+ title: "첫 모델 설정하기",+ description: "AI 제공자를 연결하면 바로 시작할 수 있습니다. 아래에서 제공자를 추가한 뒤 API 키를 저장하거나 로그인하세요.",+ ready: "모델 준비됨",+ pending: "아직 사용할 수 있는 모델이 없습니다",+ },+ launcher: {+ title: "단축키 하나로 플러그인 열기",+ description: "언제든 이 단축키를 누르면 플러그인 런처가 열립니다.",+ unbound: "지정된 단축키가 없습니다",+ pointAnywhere: "PI-Desktop이 백그라운드에 있어도 동작합니다.",+ pointPlugins: "설치된 플러그인을 한곳에서 검색하고 실행하세요.",+ tryIt: "지금 해 보기",+ customize: "단축키 변경",+ pressPrompt: "단축키를 눌러 보세요",+ pressed: "플러그인 런처가 열렸습니다",+ previewSearch: "플러그인 검색",+ },+ },+ announcement: {+ title: "새로운 소식",+ close: "닫기",+ gotIt: "확인",+ },settings: {+ startupGuide: "시작 가이드",+ startupGuideDesc: "모델 설정과 플러그인 런처 단축키 안내를 다시 봅니다.",+ openStartupGuide: "가이드 열기",storage: {unavailableHint: "저장 폴더를 현재 사용할 수 없습니다. 드라이브를 다시 연결한 후 시작하세요. 앱은 빈 데이터를 생성하거나 다른 폴더로 전환하지 않습니다.",browserSource: "브라우저 데이터 원본",diff --git a/packages/i18n/src/locales/pt-BR/index.ts b/packages/i18n/src/locales/pt-BR/index.tsindex 289333f92..a1bc59c14 100644--- a/packages/i18n/src/locales/pt-BR/index.ts+++ b/packages/i18n/src/locales/pt-BR/index.ts@@ -227,6 +227,8 @@ export const ptBR = {},nav: {pinnedSessions: "Fixadas",+ primary: "Navegação principal",+ pluginMarket: "Mercado de plugins",home: "Início",newTask: "Nova tarefa",newProject: "Novo projeto",@@ -959,7 +961,40 @@ export const ptBR = {loadPlugin: "Carregar um plugin de desenvolvimento (opcional)",dismiss: "Dispensar"},+ startupGuide: {+ progress: "Etapa {{current}} de {{total}}",+ skip: "Pular",+ next: "Próximo",+ later: "Configurar depois",+ finish: "Concluir",+ model: {+ title: "Configure seu primeiro modelo",+ description: "Conecte um provedor de IA para o PI começar a trabalhar: adicione um provedor abaixo e salve a chave de API ou entre na conta.",+ ready: "Modelo pronto",+ pending: "Ainda não há modelo utilizável",+ },+ launcher: {+ title: "Abra plugins com um atalho",+ description: "Pressione este atalho a qualquer momento para abrir o inicializador de plugins.",+ unbound: "Nenhum atalho atribuído",+ pointAnywhere: "Funciona mesmo com o PI-Desktop em segundo plano.",+ pointPlugins: "Pesquise e execute seus plugins instalados em um só lugar.",+ tryIt: "Experimentar agora",+ customize: "Alterar atalho",+ pressPrompt: "Pressione o atalho para experimentar",+ pressed: "Inicializador de plugins aberto",+ previewSearch: "Pesquisar plugins",+ },+ },+ announcement: {+ title: "Novidades",+ close: "Fechar",+ gotIt: "Entendi",+ },settings: {+ startupGuide: "Guia inicial",+ startupGuideDesc: "Veja de novo as dicas de configuração do modelo e do atalho do inicializador de plugins.",+ openStartupGuide: "Abrir guia",storage: {unavailableHint: "O diretório de armazenamento está indisponível no momento. Reconecte a unidade antes de iniciar; o aplicativo não criará dados vazios nem mudará para outro diretório.",browserSource: "Origem dos dados do navegador",diff --git a/packages/i18n/src/locales/tr/index.ts b/packages/i18n/src/locales/tr/index.tsindex 0163c2585..f8a48d13e 100644--- a/packages/i18n/src/locales/tr/index.ts+++ b/packages/i18n/src/locales/tr/index.ts@@ -237,6 +237,8 @@ export const tr = {},nav: {"pinnedSessions": "Sabitlenmiş",+ primary: "Ana gezinme",+ pluginMarket: "Eklenti pazarı",home: "Ana sayfa",newTask: "Yeni görev",newProject: "Yeni proje",@@ -969,7 +971,40 @@ export const tr = {loadPlugin: "Geliştirme eklentisi yükleyin (isteğe bağlı)",dismiss: "Kapat",},+ startupGuide: {+ progress: "Adım {{current}} / {{total}}",+ skip: "Atla",+ next: "İleri",+ later: "Daha sonra ayarla",+ finish: "Bitti",+ model: {+ title: "İlk modelini ayarla",+ description: "PI'ın çalışmaya başlaması için bir yapay zekâ sağlayıcısı bağla: aşağıdan bir sağlayıcı ekle, ardından API anahtarını kaydet ya da oturum aç.",+ ready: "Model hazır",+ pending: "Henüz kullanılabilir model yok",+ },+ launcher: {+ title: "Eklentileri tek kısayolla aç",+ description: "Eklenti başlatıcıyı açmak için bu kısayola istediğin zaman bas.",+ unbound: "Atanmış kısayol yok",+ pointAnywhere: "PI-Desktop arka plandayken de çalışır.",+ pointPlugins: "Yüklü eklentilerini tek yerde ara ve çalıştır.",+ tryIt: "Şimdi dene",+ customize: "Kısayolu değiştir",+ pressPrompt: "Denemek için kısayola bas",+ pressed: "Eklenti başlatıcı açıldı",+ previewSearch: "Eklenti ara",+ },+ },+ announcement: {+ title: "Yenilikler",+ close: "Kapat",+ gotIt: "Anladım",+ },settings: {+ startupGuide: "Başlangıç rehberi",+ startupGuideDesc: "Model kurulumu ve eklenti başlatıcı kısayolu ipuçlarını yeniden gör.",+ openStartupGuide: "Rehberi aç",storage: {unavailableHint: "Depolama dizini şu anda kullanılamıyor. Başlatmadan önce sürücüyü yeniden bağlayın; uygulama boş veri oluşturmaz veya başka bir dizine geçmez.",browserSource: "Tarayıcı verisi kaynağı",diff --git a/packages/i18n/src/locales/zh-CN/index.ts b/packages/i18n/src/locales/zh-CN/index.tsindex 5193bea57..ff6316b21 100644--- a/packages/i18n/src/locales/zh-CN/index.ts+++ b/packages/i18n/src/locales/zh-CN/index.ts@@ -230,6 +230,8 @@ export const zhCN = {},nav: {pinnedSessions: "置顶",+ primary: "主导航",+ pluginMarket: "插件市场",home: "首页",newTask: "新建任务",newProject: "新建项目",@@ -965,7 +967,40 @@ deleteRunningSessionBlocked: "请先停止运行中的会话,再删除它。",loadPlugin: "加载开发插件(可选)",dismiss: "关闭",},+ startupGuide: {+ progress: "第 {{current}} 步,共 {{total}} 步",+ skip: "跳过",+ next: "下一步",+ later: "稍后配置",+ finish: "完成",+ model: {+ title: "配置你的第一个模型",+ description: "连接一个 AI 模型服务后即可开始使用:在下方添加服务,然后保存 API 密钥或登录账号。",+ ready: "模型已就绪",+ pending: "尚无可用模型",+ },+ launcher: {+ title: "一个快捷键唤起插件",+ description: "随时按下这个快捷键,即可打开插件面板。",+ unbound: "尚未设置快捷键",+ pointAnywhere: "PI-Desktop 在后台时同样可用。",+ pointPlugins: "在一处搜索并运行已安装的插件。",+ tryIt: "立即试试",+ customize: "修改快捷键",+ pressPrompt: "按下快捷键试试",+ pressed: "已唤起插件面板",+ previewSearch: "搜索插件",+ },+ },+ announcement: {+ title: "更新公告",+ close: "关闭",+ gotIt: "知道了",+ },settings: {+ startupGuide: "启动引导",+ startupGuideDesc: "重新查看模型配置与插件面板快捷键引导。",+ openStartupGuide: "打开引导",storage: {unavailableHint: "保存目录暂时不可用。请重新连接磁盘后启动;应用不会创建空白数据或切换到其他目录。",browserSource: "浏览器数据来源",diff --git a/packages/i18n/src/locales/zh-TW/index.ts b/packages/i18n/src/locales/zh-TW/index.tsindex 022a31009..a803b81ad 100644--- a/packages/i18n/src/locales/zh-TW/index.ts+++ b/packages/i18n/src/locales/zh-TW/index.ts@@ -230,6 +230,8 @@ export const zhTW = {},nav: {pinnedSessions: "釘選",+ primary: "主導覽",+ pluginMarket: "外掛市集",home: "首頁",newTask: "新建任務",newProject: "新建專案",@@ -965,7 +967,40 @@ deleteRunningSessionBlocked: "請先停止執行中的會話,再刪除它。",loadPlugin: "載入開發外掛(可選)",dismiss: "關閉",},+ startupGuide: {+ progress: "第 {{current}} 步,共 {{total}} 步",+ skip: "略過",+ next: "下一步",+ later: "稍後設定",+ finish: "完成",+ model: {+ title: "設定你的第一個模型",+ description: "連接一個 AI 模型服務即可開始使用:在下方新增服務,然後儲存 API 金鑰或登入帳號。",+ ready: "模型已就緒",+ pending: "尚無可用模型",+ },+ launcher: {+ title: "一個快捷鍵叫出外掛",+ description: "隨時按下這個快捷鍵,即可開啟外掛面板。",+ unbound: "尚未設定快捷鍵",+ pointAnywhere: "PI-Desktop 在背景時同樣可用。",+ pointPlugins: "在同一處搜尋並執行已安裝的外掛。",+ tryIt: "立即試試",+ customize: "變更快捷鍵",+ pressPrompt: "按下快捷鍵試試",+ pressed: "已叫出外掛面板",+ previewSearch: "搜尋外掛",+ },+ },+ announcement: {+ title: "更新公告",+ close: "關閉",+ gotIt: "知道了",+ },settings: {+ startupGuide: "啟動導覽",+ startupGuideDesc: "重新查看模型設定與外掛面板快捷鍵導覽。",+ openStartupGuide: "開啟導覽",storage: {unavailableHint: "儲存目錄暫時無法使用。請重新連接磁碟後啟動;應用程式不會建立空白資料或切換到其他目錄。",browserSource: "瀏覽器資料來源",