- ClaudeAdapter: dedupe workflow agents/phases by index (last write wins)
before applying entry caps, so repeated slot updates cannot exhaust the
cap and freeze later agents stale; restrict sessionUrl to http(s) so a
hostile tool result cannot smuggle a javascript: href
- workflowUi: guard sessionUrl scheme again at both anchor render sites
(defense in depth for payloads persisted before the adapter filter)
- Ingestion: JSON-encode the (threadId, taskId) tuple in stable workflow
activity ids to remove delimiter-ambiguity collisions
- workflow-logic: order same-timestamp activities by provider sequence
then lifecycle rank so task.completed can never apply before its
task.started
- WorkflowPanel/Card: scope phase and agent row keys by taskId so
switching runs remounts rows instead of leaking expanded transcript
state and cursors across runs
- workflowUi: phase progress counter counts settled (done + error)
agents instead of reporting 0/1 for an errored terminal phase
- client-runtime: readJournal query polls every 4s while mounted so the
Logs tab picks up new results during a live run
- mobile: keep workflow task.completed rows (only per-tick progress is
suppressed) — with no workflow card on mobile it is the only signal a
workflow finished or failed
Co-Authored-By: Claude Fable 5 <[email protected]>
Surface Claude Agent SDK workflow runs (the Workflow orchestration tool)
end to end in the desktop app:
- Contracts: WorkflowProgressEntry schemas, run handles, workflow
inspection RPCs, thread.task.stop command + task-stop-requested event
- ClaudeAdapter: normalize the SDK's undocumented workflow_progress
snapshot (size-capped, tolerant), forward workflow identity on task
events, emit task.workflowMeta from Workflow tool results, stopTask
- Ingestion: upsert workflow snapshots under a stable per-task activity
id so projections and reconnect payloads stay one row per run
- WorkflowInspectionService: path-validated, size-capped reads of the
run's script, journal, and per-agent transcripts (realpath containment
under ~/.claude/projects)
- Web: WorkflowRunCard inline in the chat timeline, a workflow right-
panel surface with Run/Script/Logs tabs, cursor-paged transcript
polling, stop + resume affordances; remote runs link to their cloud
session
Co-Authored-By: Claude Fable 5 <[email protected]>
- Replace attachment and favicon routes with signed asset URLs
- Harden workspace and attachment asset resolution
- Update browser preview components and shared contracts
Adds a desktop-only browser preview that lives in the right panel slot
alongside plan/diff. Lets the user point an Electron <webview> at any
URL — typed into a chrome-style URL bar, clicked from the empty-state
list of detected localhost dev servers, or auto-opened by a project
script with `previewUrl` set. Single-tab per thread.
Server (Effect/Layers):
- PreviewManager: per-(thread, tab) session metadata via SynchronizedRef
+ PubSub<PreviewEvent>; survives WS reconnect via `list`/replay.
- PreviewPortScanner: lsof on macOS/Linux, TCP probe fallback on
Windows; reference-counted polling so we only scan when subscribed.
- WS RPC + streams (`preview.open|navigate|refresh|close|list|reportStatus`,
`subscribePreviewEvents`, `subscribeDiscoveredLocalServers`).
Desktop:
- PreviewViewManager owns Chromium WebContents per tab, mediates
navigation/zoom/devtools/clear-storage. registerWebview gates by
webContents.getType() === "webview" and host-window match.
- IPC channels for create/close/register/navigate/back/forward/refresh/
zoom/hardReload/openDevTools/clearCookies/clearCache/getBrowserPartition.
- Forwards app-level shortcuts (mod+shift+J, mod+K, mod+,, mod+W) from
the webview back to the main window.
- Persisted browser session partition (cookies, cache).
Web:
- PreviewPanel/PreviewView/PreviewWebview render the surface; chrome row
with back/forward/refresh + URL input + Open-in-browser + 3-dot menu
(Hard reload, DevTools, Zoom −/+/reset, Clear cookies/cache).
- usePreviewSession subscribes to server events; usePreviewBridge
mirrors desktop state into the store and forwards Loading→Success/
LoadFailed back to the server.
- previewStateStore: per-thread snapshot + desktopOverlay + recently-
seen URLs (Zustand).
- rightPanelStore arbitrates plan vs. preview vs. diff; ChatView's
toggles strip the `?diff=1` URL hint when switching to preview and
vice versa so the panels are mutually exclusive.
- Top-nav Globe toggle in ChatHeader (desktop builds only) and a
`mod+shift+J` keybinding routed via a typed previewActionBus.
- PreviewEmptyState lists detected localhost servers (scanner +
configured project URLs + recently-seen) with live "listening" pulse.
- PreviewUnreachable: theme-aware port of Chromium's "site can't be
reached" page.
- Resizable inline panel (RightPanelResizeHandle + useResizableWidth);
width persists to localStorage on drag-end.
- Terminal link "Open in preview" context-menu integration for loopback
URLs.
Contracts:
- preview.ts schemas (PreviewSessionSnapshot, PreviewNavStatus,
PreviewEvent, RPC inputs/results, DiscoveredLocalServer).
- ProjectScript schema gains optional `previewUrl` + `autoOpenPreview`.
- New keybinding commands: preview.toggle/refresh/focusUrl/zoomIn/Out/
resetZoom; new `when:` contexts `previewFocus` / `previewOpen`.
Shared:
- @t3tools/shared/preview: normalizePreviewUrl, isPreviewableUrl,
isLoopbackHost, newPreviewTabId, LSOF_LOCAL_HOST_TOKENS.
Tests:
- contracts: schema decode tests for all preview events/snapshots/inputs.
- shared: URL normalization coverage.
- server: PreviewManager (open/navigate/reportStatus/refresh/close,
multi-subscriber isolation, idempotency); PortScanner (lsof parsing
including IPv6, TCP probe, reference-counted polling).
- web: previewStateStore (per-tab event application, dedupe,
reconnect recovery); rightPanelStore arbitration.