- The skill told agents both to never put a pairing URL in a response and
to hand the shared one to the user. State the rule and its single
exception explicitly: give the URL to the person who asked for access,
never put it anywhere durable.
- A failed `tailscale serve` left the port unshared, because the stale-
mapping clear had already run. The clear is still required (old
mappings carry path routes that serving "/" would not replace), so say
so in the error instead of letting an operator assume the previous
mapping survived.
- Worktree-derived ports were described as collision-free. They are a
preferred offset, not a guarantee — hashes can collide and occupied
ports shift both values. Qualified in AGENTS.md, the skill, and
docs/reference/scripts.md.
CodeRabbit also asked for tests around the pairing-url command; those
landed in 0555604de, which it had not yet seen.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
- `auth pairing url` resolved the state directory with the same flag
heuristic the command exists to hide, so without --dev-url it read
`userdata` while `bun run dev` writes to `dev`. It then minted into the
wrong database and printed a URL the live server rejects with
`invalid_credential`. It now searches both state directories and issues
against whichever one the running server actually uses.
- A server killed with SIGKILL leaves `server-runtime.json` behind, and
that was taken as proof it was still up. Verify the recorded pid is
alive before minting.
- `--dry-run --share` replaced and then tore down the port's existing
tailscale mapping. Dry run now returns before the share block.
deriveServerPaths takes an optional explicit stateDir for callers that
have already located a running server and must target it exactly.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Browser dev is now single-origin: Vite proxies /api, /ws, /oauth, and
/.well-known to the backend, and dev/dev:web no longer bake
VITE_HTTP_URL/VITE_WS_URL into the bundle. Absolute localhost URLs in the
bundle sent any remote browser to its own machine, which no amount of
external path mapping could fix.
- `dev --share` publishes the web port on the tailnet and logs a pairing
URL already built against that origin
- `dev:pair` mints a pairing URL for a running server, resolving port and
state dir from server-runtime.json
- Ports derive from the worktree path, so each worktree is stable across
restarts; the availability probe is loopback-only so `tailscale serve`
can't push the port
- Web session cookies are port-scoped like desktop's, ending the
cross-instance "Invalid session token signature" loop
- Dev startup pairing tokens last 24h instead of 5m; user-issued links
keep the 5m default
Co-Authored-By: Claude Opus 5 (1M context) <[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.
* Handle prerelease tags when publishing GitHub releases
- Derive `is_prerelease` and `make_latest` from the version format in preflight
- Mark suffixed versions (for example `1.2.3-alpha.1`) as prereleases
- Keep only plain `X.Y.Z` releases marked as latest
- Document prerelease/latest behavior in `docs/release.md`
* Force desktop auto-updates to stable latest channel
- set Electron updater channel to `latest`
- disable prerelease and downgrade updates regardless of app version
- Keep Claude Code and Cursor in provider list as disabled options
- Remove unused Claude agent SDK dependency from server
- Delete stale plan-mode deep-dive doc
- Define Cursor operating mode as binary `default | plan`
- Document mapping for `cursor/ask_question`, `cursor/create_plan`, and `cursor/update_todos`
- Update capability and fallback guidance based on docs plus probe evidence
- Reframe doc into a provider-agnostic implementation plan for Codex, Claude, and Cursor
- Define canonical mode, plan, and structured user-input models plus capability-driven UI behavior
- Add concrete orchestration, adapter, frontend, and test work items for rollout
- wire `electron-updater` into desktop main/preload IPC and shared contracts
- add sidebar update action for download/install state in Electron UI
- update release workflow/build script to include `latest*.yml` and `*.blockmap` assets
- add GitHub Actions release workflow for v*.*.* tags with preflight checks
- build and publish macOS, Linux, and Windows desktop artifacts in one release
- replace DMG-only script with cross-platform `dist:desktop:artifact` flow
- document release, signing setup, and new desktop dist commands
- Ignore auxiliary/non-active turn completions for session lifecycle and checkpoints
- Restrict runtime thread/turn IDs to provider IDs in contracts
- Add regression tests and ADR for lifecycle ownership rules