Skip to content

test(phone): close a waiting pane's tab in phone-safe-area's landscape scene - #3768

Merged
devswha merged 1 commit into
mainfrom
test/phone-safe-area-busy-tab
Nov 12, 2026
Merged

devswha merged 1 commit into
mainfrom
test/phone-safe-area-busy-tab

Conversation

@devswha

@devswha devswha commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Summary

scripts/phone-safe-area-demo-regression.ts:63 timed out after 30 s waiting for [role=alertdialog] in the landscape scene, right after Close tab in a tab's menu. It failed on main (CI 43185338832 at aea3fdf) and on fix/chat-draft-guard.

Cause

TabStrip.tsx asks before closing a tab only when one of its panes is busy (working, blocked or waiting) or when it is the last tab. Otherwise it just closes it.

The scene opened the demo's api pane, whose turn ends 4.5 s after load (site/demo/transport.ts). Whenever the scene reached Close tab after that, the tab closed without a confirmation and the wait timed out.

Proven on main: a 6 s delay before that step reproduces the exact CI failure.

Fix (test only, no sleeps)

open() takes the pane to show (default: the api pane, as before). The landscape scene opens the web pane instead. That pane's agent waits on its question for good, so closing its tab always asks first. The other scenes are unchanged.

Validation

  • TMPDIR=~/.cache/ovis-tmp/ci-loop bun scripts/phone-safe-area-demo-regression.ts: pass.
  • The same with a 6 s delay before Close tab, the delay that fails on main: pass. This was a local experiment, not committed.
  • bun run check fast: pass (typecheck, build, unit tests, actionlint).

No changelog fragment: this changes a test only.

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Tests
    • The landscape regression check now uses the web view for its confirmation check. Other regression checks continue to use the default view.

The phone safe-area regression script now allows open to navigate to a selected pane. The landscape run selects panes.web, with a comment explaining the pane choice.

Changes: Pane selection

Layer / File(s) Summary
Select a pane for the landscape run
scripts/phone-safe-area-demo-regression.ts
open accepts a pane argument that defaults to panes.api and navigates to that pane. The landscape regression run passes panes.web. A comment distinguishes the web pane’s persistent confirmation behavior from the API pane’s timed turn and idle-tab behavior.

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

Change: Other

Possibly related PRs

  • devswha/ovis#3119: Adds the same regression script and covers its layouts; this change continues work in that script by selecting the web pane for the landscape run.
Merge Risk: Minimal · up to bbd07

This only changes a test script so the tab-close confirmation check uses a pane that waits indefinitely. It does not affect product behavior, and no merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the change: a test in the phone-safe-area landscape scene now closes a waiting pane's tab. The diff changes the landscape scene to open the web pane, whose agent waits on a question, s…
Description check Passed The description follows the template. The Change section explains the failure, its cause (the api pane's turn ends after 4.5 s, so Close tab skips confirmation), and the fix. The Validation section li…
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 change: a test in the phone-safe-area landscape scene now closes a waiting pane's tab. The diff changes the landscape scene to open the web pane, whose agent waits on a question, so tab-close confirmation appears. The title is specific and matches the main change.

Full details: Description check

Explanation

The description follows the template. The Change section explains the failure, its cause (the api pane's turn ends after 4.5 s, so Close tab skips confirmation), and the fix. The Validation section lists the commands run and their results, including a local delay experiment. The template's CONTRIBUTING and changelog reference is handled by the note that no changelog fragment is needed. A feature issue link is not required because this is a test-only fix.

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 93b526d and bbd0736.

Files selected for processing: 1

  • scripts/phone-safe-area-demo-regression.ts

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

@devswha
devswha merged commit 3752f87 into main Nov 12, 2026
12 of 13 checks passed
@devswha

devswha commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Merge pass

Merged head bbd07366fdf8 as 3752f87305d6 on GitHub's checks, with no unresolved review threads.

Reviewer Verdict Note
codex CLEAR

One reviewer: test-only PR (scripts/phone-safe-area-demo-regression.ts).

Merged with these checks red, none of them required: Native macOS session identity;

Test-only PR (scripts/phone-safe-area-demo-regression.ts), so one reviewer: Codex Terra, CLEAR.

The tab strip asks before closing only a busy or last tab, and the demo ends its one running turn 4.5 s after a load, so a 'Close tab' that came later closed without the confirmation the script waits for (:63, red on main's run of aea3fdf under load). The landscape scene now closes the tab of a pane that stays waiting. The author reproduced the failure on main with a 6 s delay and ran the fix with and without it.

@devswha
devswha deleted the test/phone-safe-area-busy-tab branch November 12, 2026 14:24
@devswha

devswha commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Merge pass: merged with one check not green. Native macOS session identity, not a required check, was cancelled after 15 minutes because its runner is offline; this PR changes one browser script, which that job does not run.

@devswha

devswha commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Correction from the merge pass: the Native macOS session identity job this PR merged without was not cancelled because a runner of ours is offline. It runs on GitHub's hosted macos-15, and GitHub cancelled it after it found no macOS arm64 runner ("not acquired by Runner of type hosted ... capacity constraints"). The rest stands: it is not a required check and this PR touches none of the six test files it runs.

devswha added a commit that referenced this pull request Nov 13, 2026
## Summary
`scripts/phone-back-demo-regression.ts` failed on #3804's run
43386193239 (Browser regression, other scripts) at line 348. It waited
30 s for `.confirm-dialog` after tapping a tab's close button in the
tablet scene. #3804 changes only `src/components/AgentSidebar*`.

Closing a tab asks first only while its agent is busy, or when it is the
last tab. The tablet scene opened the demo's api pane, whose turn ends
4.5 s after load (`site/demo/transport.ts`). When the tap came after
that, as it can on a loaded runner, the idle tab closed without a
question and the wait timed out. This is the cause #3768 fixed in
`phone-safe-area`.

The tablet scene is now two scenes:
- The first keeps the row menu and the final Back out of the app, on the
api pane as before. It no longer closes a tab.
- The new scene opens the web pane, whose agent waits on its question
for good. It opens a new terminal beside it and asserts two tabs. It
then switches back to the web pane's tab, because only the active tab
shows its close, and closes it. With another tab present, the question
comes from the busy check in `TabStrip.requestClose`, not from the
last-tab rule. Back closes the question, and both tabs stay.

`open()` takes the pane as an optional last argument and defaults to the
api pane.

## Validation
- `bun scripts/phone-back-demo-regression.ts` (after `bun run build`)
passes.
- It also passes with a temporary 6 s wait before the close, which is
not committed. Main with the same wait fails at line 348.
- `bun run check fast` passes.
- No changelog fragment, because the change is test-only.
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