[Bugfix #766] Add missing CSS for .architect-pane / .architect-pane-body#767
Conversation
PR #762's N>1 left-pane branch wraps the architect terminal in two new divs (.architect-pane and .architect-pane-body) but never added matching CSS. The wrappers collapsed to intrinsic block height and the architect terminal rendered at ~1/4 of the SplitPane left side for multi-architect workspaces. The N=1 path renders <Terminal> directly so the existing unit-test DOM-snapshot check did not catch it. Fix: - index.css: .architect-pane is now a flex-direction:column host with height:100% min-height:0; .architect-pane-body has flex:1 min-height:0 so it fills the remaining space below the tab strip. - architect-pane-layout.test.ts: Playwright regression test that mocks /api/state with N=2 architects and asserts the architect-pane fills .split-left vertically and architect-pane-body reaches the bottom. Fixes #766
The first iteration used height: 100% on .architect-pane, which relies on the entire ancestor chain (.app-body in particular) participating in a deterministic height context. .app-body has no explicit display, so its flex item children inherit the default block-level height behavior; in that case 100% can resolve to 0 when the flex container's main-axis size hasn't propagated yet. Switch to position: absolute / inset: 0 against .split-left (which is already position: relative). This sidesteps the percentage-height plumbing entirely — the pane just fills its positioned ancestor.
iter-2: pushed
|
|
Architect approval — fix verified end-to-end. Re-ran the Playwright test against the worktree's own Tower bundle (TOWER_TEST_PORT=4102 spawns a fresh Tower from the worktree, not the globally-installed v3.0.6) and the test passes in 618ms. Worth a separate doc note: testing-guide.md should call out the gotcha you caught — by default Playwright hits localhost:4100 which serves the globally-installed dashboard, NOT the worktree's bundle. Anyone testing a dashboard change has to set TOWER_TEST_PORT to a fresh port for a true regression test. Filing as a follow-up doc-only issue. Approved — please merge with |
Summary
Fixes #766.
Root Cause
PR #762's multi-architect dashboard introduced
.architect-paneand.architect-pane-bodywrappers in the N>1 branch ofApp.tsxbut never added matching CSS. The wrappers collapsed to intrinsic block height, so the architect terminal rendered at ~1/4 of the SplitPane left side whenever a workspace had more than one architect.The N=1 path renders
<Terminal>directly without these wrappers, so the regression slipped past the DOM-snapshot-identical unit test inApp.architect-tabs.test.tsx(only N=0/N=1/N=2 DOM structure was asserted — not layout).Fix
packages/dashboard/src/index.css:.architect-paneis positioned absolutely against.split-left(which already hasposition: relative). This sidesteps the percentage-height plumbing in the ancestor chain — the pane just fills its positioned ancestor. As a flex column, the tab strip takes its natural ~34px and.architect-pane-bodyflex-fills the rest.min-height: 0lets the body shrink inside the flex container so the inner<Terminal>'s xterm canvas does not push it past the SplitPane bottom.Regression Test
packages/codev/src/agent-farm/__tests__/e2e/architect-pane-layout.test.ts: Playwright test that mocks/api/statewith N=2 architects, confirms the architect tab strip is rendered (i.e. the N>1 branch inApp.tsxis exercised), and asserts:.architect-paneheight matches.split-leftheight (±2px).architect-pane-bodyreaches the bottom of.split-left(±2px).architect-pane-bodyfills ≥60% of the available height below the tab stripVerified the test correctly catches the regression: pre-fix run reported the architect-pane height was 263px short of the SplitPane left side.
Iterations
61327066):display: flex; flex-direction: column; height: 100%; min-height: 0on.architect-pane.e94b514f): switched toposition: absolute; inset: 0per architect feedback. More robust — does not rely on the entire ancestor flex/percentage-height chain.Test Plan
pnpm buildpassespnpm testpasses (porch fix-phase check, 20.5s)TOWER_TEST_PORT=4101,4102)App.architect-tabs.test.tsxstill passes (8/8)Test caveat:
playwright.config.tssetsreuseExistingServer: trueon port 4100. If a globally-installed Tower is running on 4100 (e.g. viapnpm -w run local-install), the test reuses it and may validate stale dashboard code. Run withTOWER_TEST_PORT=4101or rebuild and restart the global Tower to verify on a fresh build.CMAP Review
height: 100%approach while the committed code is iter-2position: absolute; inset: 0. Addressed in this PR description and inarchitect-pane-layout.test.tsJSDoc.Fixes #766