Skip to content

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

@chelojimenez

Description

@chelojimenez

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions