- Scanner: expand ~ in CLAUDE_CONFIG_DIR; sort transcripts by mtime before
applying the per-source cap; check alreadyImported against both recorded
and realpath spellings; derive the worktree-sandbox filter from the
configured worktreesDir instead of hard-coding .t3
- Contracts: AgentSessionScanError carries the structural operation
discriminator and derives its message (drops redundant failure literal)
- FirstRunGate: require server config before judging workspace freshness
(fixes both the offline-install-sees-wizard and config-race cases); only
gate authenticated sessions
- Wizard: T3 Connect "connected" view requires a live connection; the
no-machine wait gets a Skip; partial import failures keep the step open
and report the count; disabled providers show "Enable in Settings" instead
of Ready/Install; failed terminal opens retry
- Docs: match actual first-run and terminal sign-in behavior
Co-Authored-By: Claude Fable 5 <[email protected]>
New onboarding flow for fresh installs: choose how to connect (Local Only /
T3 Connect / Direct), verify Claude Code and Codex with live probe status and
an inline install terminal, then import existing projects discovered from
Claude/Codex home directories.
- FirstRunGate at the root holds back the entire authenticated tree until the
first-run decision is known, so fresh installs see nothing before /welcome
(no shell flash, no EventRouter thread navigation)
- New read-only agentSessions.scan RPC discovers project candidates from
~/.claude/projects and Codex session rollouts (cwd from transcript first
lines, never the lossy dir slug; T3-managed worktrees excluded)
- Import creates projects via existing project.create dispatch; default
window is last 30 days, full checklist behind Choose
- onboardingCompletedAt client setting gates the wizard; installs that
predate the field only qualify when the workspace is fresh
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.