fix(console): give .content a horizontal gutter - #91
Conversation
.content has been display:flex/flex-direction:column with no padding
since the very first commit — every top-level section only carries a
bottom margin, so nothing ever set a left/right gutter and content ran
edge-to-edge. Add padding matching the topbar's horizontal inset (18px).
🤖 Generated by Orca ('ecs-claude').
…ger chat Brett flagged three related issues live on #91's layout: - the "MANAGING <cluster>" identity banner should sit above Agent chat in the right column, not as a full-width strip below the drilldown row - Agent chat's fixed 120–340px log box reads as too small - the two-column split (drill-down content vs. chat) should be adjustable ## What - `#identity` moves into a new `.drilldown-side` wrapper alongside `#chat`, right column of the drilldown row (was a standalone full-width section). - `.drilldown-side > .chat-wrap .chat-log` bumps to a 240–560px range. - A drag handle (`#drilldown-resizer`) between the two columns lets the operator widen/narrow `.drilldown-side` (280–900px), width persisted to localStorage. `src/splitPane.ts` owns the pure clamp/persist logic (`clampWidth`/`readWidth`/`saveWidth`) plus the DOM wiring (`initSplitPane`), mirroring `theme.ts`'s split. ## Verification - `tsc --noEmit` — clean - `vitest run` — 112/112 passing (5 new for `splitPane.ts`) - `vite build` — clean - Playwright: confirmed identity renders above chat inside `.drilldown-side`, and dragging the handle grows the column live (420px → 626px in the test drag) — screenshots eyeballed for visual regressions. 🤖 Generated by Orca ('ecs-claude').
|
Pushed a second commit addressing your three follow-ups:
|
…p Files, fix chat box + Debug drawer Four more items from Brett live-testing #91's layout, all against the same per-agent (fleet-detail / agent-console) drill-down: - **Remote + Compose not relevant per-agent**: both are Fleets-screen concerns (management-connection setup, template/bundle authoring) — `updateScreen()` now hides `#remote`/`#compose-standalone` alongside the Fleets screen whenever a fleet is selected, same condition as `#config`/`#fleet-detail` already used. - **Remove the Files part for agent console**: `.ac-files` (the remote file browser) was a permanent stub — every real endpoint reports no fs capability ("pending the fs MCP files server"), so it never showed anything but a placeholder. Deleted `fileBrowser.ts`, its wiring in `agentConsole.ts`, the markup, the now-dead `render.ts` pure functions (`fsListingHtml`/`fsUnavailableHtml`) + their tests, and the `.ac-files`/ `.fs-*` CSS. `Source.fsList`/`fsRead`/`fsCapability` are left alone — a backend contract, not UI surface. - **Chat input fixed at 2 lines**: `.chat-text` was `resize: vertical` with only a `min-height` floor, so a drag could grow it arbitrarily. `resize: none` — `rows="2"` on the textarea already sets the height. - **Debug drawer: unreachable Close + hidden top**: `.debug-drawer` was `position: fixed; top: 0`, but the topbar sits above it in z-index (intentionally, so the drawer slides in *below* it) — the drawer's own header (title + Close) rendered directly underneath the topbar's opaque background, both invisible and unclickable. Anchors to `--topbar-h` now (measured in `main.ts`, kept live via `ResizeObserver` since the topbar's height isn't hard-coded), so the drawer starts right at the topbar's bottom edge. ## Verification - `tsc --noEmit` — clean - `vitest run` — 102/102 passing (10 fewer: the deleted file-browser tests) - `vite build` — clean - Playwright: confirmed Remote/Compose hide on fleet-detail, `.ac-files` is gone from the DOM, the chat textarea computes `resize: none` at 2 rows, and the Debug drawer's top now lines up exactly with the topbar's bottom edge — a real mouse click on Close closes it. 🤖 Generated by Orca ('ecs-claude').
|
Third commit, addressing your four follow-ups on the per-agent view:
|
…r links
Two more from Brett's live testing:
- **Same agent reachable as both the management connection and a normal
per-agent console**: `agentConsole.ts`'s existing guard only checked a
roster entry's name against agents.toml's own `management: true` flag.
But the persistent management connection is a *separate* config
(`remote.toml`'s url) — a roster entry can point at the exact same
physical agent without ever being flagged, and nothing stopped opening a
second console (a second live ACP session) against it. Confirmed this is
exactly what Brett hit: the physical agent was reachable both via the
always-on "Agent chat" (remote.toml) and via its own roster row, each
session stepping on the other's turn state.
Fixed by comparing urls, not just names: `agentRow`/`agentListHtml` (pure,
`render.ts`) now also treat a roster entry as "management" when its url
matches the active management connection's url — same disabled/"console
above" row treatment agents.toml's own flag already gets, so the row
doesn't look clickable when it isn't. `agentConsole.ts`'s `open()` gets
the matching guard server-side of the click, for the same race the
existing name check already defended against (list render vs. live
connect state). The url is only considered "active" while
connecting/connected/erroring (`remoteConfig.status !== "disconnected"`)
— an unconfigured/never-activated management connection doesn't block
anything.
- **Roster row didn't read as clickable**: `button.row-open` only turned
link-colored + underlined on `:hover` — at rest it was indistinguishable
from plain text, so the click target ("prod/orca" in the roster) was
undiscoverable without first hovering it. Now link-styled at rest.
## Verification
- `tsc --noEmit` — clean
- `vitest run` — 103/103 passing (1 new: url-matched management dedup)
- `vite build` — clean
- Playwright: confirmed the roster link computes link-blue + underline with
no hover.
Also checked two other reports and didn't find code to change:
- The Fleets-screen `[⚙]` (opens the Debug drawer) dials and opens
correctly on current HEAD, verified with a real synthetic mouse click —
most likely the same topbar/z-index bug fixed two commits back on
d78ed19 (nothing visibly happened because the drawer's own header rendered
under the topbar); flag again post-deploy if it's still stuck.
- The Compose panel's box height exactly matches its content (measured:
612px total, fully accounted for by the grid + padding) — no CSS
overflow/stretch bug. The blank space below it is the page ending inside
a viewport taller than the content, ordinary document flow.
🤖 Generated by Orca ('ecs-claude').
|
Fourth commit — the two items I could actually confirm and fix from this last round:
On the other three:
|
Brett: "+New fleet"/"+Add instance" should land in the left column, not
appear as a separate block below an unrelated-looking roster+chat row.
Root cause was two-fold:
- `deploy.ts` set `#drilldown-row.hidden = true` on open, meaning to hide
*both* columns (main content + the persistent chat side) while the deploy
form took over full-width below. But `.drilldown-row { display: flex }` is
unconditional, and an author rule beats the UA `[hidden]` rule at equal
specificity — same bug class as `.debug-drawer[hidden]` two commits back,
just not yet caught here. So the row never actually hid; the deploy panel
just appeared as an extra full-width block underneath everything, which is
exactly what looked wrong in the screenshot.
- Even fixed, hiding the whole row was the wrong target: it would drop the
persistent Agent chat too, breaking the "chat pairs with whichever depth
is showing, visible at every depth" rule the rest of the drill-down
follows (Fleets/Fleet-detail/Agent-console).
Fixed by moving `#deploy-wrap` inside `.drilldown-main` as a sibling of
`#config`/`#fleet-detail`, so it's just another depth of the same
drill-down: open hides whichever of those two is showing (both, harmlessly,
covers either), close calls back into `main.ts`'s `updateScreen()` (new
`restoreScreen` dep) to restore the right one — no second copy of "which
screen was active" logic in deploy.ts. `.drilldown-row[hidden]`/
`.deploy-identity[hidden]` (the "new fleet" step-1 form, same unconditional-
`display: flex` bug) get the same `[hidden]` override as `.debug-drawer` as
defensive insurance either way.
## Verification
- `tsc --noEmit` — clean
- `vitest run` — 103/103 passing (no behavior change in tested modules)
- `vite build` — clean
- Playwright: confirmed both `+ Add instance` (from fleet-detail) and
`+ New fleet` (from the Fleets screen) render in the left column with
identity/Agent chat still visible on the right, and Cancel correctly
restores the prior screen either way.
🤖 Generated by Orca ('ecs-claude').
|
Fifth commit: deploy panel now takes over the left column instead of appearing as a stray block below. Two things were wrong:
Moved `#deploy-wrap` inside `.drilldown-main`, a sibling of `#config`/`#fleet-detail` — it's just another depth now. Open hides whichever of those two is showing; Cancel calls back into `updateScreen()` to restore the right one. Added the same `[hidden]` override to `.deploy-identity` (the "new fleet" step-1 form had the identical bug) and to `.drilldown-row` itself as insurance. `tsc`/vitest (103/103)/`vite build` clean. Verified both `+ New fleet` and `+ Add instance` land in the left column with identity + Agent chat still visible on the right, Cancel restores correctly either way. |
Brett flagged: no left/right padding on the console — content runs edge-to-edge.
Root cause
.content(console/src/styles.css) has beendisplay:flex; flex-direction:columnwith zero padding since the very first commit. Every top-level section
(
.chat-wrap,.config-wrap,.deploy-wrap, ...) only carries a bottommargin — nothing ever set a horizontal gutter. Pre-existing, not something
the ADR #83 drill-down slices introduced; just more visible now that the
layout changed.
Fix
.content { padding: 16px 18px; }— horizontal inset matches the topbar'sown
padding: 12px 18px, so left/right edges line up visually with thetopbar content.
Verification
tsc --noEmit— cleanvitest run— 107/107 passingvite build— clean🤖 Generated by Orca ('ecs-claude').