[Bug]: MCP App inline frames never go below 80px, so compact apps get blank space under them
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 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
- Connect an MCP server whose tool declares an MCP App (
_meta.ui.resourceUri→text/html;profile=mcp-app). - 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 } } - 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 分钟
- 30 天内合并 PR
- 418
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pingdotgg/t3code 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
via-triage
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
[Bug]: Settings inheritance popover shows raw slugs for branch naming, default permissions and response streaming可能已有人在做 @juliusmarminge 于 1 天前认领。 未关闭vouch:denounced
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
[Bug]: Message navigation minimap shows a visible vertical track line on custom themes with an opaque border color可能已有人在做 @ixmxvii-hash 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
相似的 Issue
-
Resources: Update work of urumqi可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
railmapgen/rmp-gallery#4176 ·
维护者通常 2 天内回复
-
GraphQL custom headers duplicate differently cased default headers可能已有人在做 @yxr-2025 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
enhancement sharing & sync
难度 1/5 1 小时以内 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
HelpCode-ai/anythingmcp#1659 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复