Repository navigation
Description
Titlebar chrome: one home per surface (vault drawer · Work Column · status popover)
Important
Problem. The titlebar's three right-side buttons are buggy in three structural ways: (1) the vault toggle appears dead on home/new-session — the drawer's fetch keys on useServer().current, unset when no server is focused, so the host renders an empty shell; (2) the vault and column toggles fight — two vault hosts (drawer, side-panel tab) mirrored through two differently-scoped stores by three effects, so pressed states desync from the screen; (3) the column squishes the chat — ReviewPanelV2 renders its own file-list sidebar + diff pane inside it. The files-changed surface is effectively invisible, which users experience as "git versioning got axed."
Approach. One home per surface, one store per surface, zero mirroring effects. Vault = the global left drawer on every route (session tab retired); right column = the Work Column (files-changed navigator default tab + context tree + file tabs) with diffs as full-width file tabs, never a split pane; status popover keeps health + connections, re-anchored without the shift={-168} hack. Mostly deletions in packages/app.
Approaches considered. Minimal patch (repair sync effects, keep both hosts — runner-up; preserves two writers into one column) · full chrome rethink (one panel system for every right-side surface — rejected: blast radius spans just-merged upstream surface) · session-tab-only vault (rejected: unreachable from home).
Scope. In: vault-panel.tsx, vault-browser.tsx, session-side-panel.tsx, session.tsx (review wiring), status-popover.tsx, titlebar pressed-state bindings, i18n keys, tests. Out: center-editor diff viewing (no such surface exists upstream — recorded as the ADR's flip condition); popover icon redesign; terminal panel behavior.
Assumptions. The fork stays on upstream's side-panel file-tab mechanism; no per-project vault scoping is needed; Kate's 2026-07-27 vault tab may be removed weeks after landing.
Acceptance criteria
Machine-checked (from spec spec-20260801-chrome-one-home-per-surface):
-
store_mirror_effects == 0— nocreateEffectmirrors between thevaultPanelandreviewPanelstores remain -
vault_sidepanel_hosts == 0— vault tab trigger/content blocks deleted fromsession-side-panel.tsx -
popover_magic_shift == 0— no occurrences ofshift={-168} -
i18n_missing_keys == 0— new keys in all 17 locales as English fallbacks (strict parity test) -
button_flow_e2e_passing >= 3— Playwright three-button flows across home, new-session, and session routes
Behavioral invariants (prose by design):
- Vault button opens the populated drawer on home, new-session, AND session routes (fallback to first healthy server when none is focused)
- Zero-mount drawer shows an attach-vault CTA routing to the status popover's connections tab; fetch failures show a named error + retry (nothing silent)
- Sidebar-right toggles a single-pane Work Column; its pressed state always matches the screen (single store writer)
- Clicking a changed file opens its diff as a full-column-width file tab; no sidebar+content split renders in the column at any width
- Column default width ~320px with the existing resize handle retained
- Status popover body contents unchanged (health + MCP/LSP + vault mounts + connections)
Key decisions
- Vault host: standalone drawer, every route — the session side-panel tab is retired, not repaired.
- Column composition: Changes (default) / Context / file tabs; the unlabeled icon tab becomes honest or goes away.
- Diff viewing: full-column-width file tabs via the existing tab mechanism.
- Data contract (drawer):
GET /amicode/vaultsandGET /amicode/vault-filesconsumed with a fallback-server key; empty and error are first-class states, not absences.
Constraints & invariants
session-side-panel.tsxis merge-hot: keep the diff surgical; the deleted mirror effects must not be resurrected on the next upstream sync (see ADR).- Test suites run with
env -u OPENCODE_CONFIG_CONTENT -u OPENCODE_SERVER_PASSWORD bun test.
Prior art
- ADR
docs/adr/0001-one-home-per-chrome-surface.md(this repo) — the durable why. - amicode#174 (status popover trigger/dot split), amicode#203 (home chrome redesign), Kate 2026-07-27 (vault tab replaced git review).
Source
Designed in an Amicode grilling session 2026-08-01 ("Fixing buggy buttons in Amicode build") from user-reported symptoms + code forensics; screenshot evidence: two-pane review squish, mystery icon tab, no-git empty state. Spec review: approved-mechanical (tier-1 lenses clean; no judgment critic available).
Notes
- The circular indicator near the buttons is the context-usage ring — not a spinner, not a bug.
- Non-git projects keep upstream's "Create Git repository" empty state in the Changes tab.
Activity
fix: unsweep unrelated edit-row WIP from the drawer commit
Merge pull request #110 from harmoniqs/105-titlebar-chrome-one-home-p…