Stu Mason
Stu Mason

Activity

Pull Request Merged

PR #133 merged: fix(mcp): set documentElement height inline at parse time

Summary

PR #132's after-render `syncHeight()` was still firing too late. Claude.ai snapshots iframe height during initial load, well before our async `createMcpApp` callback or any `onToolResult` event.

Per the bug report (anthropics/claude-ai-mcp#69), the only timing window that works is setting `document.documentElement.style.height` inline, at HTML parse time — before any other script runs.

This PR adds a one-liner synchronous `

```html

```

The CSS `min-height` (from #131) and the after-render `syncHeight` (from #132) stay — they don't hurt and they help on spec-compliant hosts that respect resize notifications or CSS.

Test plan

  • Merge, deploy
  • Re-run AI coding agents brief
  • Confirm Compare/Neighborhood cards render at full 800px height
  • If still not honored, the failure mode is now diagnostic — Claude.ai is hard-capping inline mode regardless of any inline attribute, and we'd need to chase `requestDisplayMode` instead
+7
additions
-0
deletions
1
files changed