Skip to content

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

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

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

Conversation

@ochafik

Copy link
Copy Markdown
Contributor

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

github-actionsBot commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Preview

Preview deployments for this PR have been cleaned up.

@pkg-pr-new

pkg-pr-newBot commented Apr 21, 2026

Copy link
Copy Markdown

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
ochafikforce-pushed the ochafik/pre-handshake-guard branch from 91a16e7 to 737efe1CompareApril 21, 2026 10:42
@ochafik
ochafikforce-pushed the ochafik/useapp-autoresize branch from b7ba3ee to 82c8688CompareApril 21, 2026 10:42
@ochafik
ochafik changed the base branch from ochafik/pre-handshake-guard to mainApril 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
ochafikforce-pushed the ochafik/useapp-autoresize branch from 82c8688 to cc61c07CompareApril 21, 2026 10:45
@ochafik
ochafik merged commit 4f89a6f into mainApr 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 freeto 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

@ochafik