[Bug]: MCP App inline frames never go below 80px, so compact apps get blank space under them

オープン 初心者向け
#35,911 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
半日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
frontend

調査の方向性

まず clampMcpAppHeight を packages/shared/src/mcpApp.ts で確認し、続いて McpAppFrame.tsx とモバイル版の mcpAppInlineHeight がこのクランプをどのように使っているかを確認してください。最小高さの動作を変更する前に、関連するテストがないか確認してください。報告された48pxの高さでコンパクトなインラインアプリを、現在の80pxの下限なしにレンダリングでき、サイズが報告される前にはデフォルト値が引き続き適用される状態になれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/web

Steps to reproduce
  1. Connect an MCP server whose tool declares an MCP App (_meta.ui.resourceUri → text/html;profile=mcp-app).
  2. Make the app render a compact single-row view (for example a one-line "receipt" of the tool call, about 40–50px tall) and report it after ui/notifications/initialized:
    { "jsonrpc": "2.0", "method": "ui/notifications/size-changed", "params": { "height": 48 } }
    
  3. Have the agent call the tool a few times in a row so several app cards stack in the timeline.
Expected behavior

The inline iframe follows the height the app reports (48px here), so a series of one-line cards stacks tightly, like normal tool-call rows.

Actual behavior

Every inline iframe is at least 80px tall. The app's content sits at the top and the rest stays blank, so each card carries roughly 30–40px of empty space under it and a run of tool calls is spread far apart.

The floor comes from clampMcpAppHeight in packages/shared/src/mcpApp.ts:

const MCP_APP_MIN_HEIGHT = 80;
export const MCP_APP_DEFAULT_HEIGHT = 320;

export function clampMcpAppHeight(height: number): number {
  if (!Number.isFinite(height)) return MCP_APP_DEFAULT_HEIGHT;
  return Math.round(Math.min(MCP_APP_MAX_HEIGHT, Math.max(MCP_APP_MIN_HEIGHT, height)));
}

McpAppFrame.tsx applies it to every size-changed (setHeight(clampMcpAppHeight(size.height))), and mobile's mcpAppInlineHeight uses the same clamp. The app has no way to get below 80px; centering the content in the frame only moves the blank space around.

A floor makes sense before the app has reported anything (the 320px default covers that). Once an app has measured itself, a small floor (or none beyond a positive height) would let compact apps render at their real size.

Impact

Cosmetic issue

Version or commit

Desktop 0.1.9; source checked at main @ 6f108e8

Environment

macOS, T3 Code desktop app 0.1.9

Workaround

None on the app side. Apps can only make their content at least 80px tall to fill the frame.

主要言語
TypeScript
スター
24.8k
フォーク
6.4k
平均マージ
59分
マージ済み PR(30日)
418

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pingdotgg/t3code のほかの issue

pingdotgg/t3code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。