Skip to content

feat(web): add embeddable thread route /embed/thread/:id for canvas tile hosts #1

Closed

Description

@rororowyourboat

Goal

Add a minimal standalone route that renders just the conversation + input for a given `threadId`, with no sidebar chrome. This is the iframe target for t3-canvas agent shapes.

Context

t3-canvas is a canvas-first workbench that embeds T3 Code agent sessions as tiles. Each tile is a tldraw shape containing an iframe. For the iframe host, we need a URL that renders only the conversation view — no app-level header, no sidebar, no thread list. Query param `?minimal=1` toggles the stripped-down layout.

This patch is a prerequisite for t3-canvas issue #3 (Phase 2A).

Acceptance criteria

  • New route `/embed/thread/:id` reads `threadId` from URL params
  • Renders only the conversation component (messages, streaming, tool calls, input box)
  • Query param `?minimal=1` hides any remaining chrome (padding, borders, app header)
  • Works with existing WebSocket / provider session plumbing
  • Missing thread shows a clear error state with a "recreate" action
  • Existing routes and app-level chrome untouched

Scope

~200 LOC.

Files (verify against current repo state)

  • `apps/web/src/routes/EmbedThread.tsx` (new)
  • `apps/web/src/App.tsx` — register route
  • `apps/web/src/components/EmbedThreadView.tsx` (new)
  • CSS for `?minimal=1` mode

Branch

`feat/embed-thread-route` (separate from current `feat/sidebar-project-groups`).

How to test

  1. `bun run dev`
  2. Create a thread via main UI, note its ID
  3. Visit `http://localhost:/embed/thread/?minimal=1`
  4. Verify stripped-down view, streaming, input all work
  5. Embed in an iframe from another local-origin page and verify the same behavior
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions