Skip to content

test(sidebar): hold the demo's opening turn in the sidebar heads check - #5082

Merged
devswha merged 4 commits into
mainfrom
fix/flaky-sidebar-heads-pc-menu
Nov 30, 2026
Merged

devswha merged 4 commits into
mainfrom
fix/flaky-sidebar-heads-pc-menu

Conversation

@devswha

@devswha devswha commented Nov 30, 2026

Copy link
Copy Markdown
Owner

What

scripts/sidebar-heads-demo-regression.ts timed out on main (run 46348181507) and on #5073's rerun (job 141903279281) at scripts/pc-menu.ts:21, waiting for .row-menu, .row-sheet after a held press in "a phone's drawer opens each PC's menu with a held press".

Why

The demo transport ends its opening turn 4.5 s after load (setTimeout(finishOpeningTurn, 4500) in site/demo/transport.ts). The turn's done droplet is shown while the drawer is open, sits just under the top row and stays about 4 s. That is exactly where the open drawer's first PC header (Laptop) is. On a slow runner the phone check reaches that header inside the window, so:

  • the CDP touch lands on .droplet-card, not the header: no press timer, no menu, timeout at pc-menu.ts:21;
  • or the earlier hit-test fails: "a tap on the middle of Laptop's title lands on it" (reproduced locally on a loaded machine).

Proof: forcing the turn to end (__ovisDemoFinishTurn()) right before the check fails it on the first scene, with elementFromPoint at the title's middle answering SPAN.droplet-title > ... > BUTTON.droplet-card > DIV.droplet ("Idempotent payments").

The product behaves as designed (a droplet may cover the drawer briefly), so the test is fixed, not the app.

Fix

Set __ovisDemoHoldTurn in an init script, as 11 other demo checks already do: the opening turn never ends on a timer, so no droplet or status change lands mid-check. No sleeps, no timeouts changed.

Verification

  • bun scripts/sidebar-heads-demo-regression.ts: 20 full runs started together on a loaded machine (load ~140 on 128 cores), all exit 0 with 39 PASS each.
  • bun run typecheck: exit 0.
  • Before the fix, the same machine failed the phone scene once in 12 focused runs.

Test-only change: no changelog fragment.

The demo ends its opening turn 4.5 s after load, and that turn's droplet
drops over the open phone drawer's first PC. On a slow runner the phone
check reached Laptop's header in that window, so the held press landed on
the droplet and the PC menu never opened (pc-menu.ts:21 timeout), or the
title hit-test failed. Hold the turn like the other demo checks do.
@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Tests
    • Sidebar-heads regression checks now pause the demo’s opening turn during page initialization, keeping the demo in a consistent state while these checks run. This is an internal testing change and does not alter the demo’s behavior for end-users.

The sidebar-heads regression script now sets window.__ovisDemoHoldTurn to true before its existing scene initialization.

Changes: Sidebar heads regression

Layer / File(s) Summary
Hold the demo turn before initialization
scripts/sidebar-heads-demo-regression.ts
The script sets window.__ovisDemoHoldTurn to true before scene initialization. The added comment notes that the opening-turn droplet overlaps the first PC in the open drawer.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Possibly related issues

  • Issue 4026 — The issue includes intermittent failures in this regression script. This change addresses one described failure mode: the opening-turn droplet overlapping the first PC during the check.

Possibly related PRs

  • devswha/ovis#4896 — Both PRs change browser and context setup in the sidebar-heads regression script.
  • devswha/ovis#4895 — This change adds an init script to contexts created with the appContext(...) factory.
Merge Risk: Minimal · previous review 82355

This test-only change stabilizes a flaky sidebar regression check by holding the demo's opening turn. It does not change application behavior, and no merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a test-only fix that holds the demo's opening turn in the sidebar heads check. It matches the raw summary, which says the script now sets window.__ovisDemoHoldTurn bef…
Description check Passed The description covers the What, Why, Fix, and Validation sections, so it follows the template's intent. It names the failing runs and the failing line (scripts/pc-menu.ts:21), explains the 4.5 s open…
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 that holds the demo's opening turn in the sidebar heads check. It matches the raw summary, which says the script now sets window.__ovisDemoHoldTurn before each page's init script. The title is 70 characters, within a concise single-sentence form.

Full details: Description check

Explanation

The description covers the What, Why, Fix, and Validation sections, so it follows the template's intent. It names the failing runs and the failing line (scripts/pc-menu.ts:21), explains the 4.5 s opening turn and droplet overlap, and describes the fix. Validation lists the commands run (bun scripts/sidebar-heads-demo-regression.ts and bun run typecheck) with results. It does not mention the changelog rule; it states 'Test-only change: no changelog fragment', which addresses that point. It does not state whether the fast or full check suite ran, and the template's CONTRIBUTING.md reference is not addressed, but these are non-critical gaps.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • 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 5df4ea4 and 82355b2.

Files selected for processing: 1

  • scripts/sidebar-heads-demo-regression.ts

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

@devswha

devswha commented Nov 30, 2026

Copy link
Copy Markdown
Owner Author

Review round at 82355b2:

  • omo reviewer (dori review): CLEAR.
  • Codex via axwith (gpt-6.2-sol--fast, xhigh): CLEAR, two LOWs, no change made for them:
    • LOW: CI did not record what took the touch; the forced repro hit-tested the middle of .machine-title, the held press uses the middle of .machine-name inside it. Both sit in the band the droplet covers (title at y 60-104, droplet card just under the top row).
    • LOW (pre-existing, outside this diff): the offline-PC check force-clicks the disabled New workspace item right after the sheet is visible, possibly while it still slides in; a missed click would also pass "opens nothing".

@devswha
devswha merged commit 284d720 into main Nov 30, 2026
15 checks passed
@devswha
devswha deleted the fix/flaky-sidebar-heads-pc-menu branch November 30, 2026 17:42
@devswha

devswha commented Nov 30, 2026

Copy link
Copy Markdown
Owner Author

Merged through pr-merge at head a7b6a1a60. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit said it did not review (a limit or a skip) since this head.

main had moved since the checks of e4010a615: pr-merge --update merged it in (4e167d03e), and every required check was green at this head.

It waited in the merge queue behind #5086, whose change overlaps it, before it was updated.

Reviews: omo reviewer (dori review) CLEAR at 301db09 and at 82355b2; Codex via axwith (gpt-6.2-sol--fast, xhigh) CLEAR at 82355b2 with two LOWs (PR comment). Later heads only merge main. The ui-regression failure at e4010a6 was scripts/secret-input-regression.ts:241, unrelated, green on rerun. Merge on the lead's word.

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