Skip to content

fix(mcp): preserve directory for additional tab videos#41680

Open
yury-s wants to merge 1 commit into
microsoft:mainfrom
yury-s:fix-41659
Open

fix(mcp): preserve directory for additional tab videos#41680
yury-s wants to merge 1 commit into
microsoft:mainfrom
yury-s:fix-41659

Conversation

@yury-s

@yury-s yury-s commented Jul 7, 2026

Copy link
Copy Markdown
Member

Summary

  • browser_start_video dropped the directory part of the filename for videos recorded from additional tabs (recordings/video.webmvideo-1.webm) because the numeric suffix was applied with path.basename.
  • Preserve path.dirname so additional tab videos land next to the first (recordings/video-1.webm).

Fixes #41659

@yury-s yury-s requested a review from pavelfeldman July 7, 2026 18:01
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Test results for "MCP"

8 failed
❌ [chrome] › mcp/annotate.spec.ts:173 › user-initiated annotate downloads zip with feedback.md @mcp-ubuntu-latest-chrome
❌ [chrome] › mcp/cli-devtools.spec.ts:217 › video-start-stop @mcp-windows-latest-chrome
❌ [chromium] › mcp/cli-devtools.spec.ts:217 › video-start-stop @mcp-windows-latest-chromium
❌ [firefox] › mcp/cli-devtools.spec.ts:217 › video-start-stop @mcp-windows-latest-firefox
❌ [msedge] › mcp/cli-devtools.spec.ts:217 › video-start-stop @mcp-windows-latest-msedge
❌ [webkit] › mcp/annotate.spec.ts:173 › user-initiated annotate downloads zip with feedback.md @mcp-windows-latest-webkit
❌ [webkit] › mcp/cli-devtools.spec.ts:217 › video-start-stop @mcp-windows-latest-webkit
❌ [webkit] › mcp/dashboard.spec.ts:125 › daemon show: closing page exits the process @mcp-ubuntu-latest-webkit

7701 passed, 1235 skipped


Merge workflow run.

expect(tabCloseOutput).toContain(`0: (current) [](${server.EMPTY_PAGE})`);
const { output: videoStopOutput } = await cli('video-stop');
expect(videoStopOutput).toContain(`### Result\n- [Video](./video.webm)\n- [Video](./video-1.webm)`);
expect(videoStopOutput).toContain(`### Result\n- [Video](recordings/video.webm)\n- [Video](recordings/video-1.webm)`);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

windows won't like it much

@Skn0tt

Skn0tt commented Jul 8, 2026

Copy link
Copy Markdown
Member

Trying out a CI failure triage bot we're building - here's its verdict on this PR's failing checks, posting by hand for now so we can see it in context:


Hi, I'm the Playwright bot and I took a look at the failing CI.

🔴 video-start-stop fails on Windows because of this change

The 5 mcp/cli-devtools.spec.ts:217 › video-start-stop failures (all on @mcp-windows-latest-*) are caused by this PR. path.join() uses the OS separator, so on Windows the second video path comes out as recordings\video-1.webm, but the test asserts the forward-slash recordings/video-1.webm. This test passed on all 115 prior runs in the CI results DB — the only thing that changed is this PR. The other two failures are pre-existing flakes on unrelated PRs.

Details

Caused by this PR

  • [chrome|chromium|firefox|msedge|webkit] › mcp/cli-devtools.spec.ts:217 › video-start-stop (5×, all @mcp-windows-latest-*) — the switch to path.join(dir, path.basename(...) + suffix + ext) in backend/context.ts produces a \ separator on Windows, so the suffixed video is emitted as recordings\video-1.webm while the updated assertion expects recordings/video-1.webm. The test has never failed in 115 prior runs, and it fails on every browser on Windows — explainable everywhere, not engine-specific. Normalizing the emitted path to / (or asserting with path.sep) fixes it.

Pre-existing flake / infra

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.

[MCP]: browser_start_video drops the directory for videos recorded from additional tabs

3 participants