Skip to content

[Bug]: ReadOnlyThreadTimeline (guest links and linked threads) mounts McpAppFrame against fake 'guest' environment, showing 'Unable to load the ... app' #42958

Backlog

Description

@joseehilton147

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

  1. Run a thread that calls an MCP tool returning an inline MCP App widget (for example, 'claude.ai Atlassian MCP' -> 'Create Jira issue').
  2. Share the thread with Share with guest (Settings -> Labs -> Guest links enabled).
  3. Open the guest link (/guest?share=...) in a browser and join the session.
  4. 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:

  1. 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.'
  2. 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.
  3. McpAppTimelineRow (apps/web/src/components/chat/TimelineAssistantRows.tsx) has no equivalent renderMcpApp override. It unconditionally mounts <McpAppFrame environmentId={ctx.activeThreadEnvironmentId} ... /> against 'guest'.
  4. 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 @ 4568a1b

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions