Skip to content

Keep final panel draft words clear of Send - #3678

Merged
leaf-agent merged 7 commits into
mainfrom
fix/ci-39886063961-panel
Oct 23, 2026
Merged

leaf-agent merged 7 commits into
mainfrom
fix/ci-39886063961-panel

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

The floating panel's last-line Send spacer could wrap onto a line by itself, leaving the final typed word beneath the Send button. Keep that spacer with the word in panel editors. Other composers retain their existing trailing-space behavior, which preserves the sent comment's placement.

The overlap failed in main run 39886063961 and on current main. The focused overlap check now passes, along with the 11 composer placement cases that cover the other surfaces. The runtime suite passed 523 tests, and browser/build checks completed.

Regenerate the kernel after main changed its generated bundle and widget runtime.
Regenerate the kernel after new runtime and site changes landed.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new :host([data-lf-end-room-glued]) rule outranks the later touch and [data-scrolls] rules that set the last-line spacer to content: none. In a 390px touch panel, the field has 28px of end padding and the spacer still renders, so Send's room is reserved twice and the draft wraps early. Give both overrides enough specificity to remove the spacer when every line already holds that room.

The glued final-line spacer outranked the existing touch and scroll overrides, so those fields kept both their end padding and the spacer. Match the glued selector in both overrides and cover the touch layout with a focused browser check.
leaf-agent added a commit that referenced this pull request Oct 23, 2026
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](https://github.com/max-sixty/leaf/actions/runs/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.

Co-authored-by: leaf-agent <[email protected]>
Regenerate the kernel with the landed draft parity change.
Regenerate the kernel after motion and focus changes landed.
@leaf-agent
leaf-agent merged commit 8e63bdb into main Oct 23, 2026
4 checks passed
@leaf-agent
leaf-agent deleted the fix/ci-39886063961-panel branch October 23, 2026 04:28
max-sixty added a commit that referenced this pull request Oct 24, 2026
Typing a space after the last word of a draft could pull that word back
up a line. The field kept Send's room after its last words only, as an
inline spacer after the last line; #3678 glued the spacer to the last
word with a no-break space, so a word that fit only without the room
wrapped together with it, and a typed space opened a break between them
that let the word rise again. Before #3678 the spacer could instead wrap
alone and leave the word under Send. Each mode beside it (every line
under a finger, every line while the field scrolls) was another branch
where wrapping depended on state other than the words.

The field now keeps the room as end padding on every line, the one mode
the coarse-pointer and scrolling cases already used, and the anchored
comment box already used for every pointer. Where a draft wraps turns on
the words and the box's width alone. This removes the last-line
decoration, the glued variant, the `endRoom` reading and the panel's
`data-lf-end-room-glued`. It reverses the 15 October choice to let the
panel's lines above the last run under Send's column; at the user's
direction, every line now gives up that room (26px in the panel, more in
a card's reply box) for wrapping no keystroke at the end can change.

CodeMirror's `break-spaces` also moved a word: a space typed after a
word ending at the row's edge took room on that row and carried the word
down with it. The field and the sent message's paragraphs now use
`pre-wrap`, where a line-end space hangs, as in a textarea. Messages
whose words end within a space of the edge wrap a word later than
before.

A user's sent message keeps the column of the reply box it was written
in, so it now ends Send's room short of its edge too: by default
`--lf-compose-send-end` (Send's hit box and its insets), which the reply
box's room is now stated from, as lf-diff and visual-review threads use.
The panel's sent reply kept the field's width by a sum that held only
under a mouse; it now counts the room, both of the row's seats and its
padding, so a reply rewraps neither under a mouse nor a finger. A margin
card's messages keep the anchored comment box's end, so a reply typed in
the card still rewraps when sent, as it did before.

Tests: `test_a_space_after_the_last_word_moves_no_word` types the
reported comment a word at a time and presses Space after each, in
Chromium and Firefox; on main it fails at "...strong view". It replaces
the test of the scrolling mode, and the touch test of the glued spacer
goes with it. The panel row test now holds every line short of Send, and
the journey test of Shift+Enter under a full last line, whose room no
longer takes a line of its own, now checks that typing on an opened line
leaves the words above at rest where they were.

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

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

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