Skip to content

Keep panel draft and sent message wrapping aligned - #3679

Merged
leaf-agent merged 3 commits into
mainfrom
fix/ci-39886063961-draft-test
Oct 23, 2026
Merged

leaf-agent merged 3 commits into
mainfrom
fix/ci-39886063961-draft-test

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Restore the line-for-line draft preview promised by #3486. The panel's user messages currently use more reading width than its editor, so the first list item loses a wrapped line after Send. The shared scrollbar clearance added in #3670 also makes sent code blocks taller than their draft preview. Give user messages the editor's reading width inside the panel and carry the same code-block clearance in the draft.

The unchanged list-preview test failed in main run 39886063961 and passes with this change. The Markdown editing check, browser build check, and all 523 runtime tests passed. The separate Send overlap failure remains on this branch's base and is addressed by #3678.

@leaf-agent
leaf-agent merged commit 0cb65ea into main Oct 23, 2026
4 checks passed
@leaf-agent
leaf-agent deleted the fix/ci-39886063961-draft-test branch October 23, 2026 04:04
max-sixty added a commit that referenced this pull request Oct 25, 2026
A message the user sent ended its lines up to 86px short of the agent's
reply under it: 86px in the floating panel and 41px in a thread on the
page, the room Send takes in the field it was typed in. #3679, a CI fix,
narrowed the panel's user messages to the field's width so a draft's
list would wrap as the sent message does; #3737 and #3813 widened that
room to Send's on every surface. No review weighed the cost to every
message the user reads back.

A user's message now ends the thread's text inset short of the column
(8px in the panel, 13px on the page), as far in as it starts, which is
the room its rewrite's frame stands in, so a rewrite still keeps every
line where it stood and its frame inside the reply box's width. That
makes the rewrite's reach past the column (`--lf-msg-edit-past-end`)
always zero, so it goes, with the panel's own sum and the root copy of
`--lf-compose-send-end`. A margin card keeps its messages on the comment
box's column, as before.

Behavior change: a reply typed in the panel or a page thread can rewrap
when sent, as one typed in a margin card already did.

`test_the_user_s_words_end_where_the_agent_s_do` fails on main by 86px
(panel) and 41px (page) and passes here.
`test_a_draft_draws_a_list_as_the_message_will` now gives its long list
item two lines' worth of words, which wrap to two lines in the field and
in the wider sent column alike; its three-line item wrapped a line
shorter once sent.

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 25, 2026
A CI repair that changes what a page draws names the states it changes,
and its review captures each with leaf-dev stills on base and head and
looks at the crops before the verdict. The review makes the captures
because a bot's PR description can't carry images; #3679 narrowed every
sent message 86px and no replay of the code review ever caught it.

Closes #4130

> _This was written by Claude Code on behalf of max-sixty_

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 25, 2026
…pair (#4149)

Since `merge: yolo`, Tend's self-review is the only gate on the 626 pull
requests it has authored and merged, and at least 17 of them were later
reverted, replaced or broke main. Most cost every user or later change
something to fix one case: room reserved in every margin message for a
rewrite that may never open (#2959), a third wrapping mode (#3678), a
guard refusing writes whenever a code hash changed (#2416), a public
knob nobody needed (#3830), every sent message narrowed 86px to pass a
test (#3679). The review threshold ended the review once the claimed
path worked and omitted "minor simplification", and the review logs show
reviewers stopping there; the upstream "Does the change carry its
weight?" never produced a finding.

## Changes

- **`/developing-leaf` gains "Weigh what a change adds"**, the forward
version of the Regular maintenance bar, for whoever writes or reviews a
change: what it adds, what that buys, who pays and who gains, and the
cheaper change.
- **The running-tend review threshold** points to it, counts an addition
that costs more than it buys as a finding rather than polish, widens
"regressions on the claimed path" to anywhere the change reaches, and
has the reviewer state the weighing in the session before searching for
defects, since on Tend's own pull request a defect found in an addition
gets fixed and the addition lands. Findings that ask a change to cover
more (compatibility, bounded edge cases, work outside the diff) stay
omitted.
- **A CI repair that changes what a page draws** names the states it
changes, and its review captures each with `leaf-dev stills` on base and
head and looks at the crops before the verdict. The review makes the
captures because a bot's description can't carry images.

## Validation

An offline replay of Tend's Codex reviewer (`gpt-6.1-sol`, the tend
review skill, history cut at each merge, no network or tests), with only
these two files differing between arms, over five bad merges and three
good ones:

| Arm | Bad PRs held for the cost the later fix removed | Good PRs held
for complexity |
|---|---|---|
| main | 0 of 10 | 0 of 6 |
| criterion as a pointer only | 0 of 5 | 0 of 3 |
| weighing stated before the verdict (four wordings, pooled) | 7 of 40 |
0 of 24 |

A hold for an edge-case bug didn't count. The counts are small (p ≈
0.3), though the direction held in every round. #3679 was never caught
by any arm, which is what the stills rule is for; that rule has no
replay, since the replay ran without a browser.

Closes #4130

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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