Skip to content

test(file-viewer): open Settings with no mouse resting where it draws a row - #3864

Merged
devswha merged 1 commit into
mainfrom
test/file-viewer-settings-pointer
Nov 15, 2026
Merged

devswha merged 1 commit into
mainfrom
test/file-viewer-settings-pointer

Conversation

@devswha

@devswha devswha commented Nov 15, 2026

Copy link
Copy Markdown
Owner

What

scripts/file-viewer-regression.ts fails now and then with waiting 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, then ControlOrMeta+Shift+Comma); the mouse stays where it clicked, and when Settings draws a row there, the resting pointer opens that row's sentence after SENTENCE_REST_MS (450 ms, useRowSentence in src/components/SettingsControls.tsx). While a sentence is shown, Escape closes the sentence alone (by design, WCAG 1.4.13; settings-rows-demo-regression asserts 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. Only scripts/file-viewer-regression.ts changes; nothing under server/, shared/ or src/.

Validation

All browser runs inside the CI runner image (herdr-ci-runner:local, its own network namespace), through heavy-run.sh:

  • with a temporary 1.5 s rest before that Escape (local only, not in this PR): unpatched fails at the Settings wait (Settings visible on all 24 polls), patched passes the whole script;
  • bun scripts/file-viewer-regression.ts patched, 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_CHANGED whenever docker adds or removes an interface. CI's runner containers do not see that; it is not this PR's concern.)

…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.
@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Tests
    • Improved regression test consistency when opening Settings from file previews, the command palette, and web report overlays.

The regression script adds a helper that moves the mouse to (0, 0) before pressing the Settings shortcut. Seven scenarios now use the helper; their existing assertions and test flows remain unchanged.

Changes: Settings Shortcut in Regression Tests

Layer / File(s) Summary
Add and use the Settings shortcut helper
scripts/file-viewer-regression.ts
The new helper moves the mouse before pressing the Settings shortcut. Seven regression scenarios use it in place of direct shortcut presses.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Possibly related PRs

  • devswha/ovis#3758: Adds Settings row explanations associated with the mouse-hover behavior addressed by the test helper.

Suggested reviewers: haeminway1, anndii

Merge Risk: Minimal · up to b429d

This only changes how a regression test script opens Settings, to avoid an intermittent timeout. It does not affect production behavior, and no merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a test-only fix in scripts/file-viewer-regression.ts that opens Settings with the mouse parked where it cannot draw a row. It is specific to the file-viewer test and t…
Description check Passed The description covers the problem (intermittent Settings wait timeout after 'Chat Markdown image opens by touch'), the cause (resting pointer opening a row sentence after 450 ms, which makes Escape c…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: a test-only fix in scripts/file-viewer-regression.ts that opens Settings with the mouse parked where it cannot draw a row. It is specific to the file-viewer test and the Settings flake. It is a long title at 75 characters, but it is clear and related to the changeset.

Full details: Description check

Explanation

The description covers the problem (intermittent Settings wait timeout after 'Chat Markdown image opens by touch'), the cause (resting pointer opening a row sentence after 450 ms, which makes Escape close only the sentence), the fix (openSettingsByKeys helper used at seven keyboard openings), and validation (patched and unpatched runs, bun run check fast). It follows the template's Change and Validation sections. It does not link an issue, but the template only asks for one for features, and this is a test fix. The validation section does not explicitly mention the CONTRIBUTING.md checks beyond 'check fast', and no changelog.d entry is mentioned, which is a minor gap.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 0a91d14 and b429d43.

Files selected for processing: 1

  • scripts/file-viewer-regression.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.

devswha added a commit that referenced this pull request Nov 15, 2026
…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).
@devswha
devswha merged commit b969ea8 into main Nov 15, 2026
19 of 23 checks passed
@devswha

devswha commented Nov 15, 2026

Copy link
Copy Markdown
Owner Author

Merge pass

Merged head b429d43c176d as b969ea870244 on GitHub's checks, with no unresolved review threads.

Reviewer Verdict Note
codex CLEAR

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.

@devswha
devswha deleted the test/file-viewer-settings-pointer branch November 15, 2026 02:39
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