Skip to content

Open each file in the view-area tests once the one before it is shown - #852

Merged
yansfil merged 1 commit into
mainfrom
fix/flaky-view-pin-order
Oct 9, 2026
Merged

yansfil merged 1 commit into
mainfrom
fix/flaky-view-pin-order

Conversation

@yansfil

@yansfil yansfil commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Summary

The view-area tests double-clicked several Explorer files back to back and then expected their tabs in click order.
Each open reads its file on its own worker thread (herdr-core/src/runtime/documents.rs, start_document_open), and a file's view is added to the end of its area when its read lands (split_tree.rs, insert), so two opens close together are placed in the order their reads finish.
That is the failure in #789: f05.txt landed before f03.txt and f04.txt in one run, and f06.txt before f05.txt in the next.
The tests now open one file at a time through keepOpenInTurn, which double-clicks a row and waits until that file is selected and kept open in the area in use before opening the next; every expected shape is unchanged.

Closes #789

Review

  • web/e2e/s7.spec.ts: the helper and its seven call sites (pinNine and six tests that opened two to four files in a row). The wait is on the shown state, and each double-click stays one action outside the poll.
  • Question for the reviewer: should tabs opened in quick succession appear in the order they were asked for, whatever order their reads finish in? docs/UI_BEHAVIOR.md does not promise it today, and this PR does not change the product. If the answer is yes, it is a core change (placing a view when its open is asked for, or landing reads in request order) and a separate issue.

Evidence

  • Mechanism reproduced locally with a throwaway test (not committed): double-clicking a 12 MiB file and then a 2-byte file, back to back, gave @(big.txt >small.txt) twice and @(>small.txt big.txt) once in 3 runs.
  • web/e2e/s7.spec.ts passed 16/16 with the fix (retries 0); before the fix, the six-areas test passed 10/10 locally, so the race needs CI's timing to show up in it.
  • Web lint (including the e2e test-size budget) and typecheck passed.

@yansfil
yansfil merged commit 564ba31 into main Oct 9, 2026
19 checks passed
@yansfil
yansfil deleted the fix/flaky-view-pin-order branch October 9, 2026 02:02
yansfil added a commit that referenced this pull request Nov 14, 2026
…n shell boundary

The Windows hook tests read a Memory diagnostic as proof that their payload
crossed the shell, and #852 widened that reading from one cause to the two a
failed ask leaves. That holds only while no cause is recorded for a session
the hook never read, so this case pins it: a request with no valid session is
turned away before the ask and leaves no diagnostics file. A mutation that
asked anyway fails it.
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.

Flaky test: at six view areas every split is refused with its reason, in the menu and on a drag, and no view moves

1 participant