[Bug]: ReadOnlyThreadTimeline (guest links and linked threads) mounts McpAppFrame against fake 'guest' environment, showing 'Unable to load the ... app' #42958
Threads shared via guest links (/guest?share=...) — and read-only linked-thread panes — render a tall empty box saying 'Unable to load the app' after every MCP App tool call (for example, 'claude.ai Atlassian MCP' on 'Create Jira 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#
- Run a thread that calls an MCP tool returning an inline MCP App widget (for example, 'claude.ai Atlassian MCP' -> 'Create Jira issue').
- Share the thread with Share with guest (Settings -> Labs -> Guest links enabled).
- Open the guest link (/guest?share=...) in a browser and join the session.
- Scroll to the tool calls that produced MCP Apps.
Expected behavior#
The read-only timeline handles mcp-app rows without querying a non-existent environment (the same way renderHtmlRender handles html-render rows in ReadOnlyThreadTimeline): the tool call row remains visible and no broken 320px 'Unable to load the app' error boxes appear.
Actual behavior#
Every mcp-app row renders a full-height fallback box with:
Unable to load the claude.ai Atlassian MCP app
Root cause:
- ReadOnlyThreadTimeline (apps/web/src/components/chat/ReadOnlyThreadTimeline.tsx) passes a sentinel activeThreadEnvironmentId={NO_ENVIRONMENT_ID} (EnvironmentId.make('guest')) with the comment: 'No environment answers to this one, so a row that would ask the thread's environment for something gets nothing.'
- ReadOnlyThreadTimeline accepts renderHtmlRender so GuestPage (GuestHtmlRender) and LinkedThreadPane (a compact notice) override HtmlRenderTimelineRow (apps/web/src/components/chat/TimelineAssistantRows.tsx), avoiding HtmlRenderFrame against NO_ENVIRONMENT_ID.
- McpAppTimelineRow (apps/web/src/components/chat/TimelineAssistantRows.tsx) has no equivalent renderMcpApp override. It unconditionally mounts <McpAppFrame environmentId={ctx.activeThreadEnvironmentId} ... /> against 'guest'.
- McpAppFrame (apps/web/src/components/chat/McpAppFrame.tsx) calls useLongLivedAssetUrl(EnvironmentId('guest'), resource) (and mcpAppEnvironment.toolInfoQuery against 'guest'). Because no environment answers to 'guest', asset._tag === 'Failure', rendering 'Unable to load the {app.server} app' for every MCP App row in the thread.
Impact#
Minor bug or occasional failure
In threads with repeated MCP App tool calls (such as Jira/Atlassian), the guest timeline fills with repeated blank 'Unable to load the ... app' error boxes, crowding out the actual conversation.
Version or commit#
main @ 4568a1b741
Environment#
Windows 11, T3 Code Web via T3 Connect guest relay (t3coderelay.com/guest?share=...), Claude Code with claude.ai Atlassian MCP.
Logs or stack traces#
Unable to load the claude.ai Atlassian MCP app
Workaround#
Ignore the error boxes; the tool call rows themselves (Create Jira issue) still appear in the timeline.
Possible direction#
Mirror renderHtmlRender with an optional renderMcpApp prop on TimelineRowSharedState, MessagesTimeline, and ReadOnlyThreadTimeline. When provided, McpAppTimelineRow delegates to ctx.renderMcpApp(row) instead of mounting McpAppFrame against NO_ENVIRONMENT_ID (so GuestPage can omit or replace it cleanly and LinkedThreadPane can show a compact notice like it does for renderHtmlRender).
tanstack-source added labelsbug
joseehilton147(GitHub profile, opens in a new tab) linked this to #42972
Sign in to join this conversation.