Files
Miguel Angel Simon Sierra 73865b3890 fix(studio): drop the resurrected WebMCP polyfill assertion
#3516 merged from a branch cut before da6514d45 and brought back
`expect(document).not.toHaveProperty("modelContext")`, along with the old
test title. This re-applies that fix.

The assertion is racy, not merely wrong. The hook awaits a dynamic import
of the `@mcp-b/global` polyfill inside its mount effect, so whether
`document.modelContext` exists when the assertion runs depends only on
whether that import has resolved yet. `await act()` usually returns first,
which is why main went green while another PR's run went red. Inserting a
100ms wait before the assertion on the current tip makes it fail every
time, and the failure dump shows all five tools registered through the
polyfill: the real behaviour is the opposite of what the line asserted.

Installing `document.modelContext` where the browser has none is the
polyfill's job. What the case is really for is that mounting does not
throw, so a browser without native WebMCP still boots Studio.
2026-08-30 13:49:03 -04:00
..
2026-08-30 00:31:08 -04:00
2026-08-30 00:31:08 -04:00
2026-08-30 00:31:08 -04:00
2026-08-30 00:31:08 -04:00
2026-08-30 00:31:08 -04:00
2026-08-30 00:31:08 -04:00
2026-08-30 00:31:08 -04:00
2026-08-30 00:31:08 -04:00
2026-08-30 00:31:08 -04:00