Commit fdf3c9b
committed
feat(tui): shell region and chat transcript join the declarative surface
Slice 7b, unblocked by go-html v0.14.0's two levers: a themeable Content
slot (TermTheme.Content, matching the pre-existing themeable Aside) and
row-scoped verbatim (<verbatim value="{{row.field}}"/> inside <each>).
Region (layout.go, renderFrame): shellwide.ctml (<layout variant="HCRF">)
binds the main panel to C and the inspector to R for the Wide layout kind,
one RenderTerm call (renderBandLayout) replacing lipgloss.JoinHorizontal
plus a manual "|" separator column. shellregion.ctml (<layout
variant="HCF">) does the same for every single-pane shape (Narrow either
way; Overlay with the inspector closed), replacing a bare fitPane call.
shell.ctml narrows to the ONE shape that still cannot join them: Overlay
with the inspector open, stacking two independently-sized panes vertically
with a rule between -- HLCRF's five-letter vocabulary has no pair for that
(H/F are whole-page bands, not a reusable mid-page pair), so
renderInspectorStack keeps the pre-.ctml host composition for that one case
only. This is the friction this slice reports rather than works around.
Width delta: go-html's non-FitSlots middle band gives R a FIXED 28-column
budget whenever present (termAsideWidth, unexported, ctml.md S:15.1) -- no
TermOptions/Layout lever requests a different width, confirmed by reading
term_layout.go and a throwaway probe. The Wide inspector is now 28 columns,
not 32; the main panel gains the 4 columns back. regionAsideWidth mirrors
the fixed budget as a documented local constant (go-html exports no
accessor, S:15.5); TestRegionAsideWidth_MatchesGoHTML pins it against a
live RenderTermBoxes call so upstream drift fails loudly rather than
silently reflowing the frame. The old visible "|" rule is also gone: a
zero-chrome C does not collapse the C/R junction, go-html always inserts
its own blank single-space gutter before R, and there is no theme lever to
paint a glyph into it.
Transcript (app.go, transcript.ctml): the hand-grown core.Builder
accumulation loop becomes a zero-or-one-row "notice" sequence plus one row
per turn, each row's verbatim "body" the turn's complete pre-formatted
output (renderTranscriptTurn). What did NOT convert: a turn's STRUCTURE
(inline "you "+text for user, label+result for tool, optional thinking
line + label + Glamour/streaming body + tool calls + spinner for
assistant) stays host-decided, because <switch>/<if>/<unless> resolve
against Context.Data once per render (ctml.md S:7) -- the same context for
every row an <each> produces, not a per-row scope. A row can vary its
VALUES, never its STRUCTURE; this is the documented closed-vocabulary
boundary (S:1.1), not a workaround.
Mouse hit-testing needed no re-plumbing: no region content resolves a
mouse coordinate against its own composition today, so there was no "old
composition maths" to move onto boxes.
Test floor: 419 -> 420 (TestRegionAsideWidth_MatchesGoHTML added; no
existing test dropped or weakened -- TestWorkspaceFrame_Good/_Bad/_Ugly
and every Transcript* test pass unchanged).
Co-Authored-By: Virgil <virgil@lethean.io>1 parent 8c76486 commit fdf3c9b
8 files changed
Lines changed: 484 additions & 166 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
302 | 324 | | |
303 | 325 | | |
304 | 326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
24 | 35 | | |
25 | 36 | | |
26 | 37 | | |
| |||
3051 | 3062 | | |
3052 | 3063 | | |
3053 | 3064 | | |
| 3065 | + | |
| 3066 | + | |
| 3067 | + | |
| 3068 | + | |
| 3069 | + | |
| 3070 | + | |
| 3071 | + | |
| 3072 | + | |
| 3073 | + | |
3054 | 3074 | | |
3055 | | - | |
| 3075 | + | |
| 3076 | + | |
| 3077 | + | |
| 3078 | + | |
| 3079 | + | |
| 3080 | + | |
| 3081 | + | |
| 3082 | + | |
| 3083 | + | |
| 3084 | + | |
| 3085 | + | |
| 3086 | + | |
| 3087 | + | |
3056 | 3088 | | |
| 3089 | + | |
3057 | 3090 | | |
3058 | | - | |
| 3091 | + | |
3059 | 3092 | | |
| 3093 | + | |
3060 | 3094 | | |
3061 | | - | |
3062 | | - | |
3063 | | - | |
3064 | | - | |
3065 | | - | |
3066 | | - | |
3067 | | - | |
3068 | | - | |
3069 | | - | |
3070 | | - | |
3071 | | - | |
3072 | | - | |
3073 | | - | |
3074 | | - | |
3075 | | - | |
3076 | | - | |
3077 | | - | |
3078 | | - | |
3079 | | - | |
3080 | | - | |
3081 | | - | |
3082 | | - | |
3083 | | - | |
3084 | | - | |
3085 | | - | |
3086 | | - | |
3087 | | - | |
3088 | | - | |
3089 | | - | |
3090 | | - | |
3091 | | - | |
3092 | | - | |
3093 | | - | |
3094 | | - | |
3095 | | - | |
3096 | | - | |
3097 | | - | |
3098 | | - | |
| 3095 | + | |
| 3096 | + | |
| 3097 | + | |
| 3098 | + | |
| 3099 | + | |
| 3100 | + | |
| 3101 | + | |
| 3102 | + | |
| 3103 | + | |
| 3104 | + | |
| 3105 | + | |
| 3106 | + | |
| 3107 | + | |
| 3108 | + | |
| 3109 | + | |
| 3110 | + | |
| 3111 | + | |
| 3112 | + | |
| 3113 | + | |
| 3114 | + | |
| 3115 | + | |
| 3116 | + | |
| 3117 | + | |
| 3118 | + | |
| 3119 | + | |
| 3120 | + | |
| 3121 | + | |
| 3122 | + | |
| 3123 | + | |
| 3124 | + | |
| 3125 | + | |
| 3126 | + | |
| 3127 | + | |
| 3128 | + | |
| 3129 | + | |
| 3130 | + | |
| 3131 | + | |
| 3132 | + | |
| 3133 | + | |
| 3134 | + | |
| 3135 | + | |
| 3136 | + | |
| 3137 | + | |
| 3138 | + | |
| 3139 | + | |
| 3140 | + | |
| 3141 | + | |
| 3142 | + | |
| 3143 | + | |
| 3144 | + | |
| 3145 | + | |
| 3146 | + | |
| 3147 | + | |
3099 | 3148 | | |
| 3149 | + | |
3100 | 3150 | | |
3101 | | - | |
3102 | | - | |
3103 | | - | |
3104 | | - | |
3105 | | - | |
3106 | | - | |
| 3151 | + | |
| 3152 | + | |
| 3153 | + | |
| 3154 | + | |
| 3155 | + | |
| 3156 | + | |
3107 | 3157 | | |
3108 | 3158 | | |
3109 | | - | |
| 3159 | + | |
3110 | 3160 | | |
3111 | 3161 | | |
3112 | 3162 | | |
| |||
0 commit comments