Skip to content

test(web): steady the video attachment and right panel Escape tests on Linux CI - #613

Merged
yaacovcorcos merged 3 commits into
mainfrom
claude/video-attachment-test-flake-20261020
Oct 22, 2026
Merged

yaacovcorcos merged 3 commits into
mainfrom
claude/video-attachment-test-flake-20261020

Conversation

@yaacovcorcos

@yaacovcorcos yaacovcorcos commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Two main browser tests fail on Linux CI and drop PRs from the merge queue. Neither failure is related to the PRs they drop.

  1. MessagesTimeline "renders video attachments with the shared video player". The test points the video at https://environment.test/api/assets/demo.mp4, a host that doesn't exist. On CI the browser's load error can arrive during the frame the test waits before reading the markup. By then MediaVideoPlayer has already swapped in "Video preview unavailable", so the <video> assertion fails.
  2. RightPanelTabs "uses a custom binding from a text field and closes on Escape". After Escape, focus stayed on <body> for the whole 5 s wait. This failed twice in a row on this PR's own CI and has dropped many queue entries recently. Even with no running animations, Base UI defers close completion through its shared animation-frame scheduler. That makes focus restoration depend on frame timing inside the CI iframe.

Change

Both are test-only changes, and product code is unchanged.

  • Video: for this one test, a capture-phase error listener on document stops error events whose target is a <video>. The listener is removed in onTestFinished. This test covers rendering, and the next test still covers the unavailable state. It sits inside the existing Scient-owned SCIENT-FORK section, and upstream T3 doesn't have it.
  • RightPanelTabs: the change is made in paired SCIENT-FORK markers inside the upstream-owned test.
    • It sets Base UI's own BASE_UI_ANIMATIONS_DISABLED global (declared in @base-ui/react/global.d.ts and read by useAnimationsFinished). The file's unstubAllGlobals resets it.
    • It establishes real window and input focus before opening the menu, and checks that focus moved into the menu before Escape.
    • It then asserts that the menu unmounted and focus is back on the trigger.
    • Blocking the trigger's focus() still makes the test fail.

Verification

  • Video tests: 2 passed (Windows, headless Chromium).
  • RightPanelTabs.keyboard.browser.test.tsx: 10 of 10 full-file runs passed (90 tests), with no React act() warnings.
  • vp fmt and vp lint on both files: 0 errors.
  • What's proven: that Base UI picks the trigger, and that it defers close completion through its frame scheduler even with no animations.
  • What's not proven: the exact Linux mechanism, because the failure never reproduced locally. This PR's CI on Linux is the confirmation.

Documentation impact: None — test-only changes.

Model: Claude Opus 5.5 in Claude Code (Scient). The RightPanelTabs investigation and fix are by Codex gpt-6.1-sol.

🤖 Generated with Claude Code

"renders video attachments with the shared video player" points the video
at a host that does not exist. On CI the browser's load error can arrive
during the frame the test waits before reading the markup, and the player
has already swapped in its unavailable state, so the <video> assertion
fails. The test covers rendering, and a separate test covers the
unavailable state, so stop video error events in their capture phase for
this test only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S labels Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.6 KiB 5.6 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 4.3 KiB 4.3 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.3 KiB 1.3 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 26.2 KiB 26.2 KiB 0 B (0.0%) 29.3 KiB ✅
Codex Live turn messages 2 2 0 (0.0%) 8 ✅
Claude Total thread wire 5.6 KiB 5.6 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 4.3 KiB 4.3 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.3 KiB 1.3 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 26.6 KiB 26.6 KiB 0 B (0.0%) 29.3 KiB ✅
Claude Live turn messages 2 2 0 (0.0%) 8 ✅

Baseline: 8eeb303 · PR result: e675953 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Full compact HTTP snapshot with live cursor.

  • Codex decoded thread snapshot: 133.1 KiB
  • Claude decoded thread snapshot: 133.4 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

"uses a custom binding from a text field and closes on Escape" has failed
on Linux CI repeatedly (twice in a row on #613): after Escape, focus stayed
on <body> for the whole 5 s wait. Even with no running animations, Base UI
defers close completion through its shared animation-frame scheduler, so
focus restoration depended on frame timing in the CI iframe.

Disable Base UI animations for this scenario through its documented
BASE_UI_ANIMATIONS_DISABLED global, which unstubAllGlobals resets. Also
establish real frame and input focus first, check that focus moved into the
menu before Escape, then assert the menu unmounted and focus is back on the
trigger. Blocking the trigger's focus() still fails the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yaacovcorcos yaacovcorcos changed the title test(chat): keep the video rendering test independent of the load error test(web): steady the video attachment and right panel Escape tests on Linux CI Oct 20, 2026
@github-actions github-actions Bot added size:M and removed size:S labels Oct 20, 2026
@yaacovcorcos
yaacovcorcos added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit f958820 Oct 22, 2026
37 checks passed
@yaacovcorcos
yaacovcorcos deleted the claude/video-attachment-test-flake-20261020 branch October 22, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant