Repository navigation
Type until the words themselves reach Send's corner, in any face - #6058
Merged
Merged
Conversation
`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
previously approved these changes
Nov 15, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
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.
leaf-agent
approved these changes
Nov 15, 2026
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.
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.pycases 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