Skip to content

feat(react): forward autoResize from useApp to App#622

Merged
ochafik merged 1 commit intomainfrom
ochafik/useapp-autoresize
Apr 21, 2026
Merged

feat(react): forward autoResize from useApp to App#622
ochafik merged 1 commit intomainfrom
ochafik/useapp-autoresize

Conversation

@ochafik
Copy link
Copy Markdown
Contributor

@ochafik ochafik commented Apr 21, 2026

Summary

Stacked on #620.

useApp() previously hardcoded autoResize: true when constructing the App. This exposes it as a hook option (default unchanged) so callers can disable the built-in ResizeObserver and drive sizing themselves via useAutoResize or manual sendSizeChanged() calls.

Test plan

  • Typecheck clean.
  • Default unchanged: omitting autoResize still passes true.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

Preview

Preview deployments for this PR have been cleaned up.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 21, 2026

Open in StackBlitz

@modelcontextprotocol/ext-apps

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

@modelcontextprotocol/server-basic-preact

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-preact@622

@modelcontextprotocol/server-basic-react

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-react@622

@modelcontextprotocol/server-basic-solid

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-solid@622

@modelcontextprotocol/server-basic-svelte

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-svelte@622

@modelcontextprotocol/server-basic-vanillajs

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-vanillajs@622

@modelcontextprotocol/server-basic-vue

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-vue@622

@modelcontextprotocol/server-budget-allocator

npm i https://pkg.pr.new/@modelcontextprotocol/server-budget-allocator@622

@modelcontextprotocol/server-cohort-heatmap

npm i https://pkg.pr.new/@modelcontextprotocol/server-cohort-heatmap@622

@modelcontextprotocol/server-customer-segmentation

npm i https://pkg.pr.new/@modelcontextprotocol/server-customer-segmentation@622

@modelcontextprotocol/server-debug

npm i https://pkg.pr.new/@modelcontextprotocol/server-debug@622

@modelcontextprotocol/server-map

npm i https://pkg.pr.new/@modelcontextprotocol/server-map@622

@modelcontextprotocol/server-pdf

npm i https://pkg.pr.new/@modelcontextprotocol/server-pdf@622

@modelcontextprotocol/server-scenario-modeler

npm i https://pkg.pr.new/@modelcontextprotocol/server-scenario-modeler@622

@modelcontextprotocol/server-shadertoy

npm i https://pkg.pr.new/@modelcontextprotocol/server-shadertoy@622

@modelcontextprotocol/server-sheet-music

npm i https://pkg.pr.new/@modelcontextprotocol/server-sheet-music@622

@modelcontextprotocol/server-system-monitor

npm i https://pkg.pr.new/@modelcontextprotocol/server-system-monitor@622

@modelcontextprotocol/server-threejs

npm i https://pkg.pr.new/@modelcontextprotocol/server-threejs@622

@modelcontextprotocol/server-transcript

npm i https://pkg.pr.new/@modelcontextprotocol/server-transcript@622

@modelcontextprotocol/server-video-resource

npm i https://pkg.pr.new/@modelcontextprotocol/server-video-resource@622

@modelcontextprotocol/server-wiki-explorer

npm i https://pkg.pr.new/@modelcontextprotocol/server-wiki-explorer@622

commit: cc61c07

@ochafik ochafik force-pushed the ochafik/pre-handshake-guard branch from 91a16e7 to 737efe1 Compare April 21, 2026 10:42
@ochafik ochafik force-pushed the ochafik/useapp-autoresize branch from b7ba3ee to 82c8688 Compare April 21, 2026 10:42
@ochafik ochafik changed the base branch from ochafik/pre-handshake-guard to main April 21, 2026 10:45
useApp() previously hardcoded autoResize: true. Expose it as a hook
option (default unchanged) so callers can disable the built-in
ResizeObserver and drive sizing themselves.
@ochafik ochafik force-pushed the ochafik/useapp-autoresize branch from 82c8688 to cc61c07 Compare April 21, 2026 10:45
@ochafik ochafik merged commit 4f89a6f into main Apr 21, 2026
22 checks passed
ochafik added a commit that referenced this pull request Apr 21, 2026
Conflict resolution:
- src/app.ts: kept _registeredTools (#72) alongside main's fields; took
  main's assertCapabilityForMethod implementation (sampling check from #530).
- src/react/useApp.tsx: took main's version (#72 doesn't touch this file;
  main has #622's autoResize forwarding).
- typedoc.config.mjs: kept #72's RequestHandlerExtra in
  intentionallyNotExported.
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.

1 participant