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):
- Widget connects → shows "Waiting for flight data..." spinner
- SDK immediately measures → reports height 110px (just the spinner)
- Host sets iframe to 110px
- Map data loads, but container is now only 110px
- Map has no space to render → invisible