Repository navigation
test(file-viewer): open Settings with no mouse resting where it draws a row - #3864
Conversation
…ing where it draws a row A mouse left by an earlier click on a spot Settings comes to cover opens that row's sentence after 450 ms, and Escape then closes the sentence alone, so the wait for Settings to close over the web report ran out on a busy machine. openSettingsByKeys moves the mouse to the corner before the shortcut, at all seven keyboard openings.
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
…ach fit the lane's limit (#3865) ## What `scripts/inbox-mode-demo-regression.ts` (#3856) is stopped at the browser lane's limit for one script (600 s, exit 124) on loaded runners, and so reddens every PR's "Browser regression (other scripts)": #3855 (twice), #3861, #3864. It is not hung: its log passes case after case until the limit stops it. Alone in the CI runner image on 6 CPUs it takes 310 s for its 134 cases; on CI's loaded runners it had reached about case 108 of 134 when the 600 s ran out (about 2.4 times slower), so the whole script needs about 745 s there. ## Fix (test-only) The script runs in three parts, each from its own browser and demo app, chosen by `INBOX_MODE_PART`: - `themes` (`scripts/inbox-mode-demo-regression.ts` itself, the default): the cases run in light and dark (cases 1-54); - `panes` (`scripts/inbox-mode-panes-demo-regression.ts`): terminals, splits, the focus, rows, the first paint, a lost connection, up to the system Back with a thread's More open; - `rail` (`scripts/inbox-mode-rail-demo-regression.ts`): a gone pane's addresses, the ways in, the column at every width, the rail. No case is dropped or changed. The two later parts are wrapped in `if (part === …)` blocks and indented by two spaces (no multi-line template string inside them, so no text changes); `light` and `desktop`, the only values both use, move above them. Review with `git diff -w` (about 15 lines in the script). The two new files are registered in `scripts/ci-browser.sh` and `tsconfig.tools.json`, and `docs/development.md` says which part has what. No wait or timeout is added or changed; the lane's limit stays 600 s. ## Validation In the CI runner image (`herdr-ci-runner:local`, pinned to one 6-CPU slot), each part alone: - `bun scripts/inbox-mode-demo-regression.ts` (themes): 54 passed, 0 failed, 89 s; - `bun scripts/inbox-mode-panes-demo-regression.ts`: 43 passed, 0 failed, 150 s; - `bun scripts/inbox-mode-rail-demo-regression.ts`: 37 passed, 0 failed, 117 s. 54 + 43 + 37 = 134, the cases of the whole script. At CI's observed 2.4x, about 215 s, 360 s and 280 s against the 600 s limit. - `bun run check fast`: passed (exit 0).
Merge passMerged head
One reviewer: test-only. One reviewer at this head (test-only, one browser script): Codex Terra CLEAR. From ci-loop: the file-viewer script's 'Settings not detached' flake has #3857's cause (a mouse left by an earlier click rests where Settings draws a row; its sentence opens after 450 ms and takes the Escape); a helper parks the mouse before each of the seven keyboard openings of Settings. |
What
scripts/file-viewer-regression.tsfails now and then withwaiting for getByRole('dialog', { name: 'Settings' }) to be detached(10 s), right after "Chat Markdown image opens by touch": Settings stays open after the Escape that should close it over the web report. It failed alone on public main cf5c3c3 (1 of 3, found by the relay contracts session) and on the private repository's main.Cause
The same one as #3857 (pane-mute). The script opens Settings from the keyboard after a mouse click elsewhere (
webReportLink.click()at 1280 px, thenControlOrMeta+Shift+Comma); the mouse stays where it clicked, and when Settings draws a row there, the resting pointer opens that row's sentence afterSENTENCE_REST_MS(450 ms,useRowSentenceinsrc/components/SettingsControls.tsx). While a sentence is shown, Escape closes the sentence alone (by design, WCAG 1.4.13;settings-rows-demo-regressionasserts it), so Settings stays and the wait runs out. Whether the Escape comes before the 450 ms is a matter of how busy the machine is.Shown by forcing the rest: with a temporary 1.5 s pause before that Escape (local only, not in this PR), the unpatched script fails at exactly that wait (Settings visible on all 24 polls), and the patched one passes.
Fix (test-only)
A helper,
openSettingsByKeys(page), moves the mouse to the page's corner before pressing the shortcut, and all seven places in this file that open Settings from the keyboard use it (each of them may follow a click whose pointer Settings would cover). No wait or timeout is added or changed. Onlyscripts/file-viewer-regression.tschanges; nothing underserver/,shared/orsrc/.Validation
All browser runs inside the CI runner image (
herdr-ci-runner:local, its own network namespace), throughheavy-run.sh:Settingsvisible on all 24 polls), patched passes the whole script;bun scripts/file-viewer-regression.tspatched, no rest: 2 of 2 passed.bun run check fast: passed (exit 0).(Run on this PC's bare host instead, browser scripts also fail now and then with "That PC is not reachable right now": Chrome aborts in-flight requests with
net::ERR_NETWORK_CHANGEDwhenever docker adds or removes an interface. CI's runner containers do not see that; it is not this PR's concern.)