Skip to content

fix(studio): update WebMCP test for polyfill fallback - #3532

Merged
miguel-heygen merged 1 commit into
mainfrom
miga/fix-studio-webmcp-test
Aug 28, 2026
Merged

fix(studio): update WebMCP test for polyfill fallback#3532
miguel-heygen merged 1 commit into
mainfrom
miga/fix-studio-webmcp-test

Conversation

@miga-heygen

Copy link
Copy Markdown
Contributor

Summary

  • The useStudioAgentTools test "registers nothing when the browser has no WebMCP" asserted document.modelContext was absent after mount
  • Since feat(studio): fall back to a WebMCP polyfill where the browser has none #3514 added the @mcp-b/global polyfill, the hook installs document.modelContext even without native browser support — that's the polyfill's purpose
  • Updated the test to verify that mounting doesn't throw (the real contract), without asserting polyfill absence

This fixes the CI / Test failure on main.

Other main CI failures (not ours)

  • Docs / Validate docsnpm error notarget No matching version found for mint@4.2.837 (docs tool dependency)
  • Windows / Tests on windows-latestECONNREFUSED ::1:3000 (Windows network test infra)
  • regression — cancelled, not failing

Test plan

  • All 9 useStudioAgentTools tests pass with NODE_ENV=development
  • Pre-commit hooks: lint, format, fallow, typecheck all green

— Miga

🤖 Generated with Claude Code

The "registers nothing when the browser has no WebMCP" test asserted
that document.modelContext was absent after mount. Since #3514 added
the @mcp-b/global polyfill fallback, the hook now installs
document.modelContext even when the browser has no native support —
that is the polyfill's job. The real assertion is that mounting does
not throw, which still holds.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@miguel-heygen
miguel-heygen merged commit af1cb1c into main Aug 28, 2026
45 checks passed
@miguel-heygen
miguel-heygen deleted the miga/fix-studio-webmcp-test branch August 28, 2026 05:40
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.

2 participants