Skip to content

fix(amicode): one home per chrome surface (closes #105) - #110

Merged
aarontrowbridge merged 11 commits into
local/amicodefrom
105-titlebar-chrome-one-home-per-surface-vault-drawer-work-column-status-popover-1
Aug 2, 2026
Merged

aarontrowbridge merged 11 commits into
local/amicodefrom
105-titlebar-chrome-one-home-per-surface-vault-drawer-work-column-status-popover-1

Conversation

@aarontrowbridge

@aarontrowbridge aarontrowbridge commented Aug 2, 2026

Copy link
Copy Markdown
Member

Implements #105 (design-of-record: ADR docs/adr/0001-one-home-per-chrome-surface.md): vault = global drawer on every route (side-panel tab retired); right column = single-pane Work Column with diffs full-width; status popover re-anchored without the magic shift.

Tracer bullets (TDD), all green:

  • popover_magic_shift == 0statusPopoverLayout() model + tests (7/7)
  • store_mirror_effects == 0 / vault_sidepanel_hosts == 0 — vault tab + both mirror effects deleted, locked by a structural test on the merge-hot file
  • drawer global + honest states — pickVaultServer/vaultMountsState models (14/14); !params.id guard deleted; named loading/no-server/error+retry/empty+CTA states; CTA's announce now OPENS the connections popover
  • Work Column single-pane, 320px — reviewSidebarOpened policy false; kanban-icon toggle removed; diffs full-width via the panel's collapsed-sidebar mode
  • button_flow_e2e_passing >= 3e2e/regression/chrome-surfaces.spec.ts (drawer-on-home populated / single-pane toggle truthful / popover in viewport), 3/3 chromium
  • i18n_missing_keys == 0 — 5 new keys, English fallbacks in all 17 locales (parity green)

Gates: app suite 773/773, tsgo -b + e2e tsconfig clean.

Found by the e2e RED (the real 'does nothing visible'): NewLayout (layout-new.tsx) — the layout the new-design app ACTUALLY renders — never received VaultPanel (or the ConnectionBanner): the workbench/wave merges grafted their chrome into layout.tsx's LegacyLayout branch, which newLayoutDesigns never reaches. The host existed on paper and mounted nowhere. Both grafted in layout-new.tsx with a do-not-repeal comment.

AC interpretation flagged for review: the issue's 'changed-file click opens its diff as a full-column-width file tab' is implemented via the panel's native collapsed-sidebar single-pane (inline full-width preview swap), not literal file tabs — ejecting to a tab on every click breaks scan-through review flow. Goal (full width, no split) met either way; happy to switch to literal tabs if you want the letter.

Not in scope, surfaced for later: the same wrong-branch graft hit the in-app SplitFrame (standalone top-document splits) — the workbench's drop zones live in the never-rendered branch too. Separate fix.

Closes #105

Anchors bottom-end with the standard gutter and the library's collision
handling, via a new statusPopoverLayout() in the model (the policy is now
unit-testable, and the AC popover_magic_shift == 0 is locked by tests).
Both mounts (legacy StatusPopover + V2 StatusPopoverView) ride it.
The global drawer is the vault's only host (ADR docs/adr/0001). Deletes
the tab trigger + content, the vaultOpen memo, and BOTH store-mirroring
createEffects — the reviewPanel store has a single writer again, so the
sidebar-right pressed state cannot desync. Leaves a do-not-resurrect note
for the next upstream merger. ACs store_mirror_effects == 0 and
vault_sidepanel_hosts == 0 locked by a structural test on this merge-hot
file.
- Drawer renders on EVERY route (the !params.id guard is deleted — it
  stood the host down inside sessions and made the button look dead).
- pickVaultServer: focused server, else first healthy, else first — a home
  route with several servers still opens populated.
- Named states replace the one bare 'empty' line: loading / no-server /
  error+retry / empty+attach-CTA (vaultMountsState). Nothing fails silently.
- The CTA's announce now OPENS the connections popover (the chrome-dropdown
  seam is bidirectional), not just coordinates closes.
- 5 new i18n keys, English fallbacks in all 17 locales (parity green).
35b25d0's 'git add -A' accidentally included a hunk of the uncommitted
edit-row work sitting in this clone's working tree (someone else's live
WIP, not part of #105). Restores the file to the main-line state in the
BRANCH only — the working-tree file is untouched, the WIP stays put.
- reviewSidebarOpened/reviewSidebarToggled policy fns force the review
  sidebar closed forever — the two-pane split that squished the chat can
  never render, and a persisted true from the split-pane era is ignored.
  Diffs get the full column width; navigation is the changes dropdown.
- The kanban-icon sidebar toggle is removed from the tab strip (a dead
  button under the policy).
- Column default width 400 → 320px (resize handle retained; persisted
  widths override).

NOTE — AC interpretation flagged for review: the issue's 'changed-file
click opens its diff as a full-column-width file tab' reads 'file tab'
literally; this implements the panel's native collapsed-sidebar single-pane
(inline full-width preview swap via focusReviewDiff) instead, because
ejecting to a file tab on every click breaks scan-through review flow.
Goal (diffs get full width, no split) is met either way.
…e flows

Root cause found by the e2e RED: NewLayout (layout-new.tsx) — the layout
the new-design app actually renders — never received VaultPanel (or the
ConnectionBanner): the workbench/wave merges grafted their chrome into
layout.tsx's LegacyLayout branch, which newLayoutDesigns never reaches.
The drawer's host existed on paper but mounted nowhere — the true 'does
nothing visible'. Both grafted here, with a do-not-repeal comment.

e2e/regression/chrome-surfaces.spec.ts (button_flow_e2e_passing >= 3):
1. vault button opens the POPULATED drawer on home (mock vault routes),
   closes from the same titlebar toggle
2. sidebar-right toggles a single-pane work column (sidebar aside never
   exists; aria-expanded tracks visibility both ways)
3. status popover opens fully inside the viewport (no magic shift)
@aarontrowbridge
aarontrowbridge marked this pull request as ready for review August 2, 2026 14:59
…the remainder

The squish persisted after single-pane because the v2 layout gave the
review pane whatever the chat left behind (session-panel-width.ts's own
header: 'the review pane has no width of its own'). On a wide monitor the
column took ~75% and the chat lived in the margin.

Flips the allocation: the column is fixed-width (layout.panelColumn,
default 320, policy-bounded 240..60% of the row via clampWorkColumnWidth)
and the chat flexes around it (sessionChatTakesRemainder). The resize
handle moves to the column's left edge, sizing panelColumn. TDZ note:
createMemo evaluates eagerly — the new memos must follow
desktopV2PanelLayout's declaration (found by the e2e crash).

e2e asserts the complaint itself: column < 50% of the window with the
chat visible alongside.
…nderer

Inline-math regression: single-$ spans and display blocks stopped
rendering in the chat UI. Fixes the marked math path and adds
marked-math.test.ts (8 tests) so a renderer bump can't silently kill
math again.
The fork-side half of the ChatApp 'buried output' work (extension half
already in harmoniqs/amicode#240): long working-context blocks group
and collapse like shell output instead of flooding the chat. Updates
the grouping model + part renderer; group-parts tests cover the new
grouping (10 tests).
The icon's divider sat left-of-center, so the review toggle read as a
left-panel button. sidebar-right is mirrored to match its name; the
left-looking art becomes sidebar-left and keeps the sessions-panel
toggle's (actually left) face.
message-part.tsx imports @opencode-ai/ui/amicode-edit-row for pending
edit parts (label/file-path/diff summary). The shim follows the
wildcard-export pattern; logic is pure in amicode/edit-row.ts with
tests (7 green). These files sat untracked after being swept out of an
unrelated drawer commit — committing completes the buried-output
feature and unbreaks PR #110's typecheck.
@aarontrowbridge
aarontrowbridge merged commit 069612c into local/amicode Aug 2, 2026
1 of 4 checks passed
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.

Titlebar chrome: one home per surface (vault drawer · Work Column · status popover)

1 participant