Skip to content

Conversation

@ochafik
Copy link
Collaborator

@ochafik ochafik commented Jan 7, 2026

Summary

Fixes E2E test flakiness and improves host resilience to server connection failures.

Changes

  1. basic-host: Be resilient to individual server connection failures

    • Use Promise.allSettled instead of Promise.all
    • Failed connections are logged as warnings but don't crash the UI
    • Only throws if ALL servers fail to connect
  2. threejs-server: Add id to canvas for reliable screenshot masking

    • Added id="threejs-canvas" to the canvas element
    • Updated e2e test masks to use #threejs-canvas and .threejs-container
    • Fixes flaky Three.js screenshot comparisons in CI

Test plan

  • Run npm run examples:start, stop one server, verify UI continues working
  • Run E2E tests: npm run test:e2e:docker

🤖 Generated with Claude Code

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 7, 2026

Open in StackBlitz

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/ext-apps@206

commit: 6d3c85f

@ochafik ochafik requested a review from antonpk1 January 7, 2026 14:01
@ochafik ochafik marked this pull request as ready for review January 7, 2026 14:01
1. video-resource-server: Add missing server-utils.ts and fix import path
   - Was importing from non-existent ../shared/server-utils.js
   - Now correctly imports from ./src/server-utils.js

2. basic-host: Be resilient to individual server connection failures
   - Use Promise.allSettled instead of Promise.all
   - Failed connections are logged as warnings but don't crash the UI
   - Only throws if ALL servers fail to connect

3. threejs-server: Add id to canvas for reliable screenshot masking
   - Added id="threejs-canvas" to the canvas element
   - Updated e2e test masks to use #threejs-canvas and .threejs-container
   - Fixes flaky Three.js screenshot comparisons in CI

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ochafik ochafik changed the title fix: E2E test fixes and host resilience improvements fix: E2E test stability and host resilience improvements Jan 7, 2026
@ochafik ochafik force-pushed the ochafik/fix-e2e-tests branch from e920bce to 6d3c85f Compare January 7, 2026 14:09
@ochafik ochafik changed the title fix: E2E test stability and host resilience improvements fix: make example host more resilient to broken servers Jan 7, 2026
@ochafik ochafik merged commit 7eb98ad into main Jan 9, 2026
19 checks passed
@ochafik ochafik mentioned this pull request Jan 9, 2026
ochafik added a commit that referenced this pull request Jan 9, 2026
Merge latest changes from main including:
- Vue, Svelte, Preact, and Solid basic server examples (#141)
- safeAreaInsets support (#202)
- E2E test fixes (#206)
- npm publishing for examples (#184)
- ui.resourceUri optional (#210)
- Method names as consts (#192)
- toolInfo.id optional (#216)
- PostMessageTransport security fixes (#207, #208)
- Server-utils.ts refactoring
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