fix: keep a multi-line item detail's shape on the widget and markdown surfaces - #61
Merged
silversurfer562 merged 3 commits intoAug 29, 2026
Merged
Conversation
…s-hunk-review-001) 3/3 for (C): `hunk_review` stays consumer-gated. No seat argued for building it; none could name a construct-defining validator rule that `triage` does not already cover. Two corrections to the chair's held lean, reached independently: - The reuse target is `triage`, not `assumption_review`. Its vocabulary is fixed BECAUSE the vocabulary is the construct (D2-a), so accept/edit/reject over hunks matches the answer shape and lies about the speech act. - The interim costs zero files, not three: a verdict-only hunk board is expressible in shipped `triage` slots (id / detail / tag / dispositions / suggested) with no library change. Curated stub carries the ruling, the zero-change encoding table, the needs classified as rendering-vs-answer-shape, and three pre-recorded flip conditions so the gate stays a decision rather than an indefinite deferral. Full transcript is machine-local and untracked. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… surfaces A `detail` carrying more than one line — a diff hunk, a log excerpt — was corrupted on the way out of both rendering surfaces. Found by probing the zero-change `triage` encoding for hunk review (round table q-forms-hunk-review-001): the deliberation asserted the encoding works, running it showed what it costs. Widget: the detail rendered as an inline <span> inside a flex row with no `white-space` rule, so HTML folded its newlines and leading indentation into single spaces and a diff arrived as one run-on line. A multi-line detail now renders as an `ae-detail-block` — full-width, white-space:pre-wrap, monospace — via one shared `_detail_html` helper and one CSS_BASE rule, fixing `triage`, `assumption_review`, `progress` and `confirm` together. A single-line detail still renders as the same inline span it always did, so the common case is byte-identical. Markdown: the detail was interpolated into the item's bullet line, so every line it started with `-` — every removed line of a diff — parsed as a NEW bullet, and a `suggested` suffix landed on the detail's last line instead of the bullet. A multi-line detail now renders as an indented code block under the bullet. The block is INDENTED rather than fenced because a fence cannot survive this surface: `_defuse_fences` breaks every three-backtick run in author text so the trailing reply skeleton keeps its boundaries (confirmation pass 2). For the same reason an author's own ```lang wrapper is stripped rather than kept — defused, it would render as visible backtick noise. The answers skeleton is verified to still round-trip through `markdown_to_answers` -> `collect_form_response`. Answer layer untouched: no validator, fold, or answer shape changes. FORM_THEME_CSS budget raised 10 KB -> 12 KB (chair-ruled 2026-08-28) for the shared rule; a trim to fit under 10 KB was offered and declined. Now 10,263 B. The ratification is recorded in the theme docstring alongside the previous three. 11 regression tests added, each naming the defect and its thread. 824 passing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The project formats with black (pinned 24.10.0 in .pre-commit-config), not `ruff format` — the two disagree on these call wrappings, so CI's lint job failed on an otherwise-green branch. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
silversurfer562
added a commit
that referenced
this pull request
Aug 29, 2026
…'s missed fourth site (#62) Retro probe 2026-08-29: the multi-line-detail defect fixed in #61 for triage/assumption_review/confirm was still live in _progress_lines. Both progress row styles now route through _item_row; one regression test. Also records the theme-cap bar (raises buy families, not rules) in the theme docstring. Shipped via the first live consumer run of the hunk-review-as-triage encoding (q-forms-hunk-review-001); both hunks chair-ruled apply. 825 tests passing.
silversurfer562
deleted the
claude/attune-forms-types-constructs-2f75b4
branch
August 29, 2026 11:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A
detailcarrying more than one line — a diff hunk, a log excerpt — was corrupted on the way out of both rendering surfaces. Found by probing the zero-changetriageencoding for hunk review: the round table asserted the encoding works; running it showed what it costs.Answer layer untouched — no validator, fold, or answer-shape changes.
The two defects
Widget. The detail rendered as an inline
<span>inside a flex row with nowhite-spacerule, so HTML folded its newlines and leading indentation into single spaces — a diff arrived as one run-on line, on the rich surface.Markdown. The detail was interpolated into the item's bullet line, so every line it started with
-— every removed line of a diff — parsed as a new bullet, and asuggestedsuffix landed on the detail's last line instead of the bullet.The fix
One helper and one CSS rule rather than four per-construct patches:
widget._detail_html(text, cls)— inline<span>when single-line,<div class="… ae-detail-block">when not. Five call sites:triage,assumption_review, bothprogressrenderers,confirm.CSS_BASErule —.ae-detail-block { flex-basis:100%; white-space:pre-wrap; …monospace; overflow-x:auto; }, plusflex-wrap:wrapon.ae-prog-row/.ae-gate-row.markdown_surface._detail_block/_item_row— a multi-line detail becomes an indented code block under the bullet, suffix left on the bullet. Applied totriage,assumption_review, andconfirmconsequences.A single-line detail still renders as the same inline span / inline em-dash it always did — the common case is byte-identical.
Why indented and not fenced
A fence cannot survive the markdown surface:
_defuse_fencesbreaks every three-backtick run in author text so the trailing reply skeleton keeps its boundaries (confirmation pass 2). My first attempt fenced the block and it rendered as visible backtick-plus-zero-width noise. An indented block needs no backticks at all.For the same reason an author's own
```langwrapper is now stripped rather than kept — defused, it could only ever render as noise. The answers skeleton is verified to still round-trip:form_to_markdown→markdown_to_answers→collect_form_response, zero problems.Theme budget
FORM_THEME_CSSraised 10 KB → 12 KB (chair-ruled 2026-08-28) for the shared rule; a trim to fit under 10 KB was offered and declined. Now 10,263 B, 2,025 B headroom. Recorded in the theme docstring alongside the previous three raises — the cap remains a design decision, not a ratchet.Also included
docs/reports/roundtable/q-forms-hunk-review-001.md— the round table that surfaced this. 3/3 for build nothing:hunk_reviewstays consumer-gated, the reuse target istriage(notassumption_review, whose fixed vocabulary is the construct), and the interim costs zero files. The stub carries the zero-change encoding table and three pre-recorded flip conditions.Verification
ruff check+ruff formatcleandetailhit them; diffs just made them obvious🤖 Generated with Claude Code