modelcontextprotocol / modelcontextprotocol/ext-apps

setupSizeChangedNotifications reports size before content is ready, causing widgets to collapse

Open
#143 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
2.9k
Forks
387
Avg merge
3h 21m
Merged PRs (30d)
6

Description

Describe the bug
The setupSizeChangedNotifications() method measures and reports size immediately when connect() completes. For widgets with async content (maps, data fetches, etc.), this captures the loading state dimensions rather than the final rendered size.

if (this.options?.autoResize) {                  
    this.setupSizeChangedNotifications();  //      
  Called immediately after connect                 
  }  

To Reproduce
Connect https://open-sky-mcp.kontakt-e7d.workers.dev/mcp (repo) to MCPJam and observe. More context in this thread

Notes
From what I notice (but i could be wrong):

  1. Widget connects → shows "Waiting for flight data..." spinner
  2. SDK immediately measures → reports height 110px (just the spinner)
  3. Host sets iframe to 110px
  4. Map data loads, but container is now only 110px
  5. Map has no space to render → invisible

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing connect() into setupSizeChangedNotifications() and reproduce with the linked open-sky MCP server in MCPJam. Compare the initial spinner dimensions with the size after async map data loads. Done means widgets with asynchronous content report a usable final size instead of remaining constrained to the loading-state height.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.