Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(dev): dev server pairing and seed utilities #4557

Closedt3dotgg(GitHub profile, opens in a new tab)wants to merge 30 commits intomain fromagent/dev-utilitiesopened View on GitHub

Showing 27 changed files with 13 additions and 16 deletions (loading 24).

x
0 of 27 viewed, 27 left
2 additions and 0 deletions.agents/skills/test-t3-app/references/sqlite-fixtures.mdModified
View file
@@ -49,6 +49,8 @@
- `projection_pending_approvals`
- `projection_thread_proposed_plans`
​
+`projection_state` holds one cursor row per projector and is not read by the UI, but a fixture that omits it still breaks: `computeSnapshotSequence` returns 0 unless every projector has a row, which makes every shell snapshot advertise sequence 0. Write all of them (`PROJECTOR_NAMES` in `scripts/lib/projection-tables.ts`), at a sequence no higher than the event log actually reaches.
+​
Inspect `PRAGMA table_info(<table>)` and the current migrations under `apps/server/src/persistence/Migrations/` before constructing inserts. Keep identifiers unique, timestamps as ISO strings, JSON columns valid, and related project/thread/turn IDs consistent.
​
For a substantial current example, inspect `seedDatabase` in `scripts/mobile-showcase-environment.ts`. Adapt its column set to the target database instead of assuming copied SQL remains current.
9 additions and 12 deletions.agents/skills/test-t3-app/SKILL.mdModified
View file
@@ -13,7 +13,7 @@
2. Choose a base directory that belongs only to the current worktree or test:
- Use the repository's ignored `.t3` directory for reusable worktree-local state.
- Use `mktemp -d /tmp/t3code-test.XXXXXX` for disposable state and retain the printed absolute path.
-3. Start the full web stack with `vp run dev`. Add `--share` when the user needs to open it from another tailnet device. In a linked worktree it defaults to that worktree's gitignored `.t3`; pass `--home-dir <base-dir>` only when the test needs a different isolated directory.
+3. Start the full web stack with `bun run dev`. Use `bun run dev:share` when the user needs to open it from another tailnet device. In a linked worktree it defaults to that worktree's gitignored `.t3`; pass `--home-dir <base-dir>` only when the test needs a different isolated directory.
4. Keep the terminal session alive and read the selected server port, web port, base directory, and pairing URL from its output.
​
Treat a base directory as disposable only when it was created or deliberately selected for the current test. Never delete or directly seed the shared `~/.t3` directory. Prefer starting with a new temporary base directory over clearing state of uncertain ownership.
@@ -54,26 +54,23 @@
​
## Recover a consumed or expired pairing token
​
-Create another token against the same database and web URL as the running dev server:
+Ask the running server for a fresh pairing URL:
​