thing-tui: paint Cells frames to a terminal screen (cut 8a) #24

Merged
eureka merged 23 commits from hands/thing2-tui-paint into main 2026-11-28 19:39:00 +00:00
Owner

Cut thing2 cut-tui-paint, six attempts; Soul verdict thing2:verdict:cut-tui-paint.s6 holds (merge-ready).

  • Screen, diff and paint for Cells frames; no control char reaches a cell, wide clusters never split
  • Px read at 8x16 per cell at the one scale adapter (cells-px-metric); nonzero border is at least one cell
  • Cells controls lay as a three-row grid shell in one solve; the form is read off the laid rect and is Bordered only when content fits (cells-control-form-by-laid-rect, cells-bordered-needs-content-fit); Compact controls clip
  • Shared fixtures render unedited in both modes

🤖 Generated with Claude Code

Cut thing2 cut-tui-paint, six attempts; Soul verdict thing2:verdict:cut-tui-paint.s6 holds (merge-ready). - Screen, diff and paint for Cells frames; no control char reaches a cell, wide clusters never split - Px read at 8x16 per cell at the one scale adapter (cells-px-metric); nonzero border is at least one cell - Cells controls lay as a three-row grid shell in one solve; the form is read off the laid rect and is Bordered only when content fits (cells-control-form-by-laid-rect, cells-bordered-needs-content-fit); Compact controls clip - Shared fixtures render unedited in both modes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Ruling cells-px-metric. Device::length is the one adapter that turns a document's Px length
into device units: times the scale in Pixels, divided by the cell metric (8 across, 16 down)
in Cells, per axis, with Taffy's rounding landing it on a cell. A flex basis runs along its
parent's main axis. CELL_PX is the one constant: the Image extent in CellMeasure reads it
instead of its own 8 and 16. The thing-tui screen goldens run the shared fixtures unedited
(as_cells deleted), so f03, f08, f11 and every other Cells golden are re-blessed from them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Finding button-content-mode-split. Cells made the Button content a stretch column and
Pixels the default row, so one document laid out differently by mode beyond measuring and the
f01 restart label spanned the whole content box (46 or 48 wide) instead of hugging (7).
The axis is the row in both; a tall Button still centres its label between the borders, now by
alignment (align_items centre) rather than by switching the axis. f01 Cells layout re-blessed:
restart-label 48 -> 7 wide.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Findings inset-two-owners-and-unpinned-edges and button-multirow-label-on-border. Device::inset
is the one rule for Button, TextInput, Select and Toggle: in Cells one cell on every side once the
box is 3 rows tall, none below (a control too short for a border and a content row paints no
border and its content box is its whole box); in Pixels 2 logical px. Layout reserves it as
padding in Cells, so a content-sized control's box includes its border rows and a wrapped label
never lands on a border, and publishes the laid content box as LaidNode.inside. Render draws in
that box, computes no inset, and strokes a border only when the box is inset. cells_inset and its
public export are gone. The 2-row and exactly-3-row edges are pinned for all four controls in
layout and render. A one-row control is now a 3-row box (27x3 for a TextInput); f01, f02, f04,
f05 and f09 Cells goldens re-blessed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Mutation survivors of Device::inset (`w / 2.0` and `h / 2.0` replaced by a product): a control
narrower than twice its inset keeps the content box inside the border box.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Ruling cells-control-height-forms. A content-sized Cells control is the 3-row bordered
form; one laid under 3 rows keeps exactly that height as Compact (brackets for
TextInput, Select and Button, the toggle glyph for Toggle; one cell each side, no
vertical inset, content on the first row). Layout finds the form by solving: a bordered
control's padding floors its height at 2 rows, so a control left under 3 rows is built
again compact and solved afresh. LaidNode.inside (None for two things, border inferred
from inner == Some(rect)) is replaced by LaidNode.control: Option<LaidControl { form,
content }>, which render reads and infers nothing from. Pixels controls are Bordered; a
Pixels Button's content box is its border box. No golden moves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ruling cells-box-border-min-cell. Device::border is the one conversion of a border side:
in Cells a nonzero Px width is at least one cell on its axis, zero stays zero, Pixels is
unchanged. A 20x4 Box with a 1 px border held its content on the stroke's perimeter
cells; the content now starts one cell in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Finding axis-mutants-survive: the margin-bottom and min-height Y-to-X axis swaps
survived the suite. A column of two boxes whose margin and min size state a different
Px length on each side now moves a rect under either swap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Finding f11-screen-golden-vacuous. f11 is a chain of paintless Boxes, so its Cells
screen golden was whitespace and would have stayed whitespace if layout broke. The nest
is asserted where it is a fact: in Cells every level is the only child of the last,
inside it, and within a cell of its Pixels rect at the metric (the 2 px padding per side
compounds over 84 levels). f11 leaves the screen set with the reason in a comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Finding literal-defaults-bypass-metric. Device::placeholder and Device::plot stated cell
literals (1, 38x10) beside the one adapter. They now state 16 px and 300x150 px and
convert at Device::length, per axis: a Use placeholder is 2x1 cells and a Plot 38x9
(37.5x9.375 rounded). Re-blessed: screen-f07-plot-cells (the default plot is one row shorter; style runs only, no glyph moves).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cargo-mutants survivors of the control-form cut: the compact toggle's glyph height (a
2-row compact toggle drew a 2-cell knob) and the device-to-logical conversion of the
content box layout states (only scale 1 was tested, where it is the identity).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deletes the re-solve loop, mark_too_short, the compact marks and render's Bordered fallback;
Device::form is the one form rule, Builder::shell the one Cells control box.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
thing-core: a Cells control is Bordered only when its laid content row fits inside the border
All checks were successful
Portable Eve contracts and browser lowering / ubuntu-latest eve-browser-lowering (pull_request) Successful in 3m33s
Portable Eve contracts and browser lowering / ubuntu-latest eve-contracts (pull_request) Successful in 2m29s
9a71823be6
Device::form(h, row) replaces form(h): Bordered needs 3 rows and row + 2 edge rows <= h. A Compact
control's content is clipped to its rect by render. A content node with children keeps at least its
children's height, so the row the form reads is the content's own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
eureka merged commit 7388984450 into main 2026-11-28 19:39:00 +00:00
eureka deleted branch hands/thing2-tui-paint 2026-11-28 19:39:00 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/Thing!24
No description provided.