Skip to content

Commit 59a3487

Browse files
committed
feat(tui): restore the 32-col inspector, the │ rule, and the HC pane-pair idiom (slice 7c)
Three shipped-vs-historic deltas from slice 7, all unblocked by go-html v0.15.0: - The Wide inspector requests its historic 32 columns again via TermOptions.AsideWidth (renderWideLayout, layout.go) instead of go-html's unrequested 28-column default; wideInspectorWidth restores the pre-.ctml constant name and value, and the main panel gets its 4 columns back. - shellWideTheme sets TermTheme.GutterRule = "│" (Rule repointed at styles.separator's own colour) so the C/R junction gutter go-html always reserves paints the historic visible rule again instead of a blank gap. - renderInspectorStack (the Overlay-with-inspector-open region: 80-119 cols) no longer hand-stacks lipgloss.JoinVertical plus a manually core.Repeat("─", ...) rule line. docs/ctml.md S:15.7 documents a mid-page vertical pane pair as an ordinary "HC" layout — H the upper pane with its own bottom border as the divider, C the lower pane — since only the middle band's L/C/R packing is width-gated; H/middle/F stack vertically at any width. shellinspectorpair.ctml + inspectorPairTheme render that pair through its own RenderTerm call. That pair render stays a SEPARATE call from shell.ctml's H/F band rather than nesting fully into one page-wide call, and this is the one friction beyond S:15.7's worked example: TermTheme is one flat struct threaded through every nested Layout in a single render (term_layout.go's termRenderer carries exactly one theme field), so a unified call would force the page header's H (needing zero chrome, pre-fitted byte-exact like every sibling shell) and the pair's own H (needing its natural bordered chrome, since that border IS the divider) to share one Header style. A throwaway probe during this slice confirmed it: zeroing Header for the page header silently zeroed the pair's divider too. shellinspectorpair.ctml keeps its own theme instead, and shell.ctml's H/F split stays exactly as slice 7 left it — host-joined by renderFrame, not part of the shipped diff's probe. TestRegionAsideWidth_MatchesGoHTML is reframed as TestWideInspectorWidth_MatchesRequest: since AsideWidth is a request, not an upstream constant to mirror, the test now renders the real shellwide.ctml path with AsideWidth set and reads the honoured width back from the live box map (S:15.5's "box map is the render-time source of truth"), rather than asserting a hardcoded upstream default. No other render deltas: go vet, go build, and go test -count=1 ./tui/ all pass at the 420-test floor with zero test count change (one test renamed and reframed in place, none added or removed). Co-Authored-By: Virgil <virgil@lethean.io>
1 parent 4e18eaa commit 59a3487

6 files changed

Lines changed: 299 additions & 127 deletions

File tree

cli/tui/README.md

Lines changed: 47 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -266,36 +266,58 @@ panel/overlay body, footer key hints, all inside one rounded border.
266266
content through byte-exact at the slot's full width, closing the gap the
267267
previous round left open (docs/ctml.md S:15.2/S:15.5). Wide layouts
268268
(`shellwide.ctml`, `<layout variant="HCRF">`) bind the main panel to C
269-
and the inspector to R, one `RenderTerm` call (`renderBandLayout`) in
269+
and the inspector to R, one `RenderTerm` call (`renderWideLayout`) in
270270
place of `lipgloss.JoinHorizontal` and a manual `` separator column.
271271
Every single-pane shape — Narrow either way, Overlay with the inspector
272272
closed — binds the one active pane to C (`shellregion.ctml`,
273273
`<layout variant="HCF">`), replacing a bare `fitPane` call. The ONE shape
274-
that still cannot join them is Overlay with the inspector open: two
275-
independently-sized panes stacked vertically with a rule between, which
276-
HLCRF's five-letter slot vocabulary has no pair for (H/F are whole-page
277-
top/bottom bands, not a reusable mid-page pair, and go-html's own
278-
automatic L/C/R vertical stacking triggers only below 80 columns —
279-
S:15.1 — above this layout kind's own floor). That one shape stays
280-
exactly the pre-.ctml host composition: `shell.ctml`'s H/F-only layout,
281-
split by `renderBandFrame`, with `renderInspectorStack` composing the
282-
region between the bands — the same HF+host-composition idiom a
274+
that still cannot join header+region+footer into a single call is
275+
Overlay with the inspector open: `shell.ctml`'s H/F-only layout, split by
276+
`renderBandFrame`, stays host-joined (`lipgloss.JoinVertical`) with the
277+
region rendered between the bands — the same HF+host-composition idiom a
283278
widget-carrying overlay uses for a live Bubbles widget between its own
284-
bands.
285-
- **The Wide inspector is now 28 columns, not 32.** go-html's non-FitSlots
286-
middle band gives R a fixed outer-width budget (the unexported
287-
`termAsideWidth`, S:15.1) whenever R is present at ≥80 columns — there is
288-
no `TermOptions`/`Layout` lever to request a different width, and a
289-
zero-chrome C does not collapse the C/R junction either: go-html always
290-
inserts its own single blank-space gutter before R, so the old visible
291-
`` rule is gone with it (the gutter is blank; there is no theme lever to
292-
paint a glyph into it). `regionAsideWidth` (`layout.go`) mirrors the
293-
fixed budget as a documented local constant — go-html exports no
294-
accessor for it (S:15.5) — and `TestRegionAsideWidth_MatchesGoHTML` pins
295-
it against a live `RenderTermBoxes` call so upstream drift fails loudly
296-
rather than silently reflowing the frame. The main panel gains the 4
297-
columns back (`measureFrame`'s Wide case); this is a real, visible width
298-
delta, tied entirely to that one doctrine clause.
279+
bands. What changed as of go-html v0.15.0 (docs/ctml.md S:15.7) is that
280+
the REGION itself no longer hand-stacks: two independently-sized panes
281+
stacked vertically with a rule between is a documented idiom — an `HC`
282+
layout, H the upper pane with its own bottom border as the divider, C the
283+
lower pane — not a missing construct, since only the *middle* band's
284+
L/C/R packing is width-gated (side by side ≥80 columns, stacked below);
285+
H/middle/F themselves stack vertically at any width. `renderInspectorStack`
286+
(`layout.go`) now renders `shellinspectorpair.ctml`'s `<layout
287+
variant="HC">` through its own `RenderTerm` call, replacing the old
288+
`lipgloss.JoinVertical(inspector, separator, main)` plus a manually
289+
`core.Repeat("─", …)` rule line. It stays a SEPARATE call from
290+
`shell.ctml`'s H/F band, rather than nesting fully into one page-wide
291+
call: `TermTheme` is one flat struct threaded through every nested
292+
`Layout` in a single render, so a unified call would force the page
293+
header's `H` (needing zero chrome, pre-fitted byte-exact like every
294+
sibling shell) and the pair's own `H` (needing its natural bordered
295+
chrome, since that border IS the rule) to share one `Header` style — a
296+
throwaway probe during this slice confirmed zeroing `Header` for the page
297+
header silently zeroed the pair's divider too. `shellinspectorpair.ctml`'s
298+
own header comment has the full account.
299+
- **The Wide inspector is 32 columns again, not 28.** go-html v0.15.0 adds
300+
`TermOptions.AsideWidth` (S:15.1): a width *request* that overrides the
301+
non-FitSlots middle band's fixed R budget (the unexported
302+
`termAsideWidth`, still 28 by default) per render, with C absorbing the
303+
difference. `renderWideLayout` (`layout.go`) is the one render path that
304+
sets it, requesting `wideInspectorWidth` (32) — restoring both the
305+
pre-.ctml value and name. A zero-chrome C still does not collapse the C/R
306+
junction: go-html always inserts its own single-column gutter before R,
307+
but that gutter is now paintable — `TermTheme.GutterRule` (S:15.6) sets
308+
the glyph rendered there, the full band height, in the theme's `Rule`
309+
style; `shellWideTheme` sets `GutterRule = "│"` (repointed at
310+
`styles.separator`'s own colour) so the historic visible rule returns.
311+
`wideInspectorWidth` documents the REQUEST rather than mirroring
312+
go-html's own unrequested default — go-html exports no accessor for that
313+
default (S:15.5) — and `TestWideInspectorWidth_MatchesRequest` pins the
314+
request against a live `RenderTermBoxes` call on the real
315+
`shellwide.ctml` render path (the box map is the render-time source of
316+
truth, S:15.5) so upstream regression in honouring `AsideWidth` fails
317+
loudly rather than silently reflowing the frame back to 28. The main
318+
panel gets its historic width back too (`measureFrame`'s Wide case); both
319+
the width and the rule are real, visible deltas, tied entirely to these
320+
two doctrine clauses.
299321
- **Mouse hit-testing needed no re-plumbing, this slice included.**
300322
`onMouse` resolves against its own independent `renderPanelBarBoxes`
301323
call, keyed off `frameInsetRows`/`frameInsetCols` and the tab strip's

0 commit comments

Comments
 (0)