Skip to content

feat(app): add v2 home tab toggle#32191

Open
Hona wants to merge 4 commits into
anomalyco:devfrom
Hona:fix/v2-home-toggle-architecture
Open

feat(app): add v2 home tab toggle#32191
Hona wants to merge 4 commits into
anomalyco:devfrom
Hona:fix/v2-home-toggle-architecture

Conversation

@Hona

@Hona Hona commented Jun 13, 2026

Copy link
Copy Markdown
Member

TLDR; Adds the designed v2 Home toggle with persistent recent-tab navigation and consistent active icon styling.

Changelog

  • Add mod+b to toggle between Home and the current v2 tab
  • Show the Home shortcut in the titlebar tooltip
  • Preserve the recent tab across reloads and server switches
  • Use the active icon color for pressed muted icon buttons
  • Keep legacy sidebar shortcut behavior unchanged

Design issues: anomalyco/opencontrol#134 and anomalyco/opencontrol#137
Supersedes #31953.

Verification

  • bun typecheck in packages/app
  • Prettier and git diff --check
  • Browser verification for pointer, keyboard, reload, dark/light themes, and desktop/mobile geometry
  • Pixel and computed-style comparison against fix(app): navbar button updates #31953

@Hona Hona requested a review from Brendonovich as a code owner June 13, 2026 12:33
Copilot AI review requested due to automatic review settings June 13, 2026 12:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a v2 “Home” toggle (UI + command) that switches between Home and the most-recent active v2 tab, persists recent-tab state, and aligns pressed styling for muted icon buttons.

Changes:

  • Adds Home toggle behavior (mod+b) in the v2 titlebar with a tooltip keybind display and persistent recent-tab tracking.
  • Updates tab state management to persist “active tab” and map session routes to a stable root session tab.
  • Adjusts v2 icon-button pressed styling for ghost-muted to use the active icon color.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/ui/src/v2/components/icon-button-v2.css Sets pressed ghost-muted icon color to the active icon color token.
packages/app/src/pages/session.tsx Syncs session + computes root session target for tab routing when v2 designs are enabled.
packages/app/src/pages/layout.tsx Removes mod+b keybind from legacy sidebar toggle when new design is enabled.
packages/app/src/pages/directory-layout.tsx Removes directory-level session sync side-effect.
packages/app/src/desktop-menu.ts Removes macOS native menu accelerator for sidebar toggle.
packages/app/src/context/tabs.tsx Persists active tab and adds home-toggle + route→tab mapping logic.
packages/app/src/context/layout.tsx Makes LayoutRoute server key required (injected from active server).
packages/app/src/context/command.tsx Adds formatKeybindParts + exposes keybindParts() for UI keycap rendering.
packages/app/src/components/titlebar.tsx Implements v2 Home toggle button + command registration and updates tab navigation to use useTabs().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/app/src/context/tabs.tsx Outdated
Comment on lines +149 to +153
const current = (route: LayoutRoute) => {
if (route.type === "home" || route.type === "dir-new-sesssion") return
if (route.type === "draft") {
return tabs.find((tab) => tab.type === "draft" && tab.draftID === route.draftID)
}
Comment thread packages/app/src/context/tabs.tsx Outdated
Comment on lines +165 to +169
const canToggleHome = (route: LayoutRoute) => {
if (!ready()) return false
if (route.type === "home") return true
return current(route) !== undefined
}
Comment on lines 141 to 145
id: "view",
label: "View",
items: [
{ type: "item", label: "Toggle Sidebar", command: "sidebar.toggle", accelerator: { macos: "Cmd+B" } },
{ type: "item", label: "Toggle Sidebar", command: "sidebar.toggle" },
{ type: "item", label: "Toggle Terminal", command: "terminal.toggle", accelerator: { macos: "Ctrl+`" } },
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.

2 participants