- dev:seed wrote projector cursors at 1..9 while leaving the target's
event log intact. The cursor is exclusive and a fresh log restarts at
sequence 1, so every projector would skip a different slice of the
user's first real events; the retained events would also replay over
the copied projections and resurrect the target's deleted threads. All
nine cursors now start at 0, and the event log and command receipts
are emptied with the projections.
- The thread-selection query referenced archived_at and
latest_user_message_at unconditionally, so a source older than
migrations 017/023 threw before copying anything. It now builds its
filter and ordering from the columns the source actually has, matching
how the rest of the copy handles drift. A table missing from the
target is likewise skipped rather than aborting the seed.
- --threads/--activities accepted negatives, which SQLite reads as "no
limit" — a capped copy silently became a full-table one. Both now
require a positive integer.
- resolveGitWorktreePath only looked at cwd, so running dev:pair from a
subdirectory fell through to the shared home. It walks up to the
repository root now.
- resolveWorktreeT3Home no longer returns undefined when .t3 is absent:
inside a worktree that is the answer, and falling back to the shared
home is precisely the accident the default prevents.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Four parallel cleanup reviews over the branch; the fixes that survived
verification:
- scripts/lib/dev-share.ts was a 216-line reimplementation of
@t3tools/tailscale (the client the server's own --tailscale-serve
uses). Now a thin wrapper adding only the dev-share semantics: the
stale-mapping pre-clear and the cleared/not-cleared result. Picks up
Windows tailscale.exe handling and command timeouts for free. The
package's exit error gains a bounded stderrPreview so callers can
recognize "handler does not exist" without a parallel spawner.
- The .git-is-a-file worktree check existed three times across two
packages; now once in @t3tools/shared/devHome. dev-runner drops its
duplicated T3CODE_HOME fallback so base-dir precedence lives in one
function.
- The dev proxied-prefix list existed in apps/web's vite config and
apps/server's http catch-all with nothing keeping them in sync; both
now consume @t3tools/shared/devProxy. The vite proxy map is built
from the list.
- PROJECTOR_NAMES and the projection-table delete order were pasted in
both seeding scripts; now shared via scripts/lib/projection-tables.
- PairingGrantStore keyed the dev startup TTL by string-comparing the
caller's subject; issueOneTimeToken takes an explicit
purpose: "startup" instead, and the subject constant returns to
EnvironmentAuth where its other uses live.
- dev-seed: iterate rows instead of materializing (unbounded copies
held the whole table in memory and the spread had a ~128k-element
ceiling); parameterized IN lists replace hand-rolled quoting.
- Smaller: cli/auth's layer stack deduped into environmentAuthLayer,
Set-based dedupe, precomputed proxied prefixes, vite HOST parsed
once, dead T3CODE_DEV_SHARE_URL removed, redundant tests dropped.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
An isolated dev database starts empty, which makes any list- or
thread-shaped UI impossible to look at without hand-writing fixtures.
`dev:seed` copies the newest threads and their projects out of the
shared home into the worktree's own database.
Projections only — `orchestration_events` is never copied. The projector
cursor is exclusive, so an empty event log means bootstrap streams
nothing and leaves the copied rows alone; a partial event range is the
real hazard, since the projector would replay a tail whose creating
events are missing.
Details that matter for a usable copy:
- writes all nine projection_state rows, or computeSnapshotSequence
reports 0 for every shell snapshot
- forces sessions to stopped with no active turn, since a copied
"running" session has no agent behind it and the reaper skips
anything with an active turn
- zeroes pending approval/input counts, as approvals are not copied
- copies the intersection of columns, because the two databases are
routinely on different migrations
- refuses to write to the shared home
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
`unshareDevServer` applied Effect.ignore, so a failed removal was
indistinguishable from a successful one. `shareDevServer` then served
over routes it had not removed: stale path entries from the older
`tsdev t3` layout (/ws, /api pointing at a separate backend port) would
survive, producing a URL that loads while its API calls resolve to a
dead port. The serve-failed message also asserted the port was cleared
without knowing it.
It now reports whether the port is clear, and sharing refuses when it
is not. `tailscale serve … off` exits nonzero with "handler does not
exist" when nothing was mapped — the normal first-share case — so that
counts as cleared; anything else does not. The dev-runner finalizer
warns, with the command to run, when cleanup does not take.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
- 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]>
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]>
* Stage production icons for desktop builds and publish
- add shared brand asset paths and a Windows .ico asset
- stage Linux/Windows icons in desktop artifact builds
- override and restore publish favicon during server CLI publish
* 'blip'
* Fix PR review issues for publish icon staging
* Refactor brand assets and harden Windows desktop build setup
* Apply remaining server orchestration updates
* Fix production mac icon asset
Co-authored-by: Theo Browne <[email protected]>
---------
Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: Theo Browne <[email protected]>