From 2afd0bf73cd240e1060f18749a5e04b17323ff7f Mon Sep 17 00:00:00 2001 From: Arjun Mahanti Date: Mon, 21 Sep 2026 15:10:01 -0400 Subject: [PATCH] fix(desktop): restore top navigation and resolve explicit workspace lists Signed-off-by: Arjun Mahanti --- desktop/src/app/AppTopChrome.tsx | 5 +- desktop/src/features/pulse/README.md | 17 ++- .../features/pulse/lib/navigationLayout.ts | 3 + .../pulse/lib/workspacePlanner.test.mjs | 10 +- desktop/src/features/pulse/ui/DockTooltip.tsx | 4 +- .../features/pulse/ui/NewWorkspacePopover.tsx | 12 +- .../features/pulse/ui/PulseAppNavigation.css | 23 ++++ .../features/pulse/ui/PulseAppNavigation.tsx | 40 ++++++ .../features/pulse/ui/PulseQuickAccess.tsx | 35 +++-- .../features/pulse/ui/PulseWorkspaceFrame.tsx | 2 +- .../src/features/pulse/ui/WorkspaceTabs.css | 34 +++++ .../src/features/pulse/ui/WorkspaceTabs.tsx | 46 +++++-- .../pulse/voice/explicitWindowList.test.mjs | 124 ++++++++++++++++++ .../pulse/voice/explicitWindowList.ts | 27 ++++ .../pulse/voice/live-window-list-fixtures.mjs | 46 +++++++ desktop/src/features/pulse/voice/plan.ts | 53 +++++--- desktop/tests/e2e/pulse-navigation.spec.ts | 28 ++-- desktop/tests/e2e/workspace-planner.spec.ts | 49 +++++++ docs/try-voice-workspaces.md | 6 +- 19 files changed, 501 insertions(+), 63 deletions(-) create mode 100644 desktop/src/features/pulse/lib/navigationLayout.ts create mode 100644 desktop/src/features/pulse/voice/explicitWindowList.test.mjs create mode 100644 desktop/src/features/pulse/voice/explicitWindowList.ts create mode 100644 desktop/src/features/pulse/voice/live-window-list-fixtures.mjs diff --git a/desktop/src/app/AppTopChrome.tsx b/desktop/src/app/AppTopChrome.tsx index 77b74c124c..ed8c81b782 100644 --- a/desktop/src/app/AppTopChrome.tsx +++ b/desktop/src/app/AppTopChrome.tsx @@ -1,4 +1,5 @@ import * as React from "react"; +import { PULSE_NAVIGATION_LAYOUT } from "@/features/pulse/lib/navigationLayout"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { isMacPlatform } from "@/shared/lib/platform"; @@ -125,7 +126,9 @@ export function AppTopChrome({ className={cn( "relative z-45 flex shrink-0 cursor-default select-none items-center pr-3 text-sidebar-foreground", workspaceNavigation - ? "h-[36px] gap-3 bg-transparent" + ? PULSE_NAVIGATION_LAYOUT === "top" + ? "h-[48px] gap-3 border-b border-border/30 bg-background/40" + : "h-[36px] gap-3 bg-transparent" : topChromeBackdrop.height, navRowPaddingClass, )} diff --git a/desktop/src/features/pulse/README.md b/desktop/src/features/pulse/README.md index f570b8f1e4..a25e08a1f7 100644 --- a/desktop/src/features/pulse/README.md +++ b/desktop/src/features/pulse/README.md @@ -3,7 +3,15 @@ For installation, Jev configuration, and example commands, see the [try-it guide](../../../../docs/try-voice-workspaces.md). -Navigation lives in a vertically centered 64px floating dock on the left, with 48px rounded app icons. Home, Messages, Projects, Agents, Apps, and custom workspaces each have an icon with a right-side tooltip. The selected icon uses an inverse fill. A plus creates a workspace; a separate pins group opens quick conversations. Settings stays at the bottom. Pinned DM avatars fill their 48px slots without a surrounding container. The dock scrolls on shorter windows and overlays the canvas at the top UI layer; windows can pass underneath it. The native title bar is a quiet 36px drag region. Up/Down and Home/End move keyboard focus between workspace icons; Enter/Space selects. F2, double-click, or the context menu opens a rename popover. Tooltips and small pointer-press feedback respect reduced motion. +Navigation currently uses the 48px top bar: labeled workspace tabs on the left, +pinned conversations and Settings on the right. Left/Right and Home/End move +between workspace tabs; Enter/Space selects. New-workspace, pinned-chat and rename +popovers open below their triggers. The persistent bottom command capsule is +unchanged. `lib/navigationLayout.ts` selects this presentation with +`PULSE_NAVIGATION_LAYOUT = "top"`; switch it to `"dock"` to restore the retained +vertically centered floating dock. Both presentations share workspace state, +Jev-selected icons, pinned chats and menus. The dock's layout and styling remain +intact and overlay the canvas without reserving width. The content below the title bar has symmetric 16px side padding. Home and Focus center against the full app width; the dock does not affect their layout. Home has a 720px maximum reading width and no move/resize handles. In Focus, its summary follows the windows in one centered scrolling column. In Grid, Columns and Freeform, it remains anchored independently of window geometry; companions use the side margins or float above it. Other standalone tiled main views have a 960px maximum. Without companions the main view is centered. With companions the canvas fills the padded area and panels share the space left over. Drag the gap between columns to resize adjacent windows, or focus it and use arrow keys (Shift for larger steps), Home/End for the bounds, and Enter or double-click to reset. Split layouts use those widths as defaults; dragging a divider can grow the main window beyond them while keeping neighboring panels usable. Standalone tiled main windows retain their caps. Movable Freeform windows can stretch to the canvas edge, with or without companions. Escape cancels a drag. Sizes are stored once when a drag completes, per layout and community/identity. Narrow canvases stack with no resize handles. The old content-width setting is superseded by this layout. The canvas has no window-count cap; every window and its geometry persist with its workspace. Use the **+** button beside Apps to search joined channels, DMs by participant name, @@ -314,6 +322,13 @@ not mean multiple windows. If only the redundant count answer is uncertain, a fully confident, contiguous target list can confirm that same count; ambiguous or contradictory targets still stop the command. +Comma/newline lists whose items each uniquely match an available catalog name or +alias derive their window slots locally, ignoring capitalization and punctuation +such as channel-name hyphens. Jev resolves those constrained slots and the rest of +the workspace plan without a redundant window-count question. An ambiguous, +unknown, or instruction-bearing item uses the ordinary language planner; no item +is silently dropped. + The command session remembers one successful window/group reference and its movement direction. “Move Kenny and Cynthia to the right”, then “move them more” continues moving exactly that pair. “Make it bigger” can refer to the window just diff --git a/desktop/src/features/pulse/lib/navigationLayout.ts b/desktop/src/features/pulse/lib/navigationLayout.ts new file mode 100644 index 0000000000..6a6b862a1d --- /dev/null +++ b/desktop/src/features/pulse/lib/navigationLayout.ts @@ -0,0 +1,3 @@ +/** Switch presentation without changing workspace state or removing the dock. */ +export type PulseNavigationLayout = "top" | "dock"; +export const PULSE_NAVIGATION_LAYOUT: PulseNavigationLayout = "top"; diff --git a/desktop/src/features/pulse/lib/workspacePlanner.test.mjs b/desktop/src/features/pulse/lib/workspacePlanner.test.mjs index 5f3f23953e..8cef99c116 100644 --- a/desktop/src/features/pulse/lib/workspacePlanner.test.mjs +++ b/desktop/src/features/pulse/lib/workspacePlanner.test.mjs @@ -11,9 +11,13 @@ const workspacePlanInput = (request, catalog) => { workspaces: [], }; const questions = parameterQuestions("create_workspace", request, ctx); - const ids = Object.keys(questions.target_1.criteria).filter((id) => - catalog.some((v) => v.id === id), - ); + const ids = [ + ...new Set( + Object.entries(questions) + .filter(([id]) => id.startsWith("target_")) + .flatMap(([, question]) => Object.keys(question.criteria)), + ), + ].filter((id) => catalog.some((v) => v.id === id)); return { questions, catalog: ids.map((id) => ({ id })) }; }; const person = { diff --git a/desktop/src/features/pulse/ui/DockTooltip.tsx b/desktop/src/features/pulse/ui/DockTooltip.tsx index 6ed3f94a68..e67062d3f8 100644 --- a/desktop/src/features/pulse/ui/DockTooltip.tsx +++ b/desktop/src/features/pulse/ui/DockTooltip.tsx @@ -5,15 +5,17 @@ import { Tooltip, TooltipContent, TooltipTrigger } from "@/shared/ui/tooltip"; export function DockTooltip({ label, children, + side = "right", }: { label: string; children: ReactElement; + side?: "right" | "bottom"; }) { return ( {children} diff --git a/desktop/src/features/pulse/ui/NewWorkspacePopover.tsx b/desktop/src/features/pulse/ui/NewWorkspacePopover.tsx index 60c3175338..ee584cda74 100644 --- a/desktop/src/features/pulse/ui/NewWorkspacePopover.tsx +++ b/desktop/src/features/pulse/ui/NewWorkspacePopover.tsx @@ -7,14 +7,17 @@ import type { WorkspaceController } from "../lib/usePulseWorkspaces"; import { useInterfaceSession } from "../voice/InterfaceCommandsProvider"; import { DockTooltip } from "./DockTooltip"; import { RecipientChoices } from "../voice/RecipientChoices"; +import type { PulseNavigationLayout } from "../lib/navigationLayout"; /** The shared command engine with create-workspace intent already selected. */ export function NewWorkspacePopover({ workspaces, onCreated, + layout = "dock", }: { workspaces: WorkspaceController; onCreated: () => void; + layout?: PulseNavigationLayout; }) { const { commands, surface, show } = useInterfaceSession(); const open = surface === "workspace"; @@ -60,12 +63,15 @@ export function NewWorkspacePopover({ show(value ? "workspace" : null); }} > - + @@ -73,7 +79,7 @@ export function NewWorkspacePopover({ svg { + width: 16px; + height: 16px; +} +.pulse-top-icon[aria-current="page"] { + background: var(--foreground); + color: var(--background); +} +.pulse-top-actions { + -webkit-app-region: no-drag; +} diff --git a/desktop/src/features/pulse/ui/PulseAppNavigation.tsx b/desktop/src/features/pulse/ui/PulseAppNavigation.tsx index f2c76cdc0a..78903efb20 100644 --- a/desktop/src/features/pulse/ui/PulseAppNavigation.tsx +++ b/desktop/src/features/pulse/ui/PulseAppNavigation.tsx @@ -1,4 +1,6 @@ import { SlidersHorizontal } from "lucide-react"; +import { AppTopChromePortal } from "@/app/AppTopChromePortal"; +import { PULSE_NAVIGATION_LAYOUT } from "../lib/navigationLayout"; import { useAppShell } from "@/app/AppShellContext"; import { Action } from "@/shared/ui/action"; import { TooltipProvider } from "@/shared/ui/tooltip"; @@ -30,6 +32,44 @@ export function PulseAppNavigation({ settingsActive?: boolean; }) { const { onOpenSettings } = useAppShell(); + if (PULSE_NAVIGATION_LAYOUT === "top") + return ( + + + + + +
+ + + onOpenSettings?.("profile")} + > + + + +
+
+
+ ); return (