Skip to content

feat(ui): top-menu overhaul — Workspace menu, MRU jump-list, Prune All#378

Merged
eyelock merged 6 commits into
developfrom
feat/top-menu
Jun 24, 2026
Merged

feat(ui): top-menu overhaul — Workspace menu, MRU jump-list, Prune All#378
eyelock merged 6 commits into
developfrom
feat/top-menu

Conversation

@eyelock

@eyelock eyelock commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Summary

Overhaul the macOS top menu for discoverability. Repository / harness / marketplace operations and terminal navigation were previously reachable only from sidebar toolbars and per-row context menus — undiscoverable and without keyboard access — and the File menu had become a junk drawer. This reorganizes the menus, adds a single Workspace menu for the three sidebar domains, and adds a live terminal jump-list.

Changes

  • Reorganize the bar: File slimmed to terminal lifecycle; View gains sidebar / zoom / board-nav / command-palette; Edit gains Find; Window gains Favourite + the jump-list. Bar goes from 10 top-level menus to 7.
  • Workspace menu: one top-level menu with Repositories / Harnesses / Marketplaces as flyout submenus (Add, Refresh All, Prune All Worktrees, Settings deep-links) plus Logging & Diagnostics — replacing the separate domain menus and the old Utilities menu.
  • Window jump-list: the 5 most-recently-active terminals (MRU), ⌘1–⌘5, with "All Terminals…" → Command Palette; recency tracked on BoardViewModel via selectedCard's didSet.
  • Prune All Worktrees: aggregated dry-run + single confirmation sheet across every repository (PruneAllWorktreesSheet).
  • New SidebarMenuCoordinator routes menu commands to the owning sidebar tab (reveals sidebar, switches tab, tab consumes on appear). WorkspaceCommands keeps the commands builder under @CommandsBuilder's 10-element limit.
  • Localization: 28 new Strings.Menu.* keys in Strings+TopMenu.swift, translated across all 39 languages.

Testing

  • make check passes — build, lint, format, 2036 tests / 0 failures
  • Manual testing completed (Workspace flyouts, MRU jump-list, Prune All)
  • Localization validated — zero NEEDS TRANSLATION placeholders across all 40 language files

Lint exits 0 with 3 pre-existing non-serious length warnings (ContentView, HarnessesSidebarTab type_body_length; WorktreeSidebarView file_length — the last nudged over by Prune All). Splitting those oversized files is tracked as a follow-up.

🤖 Generated with Claude Code

David Collie and others added 6 commits June 24, 2026 17:15
The top menu was sparse and most repository/harness/marketplace
operations were reachable only from sidebar toolbars and context
menus — undiscoverable and without keyboard access. The File menu had
also become a junk drawer of terminal, tab, navigation, zoom, and
sidebar actions.

Reorganize into intent-named menus:
- File: terminal/document lifecycle only (new/open/export/close/delete)
- View: sidebar, zoom, board navigation, command palette, font size
- Edit: Find (its conventional home)
- Window: Favourite Current Terminal

Add three top-level domain menus mirroring the sidebar tabs:
- Repositories: Add, Refresh All, Repository Settings
- Harnesses: Install, Create New, Refresh All, Registries, Tools
- Marketplaces: Add, Refresh All, Restore Defaults, Settings

Global actions route through a new SidebarMenuCoordinator (mirroring
SettingsCoordinator): a menu command reveals the sidebar, switches to
the owning tab, and that tab consumes the request on appear — so the
flows work regardless of which panel was showing. Settings items
deep-link via SettingsCoordinator + openSettings(). The three menus
live in their own DomainMenuCommands type to stay within
@CommandsBuilder's 10-element limit.

Menu labels are hardcoded English for now (consistent with the
existing menu code); extraction into Strings.Menu.* and translation
will follow as a dedicated localization commit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Window menu: a live jump list of open terminals, favourites first then
board order, capped at nine with ⌘1–⌘9 and an "All Terminals…" item
that routes overflow to the Command Palette. The snapshot is published
to the menu via a new windowMenu focused value, rebuilt by ContentView
whenever the board changes; selecting an item jumps to (selects) that
terminal.

Repositories menu: "Prune All Worktrees…" dry-runs a worktree prune
across every repository and presents one aggregated confirmation sheet
(PruneAllWorktreesSheet) listing stale records per repo, then prunes
each on confirm — the all-repos counterpart to the existing per-repo
PruneWorktreesSheet. Routed through SidebarMenuCoordinator like the
other domain-menu actions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-list

Three top-level menus plus Utilities was too much menu-bar real estate.
Collapse Repositories / Harnesses / Marketplaces into flyout submenus
under a single "Workspace" top-level menu, and fold Logging &
Diagnostics (⌘⌥D) in alongside them — removing the separate Utilities
menu. The bar goes from ten top-level menus to seven.

Rework the Window jump-list from "favourites first, then board order,
capped at nine" — which read as an arbitrary jiggled list — to the five
most-recently-active terminals, most recent first (an MRU switcher):
⌘1 is the current terminal, ⌘2 the one before, etc. Recency is tracked
by a transient MRU list on BoardViewModel, updated from selectedCard's
didSet so every selection path (click, next/prev tab, jump) feeds it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Two fixes from review of the Prune All path:
- The menu command had no in-flight guard (unlike the toolbar button,
  which is disabled during analysis), so invoking it twice could stack
  two aggregated prune sheets. Skip when a dry-run is already running.
- When every repository's dry-run threw, the empty candidate list was
  reported as "Nothing to prune" instead of surfacing the errors. Only
  show that alert when the list is genuinely empty and no repo errored.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Extract the hardcoded English labels added for the Workspace menu, the
relocated File/View/Edit/Window items, and the jump-list into 28
Strings.Menu.* keys and translate them across all 39 supported
languages. The new keys live in Strings+TopMenu.swift as an
extension Strings.Menu, matching the Strings+Sidebar / Strings+Diagnostics
split convention (keeping the base Menu enum under the length limit).

"Refresh All" uses a single shared key across the three submenus.
No NEEDS TRANSLATION placeholders ship — every key is translated in
every language file.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@eyelock eyelock merged commit 29ba92a into develop Jun 24, 2026
7 checks passed
@eyelock eyelock deleted the feat/top-menu branch June 24, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant