fix(amicode): one home per chrome surface (closes #105) - #110
Merged
Conversation
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.
11 tasks
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).
- 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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 == 0—statusPopoverLayout()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 filepickVaultServer/vaultMountsStatemodels (14/14);!params.idguard deleted; named loading/no-server/error+retry/empty+CTA states; CTA's announce now OPENS the connections popoverreviewSidebarOpenedpolicy false; kanban-icon toggle removed; diffs full-width via the panel's collapsed-sidebar modebutton_flow_e2e_passing >= 3—e2e/regression/chrome-surfaces.spec.ts(drawer-on-home populated / single-pane toggle truthful / popover in viewport), 3/3 chromiumi18n_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 receivedVaultPanel(or theConnectionBanner): the workbench/wave merges grafted their chrome intolayout.tsx'sLegacyLayoutbranch, whichnewLayoutDesignsnever reaches. The host existed on paper and mounted nowhere. Both grafted inlayout-new.tsxwith 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