-
-
Notifications
You must be signed in to change notification settings - Fork 173
viewport -> containerDimensions #1185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Applies changes from PR #1148 (update-viewport-type branch) to the relocated file path. This refactoring: - Renames viewport to containerDimensions in host context payload - Removes viewportWidth/viewportHeight calculations (now using maxHeight/maxWidth) - Updates mobile detection to use device type refs instead of viewport width - Defaults to mobile-like behavior outside playground mode Resolves file path conflict caused by directory restructure in main.
WalkthroughThis change refactors the MCP Apps host context in the thread renderer component. The derivation logic shifts from using viewport dimensions to containerDimensions for size constraints. Memoized viewport-related values are removed and replaced with container dimension dependencies. Display mode selection logic now relies on playground device type when available. Refs are introduced to cache playground state for bridge handler access. The host context shape is updated accordingly, though the component's public interface remains unchanged. 📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🔍 Remote MCPSummary: Additional Context for PR #1185 ReviewProject ContextThe MCPJam Inspector is the local development client for ChatGPT apps, MCP ext-apps, and MCP servers, allowing users to build and test apps with a full widget emulator, chat with any LLM, and inspect server tools and resources. SEP-1865 and MCP Apps SpecificationThis PR aligns with the MCP Apps Extension (SEP-1865), which proposes standardized support for interactive user interfaces in the Model Context Protocol. The MCP Apps Extension introduces a standardized pattern for declaring UI resources, linking them to tools, and enabling bidirectional communication between embedded interfaces and the host application. Significance of the ChangesThe shift from Related Community WorkThe MCP-UI project spearheaded the vision of agentic apps with interactive interfaces, developed patterns for delivering rich user interfaces as first-class MCP resources, and is backed by a large community adopted at leading companies such as Postman, Shopify, Hugging Face, Goose, and ElevenLabs. [::web_search::] ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Applies changes from PR #1148 (update-viewport-type branch) to the relocated file path. This refactoring:
Resolves file path conflict caused by directory restructure in main.
Note
Aligns SEP-1865 host context and display-mode behavior.
hostContext.viewporttohostContext.containerDimensionsand sends onlymaxHeight/maxWidthviewportWidth/viewportHeightcalculations and related refs/depsisPlaygroundActiveRefandplaygroundDeviceTypeRef; updates mobile detection inonrequestdisplaymodeto use device type (defaults to mobile when not in playground)containerDimensionsWritten by Cursor Bugbot for commit bd792f3. This will update automatically on new commits. Configure here.