Skip to content

Type until the words themselves reach Send's corner, in any face - #6058

Merged
max-sixty merged 3 commits into
mainfrom
mac-test-fixes
Nov 15, 2026
Merged

max-sixty merged 3 commits into
mainfrom
mac-test-fixes

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

test_send_leaves_the_corner_to_the_words_and_takes_a_press_after_a_rest[panel-browser] failed in the Nov 15 macOS nightly run (the words stop short of Send's column, 831.14 > 832), one of the four failures in #6048, and fails the same way on this Mac at main. The field counts the caret after the words toward Send's corner (text-field.js, #cornerTaken), so in macOS's faces, at the panel's current width, the caret takes the corner a character before the words reach Send's column. Which character reaches it first depends on the face and the field's width, so the case passed on macOS until the layout changed. The product behaves as designed; the test assumed the words, not the caret, would take the corner.

The test now types until the last glyph of the row runs past Send's start, measuring to that glyph because a space at a row's end hangs past the line. To free the corner it erases until neither the words nor the caret reach it, then types those characters back. This also makes the check bite: with the panel's field reserving Send's room again (--lf-field-end-room), the test now fails, where before a hanging space let it pass.

Test-only. All five test_send_corner.py cases pass on this Mac; Linux CI runs them on this PR.

max-sixty asked for fixes to the macOS-only test failures; they haven't read this yet.

Refs #6048

This was written by Claude Code on behalf of max-sixty

`test_send_leaves_the_corner_to_the_words_and_takes_a_press_after_a_rest[panel-browser]`
failed in the Nov 15 macOS nightly run, and on this Mac at main, with `the words stop
short of Send's column` (`831.14 > 832`). The field counts the caret after the words
toward Send's corner (text-field.js, `#cornerTaken`), so in macOS's faces, at the
panel's current width, the caret took the corner a character before the words did,
0.86px short of Send's column. The test then read the words as stopping short, and
its later steps, which move the caret away, need words in the corner to keep it
taken. Which character reaches the corner first depends on the face and the field's
width, so the case passed on macOS until a layout change moved it.

The test now types until the row's last glyph runs past Send's start, measuring to
that glyph, since a space at a row's end hangs past the line wherever the line ends.
To free the corner it erases characters until neither the words nor the caret reach
it, and types them back. With the panel's field reserving Send's room again
(`--lf-field-end-room`), the test now fails with "three sentences never ran the words
into Send's column"; before, a hanging space let it pass.

Refs #6048
leaf-agent
leaf-agent previously approved these changes Nov 15, 2026

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Non-blocking: _type_to_the_corner now returns only once the words themselves reach Send's column. That makes the page.keyboard.type("xy") / ArrowLeft step in test_send_follows_the_corner_when_an_edit_adds_or_removes_a_line redundant. #4847 added that step, with its comment "The words themselves, not only the caret after them, run into the corner", to work around the caret-first corner this PR handles. Those two extra characters also push the row closer to wrapping its last word, and a wrap would leave joined["rowEnd"] short of Send. Dropping the step and its comment would leave the helper as the one place that guarantees the words reach the corner.

The helper now returns once the words themselves reach Send's column, so the join
test no longer needs "xy" typed after them, which also brought the row closer to
wrapping its last word. The test now starts an empty line after the row and joins it
back.
@max-sixty
max-sixty merged commit 189646e into main Nov 15, 2026
5 checks passed
@max-sixty
max-sixty deleted the mac-test-fixes branch November 15, 2026 19:40
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.

2 participants