feat(desktop): New plan beside the folded sidebar's toggle, room after the traffic lights, Settings' Back, and fewer tooltips

Merged
DA
11d ago
+185-44

Summary

Three title-bar fixes from Dean.

1. New plan next to the folded sidebar's toggle. While the left sidebar is collapsed, an icon-only New plan button sits right of the sidebar toggle. It uses a new ComposeIcon (pencil over a square), the glyph ChatGPT and Codex put next to their own collapsed-sidebar toggle. Pressing it calls plans.onNewPlan, the same as the sidebar's New plan, and it is disabled under the same condition (!plans.signedIn). It isn't shown while the sidebar is expanded, and not in Settings, which has no toggle either. Both buttons sit in one .title-bar-controls row that renders after the drag strips (see #1840), and each is a no-drag .toolbar-button. While collapsed, --sidebar-toggle-clearance grows to fit both buttons.

Tooltip: #1844 merged first, so this PR wraps the button in <Tooltip label="New plan" command={APP_COMMAND.NEW_PLAN}>. The pill reads "New plan ⌘N", and the button announces Meta+N through aria-keyshortcuts. The sidebar toggle's own Tooltip from #1844 also sits inside .title-bar-controls.

2. Room between the traffic lights and the toggle. The toggle was positioned at left: 80px. That cleared the pre-Tahoe traffic-light group, which ends at about 72px when trafficLightPosition.x is 18. On macOS 26, Electron 43 builds against the Tahoe SDK, and Tahoe's lights are about 7px wider (Zed hit the same thing: 71 → 78). So the green light now ends at about 79px, right against the toggle. That is the "no breathing room" Dean saw.

Every position is now derived from named custom properties:

  • --traffic-lights-end (79px) and --traffic-lights-middle (25px) describe the lights.
  • --title-bar-left puts the row 8px past the green light, about the gap the lights leave between themselves.
  • --title-bar-button is the button size (30px), and the row stays vertically centred on the lights.
  • Main now names the position these are measured from, DESKTOP_WINDOW.TRAFFIC_LIGHTS, instead of an inline literal.

The toggle and New plan sit edge to edge, so the gap between their glyphs equals the gap from the green light to the toggle's glyph, about 17px each.

3. Settings' back button now reads "Back" instead of "Back to plans". Nothing else named the old text: settings search has no row for it, and no test used it. planning-parts.tsx's aria-label="Back to plans" is on a different control and is unchanged.

4. Fewer tooltips, per Dean. Two controls lose their Tooltip:

  • The side panel's tab buttons (Board, Code, Transcript). Their text labels already say what they are. Their ⌥⌘1–3 chords stay in the View menu and on the Keyboard shortcuts page, and the tabs still announce them through aria-keyshortcuts.
  • The settings search's clear (×) button. Its × is the glyph every search field draws.

Copy plan (⇧⌘C) and the microphone keep their tooltips. A new test hovers a tab (no pill) and Copy plan (pill "Copy plan⇧⌘C"), and another hovers the clear button (no pill).

I also added a small .toolbar-button:disabled style (dimmed, no hover fill), so the disabled New plan looks disabled.

Rebased on #1842, #1844, #1847 and #1849. The shell test keeps their tests beside the new ones. The Settings back button keeps #1844's ⌘[ hint after its new "Back" label.

Evidence

  • Platform-independent checks: ./scripts/check.sh exit 0.
  • macOS Electron verification (./scripts/verify.sh): not run. CI could not verify this change: it builds nothing for the Mac, and this PR was written on a Linux cloud VM. LUKE-159 is the manual Mac pass.

Visual evidence

  • Fixture screenshots inspected: not attached. I rendered the real DesktopShell over the built stylesheet in headless Chrome (2x), in three states: collapsed, expanded, and Settings. Chrome draws no traffic lights, so I overlaid stand-ins on Tahoe's assumed geometry: 14px lights from x=18 ending at 79px. In that render the gaps from green light to toggle glyph and from toggle glyph to compose glyph read the same, and "Plan" starts clear of both buttons. Where the toggle actually lands next to the real lights is only confirmed by a Mac.

Physical-device evidence

  • Screenshot or screen recording: not attached
  • Device/display configuration: not recorded

Invariants

  • ./scripts/check.sh green. ./scripts/verify.sh not run (no Mac here).
  • JSON Schema goldens unchanged.
  • Four new tests, each failing without its change. Two go through DesktopShell. One: a collapsed sidebar shows New plan, its pill reads "New plan⌘N", pressing it opens the new-plan page, and expanding the sidebar hides it again. Two: Settings shows no title-bar New plan over a collapsed sidebar, and its back button reads "Back". No CSS change-detector tests.
  • Gateway envelope goldens unchanged.
  • No new as type assertion.
  • No new Effect.runPromise/runSync/runFork.
  • No new raw async primitives.
  • No discarded Effect.
  • Test count grows by four: two in desktop-shell.test.ts, one in desktop-plans.test.ts, one in desktop-settings.test.ts.
  • No hand-rolled file replaced.
  • CLAUDE.md/AGENTS.md untouched; no sentence there names these parts.
  • PRIVACY.md unchanged.
  • No dependency changes.
  • No barrel or door change.

Notes

  • Blockers or follow-up verification: the toggle's position next to the real traffic lights needs a Mac (LUKE-159).

🤖 Generated with Claude Code