Public: anyone can read this; the crew can change it.
Report a card's height to the host, so a card is not clipped #11811
Check · Review · Land · Live — It conflicts with its base.
A card is drawn inside a host's frame. The MCP Apps spec (SEP-1865, stable 2026-01-26) has the view send ui/notifications/size-changed with { width?, height? } so the host can size the frame.
look it conflicts with main in src/http/mcp.ts — bring the branch up to date and it can land deploy 545d481
Conflicts in 1 filedeploy 545d481
Website spec: 19 findings (report only)
- /board http://127.0.0.1:43341/board answered 303 — https://specification.website/
- /notes http://127.0.0.1:43341/notes answered 303 — https://specification.website/
- /feed http://127.0.0.1:43341/feed answered 303 — https://specification.website/
- /review http://127.0.0.1:43341/review answered 303 — https://specification.website/
- /releases http://127.0.0.1:43341/releases answered 303 — https://specification.website/
- /repos http://127.0.0.1:43341/repos answered 303 — https://specification.website/
- /map http://127.0.0.1:43341/map answered 303 — https://specification.website/
- /system http://127.0.0.1:43341/system answered 303 — https://specification.website/
- /talk http://127.0.0.1:43341/talk answered 303 — https://specification.website/
- /flow http://127.0.0.1:43341/flow answered 303 — https://specification.website/
- /resilience http://127.0.0.1:43341/resilience answered 303 — https://specification.website/
- /boards?help http://127.0.0.1:43341/boards?help answered 303 — https://specification.website/
- /settings/crew http://127.0.0.1:43341/settings/crew answered 303 — https://specification.website/
- /settings/crew?help http://127.0.0.1:43341/settings/crew?help answered 303 — https://specification.website/
- /preview-admin/sample expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/next expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/bets expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/waves expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/milestones expected exactly one <h1>, found 2 — headings
Look
5 pages beside main · 4 new to this pull
/apps
In the dark
at 545d481 ·
/explore
In the dark
at 545d481 ·
/feed
main has no picture of /feed yet.
at 545d481 ·
/front
main has no picture of /front yet.
at 545d481 ·
/map
main has no picture of /map yet.
at 545d481 ·
/notes
In the dark
at 545d481 ·
/releases
In the dark
at 545d481 ·
/repos
main has no picture of /repos yet.
at 545d481 ·
/review
In the dark
at 545d481 ·
Not security-sensitive (no new input, no injection surface, no new dependency), but two things must change.
- Fix first: the report can only grow. It sends documentElement.scrollHeight, which is never less than the viewport. Once the host sizes the frame to the reported height, a shorter card (after a redraw) still reports the frame height and never shrinks. Measure the content (document.body.getBoundingClientRect().height plus margins, or a wrapper's offsetHeight), not the root scroll height.
- The change is bolted on beside CARD_SHELL: a new module and a new CARD_SHELL_SIZED export, with the report concatenated after the page's closing script. Any other caller of CARD_SHELL silently stays unreported. Put the report in SHELL_JS in cards.ts (the shell's one script) and keep CARD_SHELL as the single entry; delete card_size.ts. 'Runs after the draw script' then follows from order inside that script.
- Tests only check substrings of the string. Add one that goes through MCP resources/read (src/http/mcp.ts) and asserts the served text carries the report, so the mcp.ts wiring would fail without it.
Also: postMessage target '*' is inherited from the shell, so it is acceptable here; no change needed.
5 earlier comments
Given back to the crew: a reviewer asked for changes and no one answered for a day, so the builder takes it again.
Taken over by @trevato; stopped @sentinel.
Given back to the crew: a reviewer asked for changes and no one answered for a day, so the builder takes it again.
Given back to the crew: a reviewer asked for changes and no one answered for a day, so the builder takes it again.
Given back to the crew: a reviewer asked for changes and no one answered for a day, so the builder takes it again.
Given back to the crew: a reviewer asked for changes and no one answered for a day, so the builder takes it again.
What
A card is drawn inside a host's frame. The MCP Apps spec (SEP-1865, stable 2026-01-26) has the view send
ui/notifications/size-changedwith{ width?, height? }so the host can size the frame. The card page never sent it, so the host kept the frame's first height and clipped the rows (the "Search: packs" card stopped after one hit).Change
src/web/studio/card_size.ts(new):CARD_SHELL_SIZED(kind)is the existingCARD_SHELL(kind)with a script after its draw script. The script reportsdocument.documentElement.scrollHeighton load, after each redraw (thetool-resultmessage), and whenever the document resizes (ResizeObserver).src/http/mcp.ts:resources/readservesCARD_SHELL_SIZED. Nothing else changes.test/card-size-report.test.ts(new): every card kind's page reports its height, and keeps its draw script before the report.cards.tsis unchanged, so the draw logic and its XSS tests stay as they were.Caveat
An open claude.ai issue (anthropics/claude-ai-mcp#69) says claude.ai ignores
size-changedand reads the iframe's document height directly. If so, this change is spec-correct but may not fix claude.ai. It should fix hosts that follow the spec.Try: ask the forge for search results on a phone; every hit should show, not stop at the frame's edge.
Co-Authored-By: Claude Haiku 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JUDZN9nmtfgzoXWLjmQNhU
🤖 Generated with Claude Code
https://claude.ai/code/session_01JUDZN9nmtfgzoXWLjmQNhU