Skip to content

council: a composer squeezed to one row says how much of the draft is above - #294

Merged
sanlee-ys merged 1 commit into
mainfrom
council/composer-clip-marker
Aug 17, 2026
Merged

council: a composer squeezed to one row says how much of the draft is above#294
sanlee-ys merged 1 commit into
mainfrom
council/composer-clip-marker

Conversation

@sanlee-ys

Copy link
Copy Markdown
Owner

What a user sees

At the 60x10 floor, in a room that is both gated and short a seat, the compose area gets one row. A three-line draft used to draw there as one row of prose with the typed row breaks turned into spaces, and no marker. It now draws the marker and the tail:

  ╭──────────────────────────────────────────────────────╮
  │  ↑ 2 more above   third line_                        │
  ╰─────────────────────────────────────────────  GATE  ─╯

Nothing else changed. A draft that fits its compose area reaches none of this, which is every room above the floor, and no existing golden moved.

Why the branch was reachable

composerLines flattened newlines to spaces when lay.Prompt == 1. Its comment called that unreachable, and design.md §9.38 repeated the claim as measured. Both were wrong. resolveLayoutIn spends the needs-you strip and the collapsed-seat notice out of the same budget the compose area is measured from, so at MinHeight with a tab bar and both rows on screen the clamp Height - rows - 1 leaves the composer one row while the draft still holds three. A five-seat machine with one vendor not installed draws that room the moment a gate goes up.

The flatten was worse than a clip, which is why no count alone answers it. Clipping drops text and the marker vocabulary describes exactly that. Flattening dropped nothing — it restated the draft, and §7.14 promises the string on screen is the string sent.

The remedy

The marker, not a floor of two rows on the compose area. A floor would close the same gap, and it would take a body row from a room already at its floor and move every golden in the package.

The row is moreAbove — the column overflow marker's own spelling, and the one the multi-row composer already spent a whole row on — then three cells, then the last drawn row, elided from the left. The count is rows not drawn, which is the multi-row path's own arithmetic. The gap is three cells rather than the room's because the composer is a box and its sides are that same glyph (§9.44); three cells is needsYouGap's answer to the same question.

The sweep could not see it

TestAMultilineDraftNeverCollapsesSilently built all 588 cells from fiveSeats(), which pins a pending gate and a collapsed seat as absent. That held the compose area two rows taller than a real room's, in every cell, and the test reported the frame correct.

It now varies both, at 2352 cells, and it asserts one more property: two typed rows are never drawn welded into one. Forty cells fail on the old code — heights at MinHeight, three and five seats, gate and notice both present, every width from 60 to 240 once the tabs tier is in play, both glyph sets.

Gates

  • go vet ./... — clean.
  • go test ./internal/council -timeout 20m — ok, 48.5s.
  • go test on every other package — ok.
  • go test -race ./internal/council -run over the composer tests — ok.
  • Goldens read before acceptance. Only the two new files were written; git status confirms no existing golden moved.

Not verified here: the live Windows Terminal frame. This is an Intel Mac, and the frame is pinned as bytes in both glyph sets instead.

Scope

docs/design.md §9.38 carries the dated 2026-08-17 amendment: what the widened sweep covers, and what the marker shows. STATE.md, the composer's layout and height rules, the editable-composer question and paste handling are all untouched.

🤖 Generated with Claude Code

… above

At the 60x10 floor, with a gate up and a seat folded out of the grid, the
layout leaves the compose area one row. A three-line draft drew there as one
row of prose with the typed row breaks turned into spaces, and no marker.
Nothing was dropped, so nothing looked wrong: the room restated the brief
instead of clipping it, and §7.14 promises the string on screen is the string
sent.

That row now carries the marker and the tail: `↑ 2 more above   third line_`.
The words and the count come from `moreAbove`, which is the column overflow
marker's own spelling and the one the multi-row composer already used, so the
reader learns no second vocabulary. The count is rows not drawn. The tail
stays because that is where the cursor is, and it elides from the left. The
gap is three cells rather than the room's `│`, because the composer is a box
and its sides are that same glyph (§9.44).

The height rules are untouched. A floor of two rows on the compose area would
close the same gap, and it would take a body row from a room already at its
floor and move every golden in the package.

TestAMultilineDraftNeverCollapsesSilently could not see the branch. Its
fixture pinned a pending gate and the collapsed-seat notice as absent in all
588 cells, and those two rows come out of the same budget the compose area
does — so the sweep measured a compose area two rows taller than a real room's
and reported the frame correct. It now varies both, at 2352 cells, and it
asserts one more thing: two typed rows are never drawn welded into one. Forty
of the new cells fail on the old code.

docs/design.md §9.38 gets the 2026-08-17 amendment. It names the sentence that
called the render correct at 60x10, says why the sweep could not support it,
and records what the marker shows.

Goldens: composer-clipped-to-one-row.txt and its -ascii partner, at 60x10, so
the frame is bytes in both glyph sets. No existing golden moved.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sanlee-ys
sanlee-ys merged commit 87d27ce into main Aug 17, 2026
5 checks passed
@sanlee-ys
sanlee-ys deleted the council/composer-clip-marker branch August 17, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant