Skip to content

test: measure lf-note's frame inset past its indent margin, and finish the held search before Shift+n - #6211

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-3985
Nov 16, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-3985

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Two tests failed in main's push run 43928743834 (3bc561561). This PR fixes both, and changes only the tests.

  • test_code_is_colored_without_a_word_moving: the test was stale after fix: keep lf-note, lf-code's example and lf-shot at their first-paint size #6191. That PR moved a docked lf-note's line indent out of its padding and into margin-inline-start, so the card keeps its first-paint size. The card and its words still stand where they did, but the note's border box now starts at the indent: 33.5px from the frame for the example's 4-space line, where the test expected 1px. The test now measures the note's margin box, which is what meets the frame (to within 0.1px, since the indent is a fractional number of ch). It fails on main. With fix: keep lf-note, lf-code's example and lf-shot at their first-paint size #6191's code.css reverted, the old assertion passes.
  • test_a_step_back_after_the_page_changed_keeps_the_match_it_stood_on: the test pressed before the page was ready. It released the held search slices and pressed Shift+n at once. On a slow runner the search was still going, so the step back stayed on the first match and said "Searching", which is the behavior Keep n/N's place when the page changes while a repeated page search still runs #5910 specified, and the wait for the last match ran out at 120 s. The test now runs the held slices, and any they schedule, until the search ends, and then presses. With leaf-dev suite flake --cpu-throttle 8, it failed 4 of 18 copies before this change and 0 of 18 after. It also passed 18 of 18 at throttle 16.

The other two failures in that run already have owners: #5642/#6130 and #6139.

Not covered here: at throttle 8 to 16, test_code_is_colored_without_a_word_moving also fails sometimes at an earlier line. The test reads the lf-code token colours before bucket_key is split into its own span. CI has not shown this failure, and it happens with or without this change.

Refs #3985 — automated triage

…h the held search before Shift+n

Two tests failed in main's push run 43928743834 (3bc5615).

test_code_is_colored_without_a_word_moving asserted that the docked note's
box starts 1px inside the code frame. #6191 moved the line's indent out of
the note's padding into its margin-inline-start, so the box now starts at the
indent (33.5px for the 4-space line) while the card and words stay where they
were. The test now measures the margin box, which is what meets the frame. It
fails on main and passes with this change, and passes with #6191's code.css
reverted on the old assertion.

test_a_step_back_after_the_page_changed_keeps_the_match_it_stood_on released
the held search slices and pressed Shift+n at once. On a slow CPU the search
was still running, so the step back stayed on the first match ("Searching"),
as designed, and the wait for the last match timed out. The test now runs the
held slices, and the ones they schedule, until the search ends before pressing.
`leaf-dev suite flake --cpu-throttle 8` failed it 4 of 18 before and 0 of 18
after (0 of 18 at throttle 16).

Refs #3985
@leaf-agent
leaf-agent merged commit 64587cc into main Nov 16, 2026
6 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-3985 branch November 16, 2026 20:51
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