Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
572 commits
Select commit Hold shift + click to select a range
719bdb5
fix(web): isolate file-editor highlight tests and raise the 60-edit b…
github-actions[bot] Sep 5, 2026
ba47a6d
Merge pull request #451 from patroza/sync/upstream-d2c3e2e5d7
patroza Sep 5, 2026
ce18558
merge: sync upstream through 39802c0611
github-actions[bot] Sep 5, 2026
17bc8fb
fix: restore fork APIs after knip unused-export sync
github-actions[bot] Sep 5, 2026
0f95a3a
fix(ssh): pass HOME in remote install diagnostic fixtures
github-actions[bot] Sep 5, 2026
6a03cc4
fix(web): isolate settings-hydration tests from shared vite workers
github-actions[bot] Sep 5, 2026
dee6bb3
fix(server): notice git init despite VCS detection cache
github-actions[bot] Sep 5, 2026
d5d14cd
Merge pull request #452 from patroza/sync/upstream-39802c0611
patroza Sep 5, 2026
6c99cc0
merge: sync upstream through f8b4c464b4
github-actions[bot] Sep 5, 2026
41ca2f7
Merge pull request #453 from patroza/sync/upstream-f8b4c464b4
patroza Sep 5, 2026
f0d7f14
merge: sync upstream through d924fe2664
github-actions[bot] Sep 6, 2026
efe3a96
merge: include upstream through 00d6109cbb
github-actions[bot] Sep 6, 2026
e00d06c
fix(shared): copy-and-sort usage limit pools for Hermes
github-actions[bot] Sep 6, 2026
f4a9f28
fix: keep queued-send feed still and project-defaults in settings search
github-actions[bot] Sep 6, 2026
0382e76
merge: include upstream through 55333833ec
github-actions[bot] Sep 6, 2026
f8443d8
Merge pull request #454 from patroza/sync/upstream-d924fe2664
patroza Sep 6, 2026
c3cec69
merge: sync upstream through 223ff4490f (classic-merge)
github-actions[bot] Sep 6, 2026
cb4ae63
fix(web): restore sidebar VCS imports after upstream PR weld
github-actions[bot] Sep 6, 2026
7463b46
fix(server): finish typecheck after upstream PR weld
github-actions[bot] Sep 6, 2026
858e428
fix(server): include message source on getTurnStartMessage rows
github-actions[bot] Sep 6, 2026
6d98a58
fix(server): keep branch PR on projection thread rows
github-actions[bot] Sep 6, 2026
9d2d284
merge: include upstream 72cb638a8a (WSL Tux icon)
github-actions[bot] Sep 6, 2026
cc5cc42
fix(web): isolate IntegrationsSettings tests from shared workers
github-actions[bot] Sep 6, 2026
085379d
Merge pull request #456 from patroza/sync/upstream-223ff4490f
patroza Sep 6, 2026
5d34a4a
chore: disable inherited T3 Connect Release workflow (#455)
patroza Sep 7, 2026
dc92e5b
merge: sync upstream through a7028f1399 (classic-merge)
github-actions[bot] Sep 7, 2026
7d4febd
fix(mobile): read flattened pending-task fields after draft weld
github-actions[bot] Sep 7, 2026
af0959c
fix(server): weld HashMap read models after upstream thread-order tests
github-actions[bot] Sep 7, 2026
7e74b0a
fix(server): keep activeOrderKey on projection thread rows
github-actions[bot] Sep 7, 2026
39b3e47
Merge pull request #457 from patroza/sync/upstream-a7028f1399
patroza Sep 7, 2026
af79091
merge: include upstream 08c715ed93 (v0.0.39 prepare)
github-actions[bot] Sep 7, 2026
1454613
Merge pull request #458 from patroza/sync/upstream-08c715ed93
patroza Sep 7, 2026
ecbd38b
fix(server): mark restart-recovered turns running after sendTurn (#459)
patroza Sep 7, 2026
17ee43f
merge: include upstream f57d3832c0 (preview resize, composer toolbar,…
github-actions[bot] Sep 7, 2026
3283e48
fix(server): weld HashMap projects in script-id tests
github-actions[bot] Sep 7, 2026
f939570
fix(mobile): keep steered feed messages after pending-creation weld
github-actions[bot] Sep 7, 2026
4b9fb54
Merge pull request #460 from patroza/sync/upstream-f57d3832c0
patroza Sep 7, 2026
f5ab626
merge: include upstream 1d1bf50405 (mobile 1.1.0, list scroll, onboar…
github-actions[bot] Sep 7, 2026
6778182
Merge pull request #461 from patroza/sync/upstream-1d1bf50405
patroza Sep 7, 2026
167663c
Merge upstream/main (061543e9e5) into fork/dev
github-actions[bot] Sep 8, 2026
957e330
fix(scripts): skip .repos in changed-file ship-gate argv
github-actions[bot] Sep 8, 2026
588714c
fix(fork): typecheck discord-bot and vscode with tsc after TypeScript 7
github-actions[bot] Sep 8, 2026
de84ccc
fix(fork): rename remaining TaggedErrorClass to TaggedError
github-actions[bot] Sep 8, 2026
220056a
fix(web): pass project records into remaining ProjectFavicon call sites
github-actions[bot] Sep 8, 2026
fe47dfc
fix(server): weld question-attachment tests and re-export migration l…
github-actions[bot] Sep 8, 2026
98402c7
test(web): isolate SnapShot tests under isolate:false workers
github-actions[bot] Sep 8, 2026
aaf714c
test(desktop): isolate window-capture tests and match fork Exec quoting
github-actions[bot] Sep 8, 2026
5b941c0
test(desktop): isolate WindowsForegroundFocusThread mocks
github-actions[bot] Sep 8, 2026
d9b6c2c
test(web): isolate CaptureShortcutConfig react-test-renderer tests
github-actions[bot] Sep 8, 2026
91bb0d2
Merge pull request #463 from patroza/sync/upstream-061543e9e5
patroza Sep 8, 2026
63ccca5
Merge upstream/main (4664c572a7) into fork/dev
github-actions[bot] Sep 8, 2026
cf6a92d
test(mobile): keep conversation flex host under Material You
github-actions[bot] Sep 8, 2026
912b9ba
test(web): isolate incomplete useSettings mocks
github-actions[bot] Sep 8, 2026
e1375af
Merge pull request #464 from patroza/sync/upstream-4664c572a7
patroza Sep 8, 2026
cff17b0
Merge commit '12391bd0d38eef6655b7a9f8945d0cb5febadc2b' into sync/ups…
github-actions[bot] Sep 8, 2026
3b159ff
Merge pull request #465 from patroza/sync/upstream-12391bd0d3
patroza Sep 10, 2026
1aaebe3
Merge upstream/main (d29c56a5c4) into fork/dev
github-actions[bot] Sep 10, 2026
d934e61
test(client-runtime): include pullRequests on needs-attention fixtures
github-actions[bot] Sep 10, 2026
7d4c814
fix(web): restore browse coordinator and PR-shaped board fixtures
github-actions[bot] Sep 10, 2026
32cedc7
fix(server): HashMap command model for multi-PR events
github-actions[bot] Sep 10, 2026
f62baf8
test(server): account for upstream PR migration 50
github-actions[bot] Sep 10, 2026
84e1567
Merge pull request #466 from patroza/sync/upstream-d29c56a5c4
patroza Sep 10, 2026
40f8e5b
feat(server): accept owner/* in the GitHub repo allowlist (#462)
patroza Sep 11, 2026
d438c3b
Merge upstream/main (211618fd9f) into fork/dev
github-actions[bot] Sep 11, 2026
ea20717
fix(web): omit working-step label on paint-only timeline
github-actions[bot] Sep 11, 2026
bcbf677
test(mobile): keep markdown keys and folded Q&A on the requested row
github-actions[bot] Sep 11, 2026
9034230
fix(web): map folded answer-submitted activities back to Q&A cards
github-actions[bot] Sep 11, 2026
7ef45f2
fix(server): keep compact follow-ups out of queue-by-default
github-actions[bot] Sep 11, 2026
fc2c2e7
Merge pull request #467 from patroza/sync/upstream-211618fd9f
patroza Sep 11, 2026
3ba6329
docs: outline non-turn-based surface problem
omegent-app[bot] Jul 31, 2026
b849d76
docs: develop NTBS event execution proposal
omegent-app[bot] Aug 4, 2026
48aa516
chore: defined processing
enricopolanski Aug 4, 2026
9e9aa48
chore: planning of ntsb processing
enricopolanski Aug 4, 2026
606e084
chore: update ntsb planning
enricopolanski Aug 4, 2026
6831fa3
chore: planning ntsb output
enricopolanski Aug 5, 2026
0b6be79
chore: more processing
enricopolanski Aug 5, 2026
17882b7
feat: finish processing
enricopolanski Aug 5, 2026
2b57ad7
chore: kickstart architecture document
enricopolanski Aug 5, 2026
98063d8
chore: settle on generic definition
enricopolanski Aug 5, 2026
ffefad9
chore: document lifecycle
enricopolanski Aug 5, 2026
fb39498
feat: define ntbs architeture
enricopolanski Aug 5, 2026
d5bd4ec
feat: rename ntsb -> ntbs
enricopolanski Aug 5, 2026
ea77d42
fix: ntsb -> ntbs
enricopolanski Aug 5, 2026
8dfbaf2
feat: write plan
enricopolanski Aug 6, 2026
bc4ee58
feat: implement basic lifecycle types
enricopolanski Aug 7, 2026
6c6a4a7
feat: implement adapter context service
enricopolanski Aug 7, 2026
afc839c
feat: work on processor
enricopolanski Aug 7, 2026
746f676
feat: processor types
enricopolanski Aug 7, 2026
54a42f6
add inbout and outbound processor function
enricopolanski Aug 7, 2026
d3cbe6c
feat: add makeProcessor declaration
enricopolanski Aug 7, 2026
4555d27
feat: more ntbs processor work
enricopolanski Aug 7, 2026
e37ab82
feat: document ntbs processor declarations
enricopolanski Aug 7, 2026
526fb0a
fix: ntbs processor and schemas flows
enricopolanski Aug 7, 2026
258159c
fix: docs in ntbs processor
enricopolanski Aug 7, 2026
fda892f
chore: complete abstract/declaration phase
enricopolanski Aug 8, 2026
42ef27a
chore: fixes part 1
enricopolanski Aug 8, 2026
00bf4d2
feat: review removal of the requestaccepted lifecycle event
enricopolanski Aug 8, 2026
c7ee64e
chore: finish reviewing first 4 points of adversarial review
enricopolanski Aug 8, 2026
8b35eeb
chore: finalize review
enricopolanski Aug 8, 2026
3078717
feat: write adversarial review
enricopolanski Aug 9, 2026
59a0ed1
chore: document concurrency of NTBSProcessor
enricopolanski Aug 9, 2026
8751910
feat: more updates and refactors of ntbs
enricopolanski Aug 9, 2026
73d4ce5
feat: more ntbs fixes
enricopolanski Aug 9, 2026
f03925c
fix #7 of adversarial review
enricopolanski Aug 9, 2026
5a45a75
feat: add or note all fixes
enricopolanski Aug 9, 2026
027da9b
feat: start working on processor
enricopolanski Aug 9, 2026
11caae0
chore: remove adapter.accept, not really needed
enricopolanski Aug 9, 2026
46346fc
chore: continue work on processor
enricopolanski Aug 9, 2026
9b2af75
feat: processor, implement adversarial review feedback
enricopolanski Aug 10, 2026
2e06913
feat: added soft concurrency lock
enricopolanski Aug 10, 2026
9afaeb7
feat: create threadstarted in processor
enricopolanski Aug 10, 2026
83f37a7
feat: implement start t3 turn
enricopolanski Aug 10, 2026
3027573
feat: implement get progression logic
enricopolanski Aug 11, 2026
5afc3fa
chore: more work on monitor
enricopolanski Aug 11, 2026
5b11bee
docs: monitor
enricopolanski Aug 11, 2026
8861626
fix: turn and message consistency
enricopolanski Aug 11, 2026
2ce27bc
chore: retry retriable stuff
enricopolanski Aug 11, 2026
278ccdb
feat: more work on locks and interrupts
enricopolanski Aug 12, 2026
fdb468b
chore: processor v1
enricopolanski Aug 12, 2026
c156edc
feat: start processor testing
enricopolanski Aug 12, 2026
d71e0f7
chore: more processor tests
enricopolanski Aug 12, 2026
47d05d2
chore: first step of processor testing
enricopolanski Aug 13, 2026
cfa115e
chore: add deferred idea to ideas.md
enricopolanski Aug 13, 2026
1710586
feat: simplify adapter
enricopolanski Aug 13, 2026
78ee00c
chore: add new idea
enricopolanski Aug 13, 2026
c389fc9
chore: update processor to new api
enricopolanski Aug 13, 2026
b401958
feat: more work on ntbs test helpers
enricopolanski Aug 13, 2026
f0ae4a0
chore: sourceUris improvements
enricopolanski Aug 13, 2026
283a5a0
fix: typescript stuff
enricopolanski Aug 14, 2026
a87ddc5
docs: review NTBS processor refinements
enricopolanski Aug 14, 2026
38d189d
chore: claude code review
enricopolanski Aug 14, 2026
0f13394
test: note missing-turn recovery coverage
enricopolanski Aug 14, 2026
92418c6
refactor: simplify NTBS turn monitoring
enricopolanski Aug 14, 2026
0dae68e
chore: remove pointless recordedAt
enricopolanski Aug 14, 2026
f2e8fc3
feat: simplify turn status
enricopolanski Aug 14, 2026
8206e4d
chore: simplify resolveT3Outcome
enricopolanski Aug 14, 2026
8c0f3d9
chore: simplify acknowledgement
enricopolanski Aug 14, 2026
b0d49b2
chore: refactor process
enricopolanski Aug 14, 2026
30d30db
chore: implement feedback
enricopolanski Aug 15, 2026
f515364
docs: update NTBS processor review
enricopolanski Aug 15, 2026
537464a
docs: scope pull request handoff rules
enricopolanski Aug 15, 2026
ad74dd3
chore: remove all the monitoring crap
enricopolanski Aug 15, 2026
7f0c8d3
chore: refactor
enricopolanski Aug 15, 2026
c773bd2
chore: remove stale/wrong todo
enricopolanski Aug 15, 2026
236a4e0
docs(ntbs): refresh processor reviews
enricopolanski Aug 15, 2026
2168cfa
chore: renames and refactors
enricopolanski Aug 16, 2026
c7c2124
feat: continue refactoring
enricopolanski Aug 16, 2026
380aa1e
feat: refine next phases of work
enricopolanski Aug 16, 2026
6b48ecc
chore: start refactoring the ntbs state
enricopolanski Aug 16, 2026
9ecba21
chore: bump ntbs todos
enricopolanski Aug 17, 2026
9e613ed
feat: continue refactor of exchange
enricopolanski Aug 17, 2026
9db2e44
feat: implement exchange.ts
enricopolanski Aug 18, 2026
d4d8efd
feat: complete exchange refactor and its tests
enricopolanski Aug 18, 2026
da89093
feat: update exchange.ts, implement exchangerepository
enricopolanski Aug 19, 2026
2929de2
feat: update adapter and exchangerepository
enricopolanski Aug 21, 2026
14d5def
feat: update adapter
enricopolanski Aug 21, 2026
6900357
feat: t3gateway core type implementation
enricopolanski Aug 24, 2026
955cd2c
chore: update ntbs docs
enricopolanski Aug 24, 2026
6ec8502
chore: bump
enricopolanski Aug 24, 2026
ab34b89
bump
enricopolanski Aug 24, 2026
f501abd
refactor(ntbs): single adapter tag, rewrite processor docs
enricopolanski Aug 24, 2026
e1f5e0a
chore: align tags
enricopolanski Aug 24, 2026
59f9b97
chore: refactor the processor
enricopolanski Aug 24, 2026
22c10f8
update
enricopolanski Aug 24, 2026
7b6e89f
feat: start work
enricopolanski Aug 24, 2026
d900537
chore: bump processor with a lock
enricopolanski Aug 24, 2026
58d5e85
process refactor
enricopolanski Aug 24, 2026
35eaf38
chore: update tests to use baseRefSha
enricopolanski Aug 24, 2026
977a668
chore: naming clean up
enricopolanski Aug 24, 2026
967f460
chore: update processor
enricopolanski Aug 24, 2026
aea63a5
fix: type issue
enricopolanski Aug 24, 2026
8b0d9d8
feat: write processor new tests
enricopolanski Aug 24, 2026
6016456
feat: bump todo
enricopolanski Aug 25, 2026
83d6834
chore: refine t3 gateway apis
enricopolanski Aug 25, 2026
baaf649
feat: implement planCoordinates
enricopolanski Aug 25, 2026
02bd279
feat: handle edge cases in t3gateway planCoordinates
enricopolanski Aug 26, 2026
27ca20a
chore: bump tests
enricopolanski Aug 26, 2026
054dd0f
chore: updates
enricopolanski Aug 27, 2026
7221830
feat: implement first successful test of t3gateway
enricopolanski Aug 27, 2026
d846102
feat: more work on t3 tests
enricopolanski Aug 27, 2026
31785f0
chore: more invariants on t3 gateway
enricopolanski Aug 27, 2026
341d327
chore: more quality refactoring
enricopolanski Aug 27, 2026
f365ff6
feat: write remote missing tests
enricopolanski Aug 28, 2026
ad0aa08
chore: refactor errors in t3gateway
enricopolanski Aug 28, 2026
f6c399e
feat: more tests
enricopolanski Aug 28, 2026
a47d0a5
chore: fix t3 gateway tests
enricopolanski Aug 28, 2026
0c1bc78
chore: test retryable remoteExists failure
enricopolanski Aug 28, 2026
a8aeb11
feat: complete planCoordinates testing
enricopolanski Aug 28, 2026
6591d41
feat: t3gateway - test and implement getThreadStatus
enricopolanski Aug 28, 2026
fc2d7ff
fix: remove todo test
enricopolanski Aug 28, 2026
3049bb4
chore: add todo
enricopolanski Aug 28, 2026
e5126bb
chore: add docs and shit
enricopolanski Aug 29, 2026
ccc86cc
chore; partialwork
enricopolanski Aug 29, 2026
99388a7
chore: first version of provision thread
enricopolanski Aug 30, 2026
610c493
chore: add feedback
enricopolanski Aug 30, 2026
dc96456
fix: createWorkTree in provisionThread correctly passes the newly min…
enricopolanski Aug 30, 2026
65774c0
chore: provisionThread second version with ensureWorktree
enricopolanski Aug 30, 2026
e98948f
feat: refactor error handling in provisionThread
enricopolanski Aug 31, 2026
8ff4cb7
chore: provisionThread improvements
enricopolanski Aug 31, 2026
9c9f435
chore: align docs of provisionThread
enricopolanski Aug 31, 2026
26357ee
feat: bump provisionThread (v0.01.a xD)
enricopolanski Aug 31, 2026
6bdbddf
chore: minor linting stuff
enricopolanski Aug 31, 2026
f05afd5
feat: expand happy case test of provisionThread
enricopolanski Aug 31, 2026
0bebc11
feat: add second success test, provisionthread
enricopolanski Aug 31, 2026
4b6fca0
chore: update docs
enricopolanski Aug 31, 2026
d868309
chore: complete provisionThread tests
enricopolanski Aug 31, 2026
3536550
chore: minor refactor and bump to docs in t3gateway tests
enricopolanski Aug 31, 2026
1c148b6
chore: more docs bump
enricopolanski Aug 31, 2026
999b7eb
chore: outline the tests for getTurnStatus
enricopolanski Aug 31, 2026
7a83dc5
chore: getTurnStatus first implementation
enricopolanski Aug 31, 2026
ac54332
feat: write tests for getTurnStatus
enricopolanski Aug 31, 2026
13080cf
chore: define the work and update documentation around
enricopolanski Aug 31, 2026
bf2198d
feat: implement startTurn and related tests
enricopolanski Aug 31, 2026
8ec8d91
feat: implement threadActivity stream on t3gateway and related tests
enricopolanski Aug 31, 2026
0cebaf3
chore: cleanup
enricopolanski Sep 1, 2026
e69d253
feat: implement the sweeper in the processor
enricopolanski Sep 1, 2026
5d45718
feat: rename file
enricopolanski Sep 1, 2026
49e6e81
chore: write the test setup
enricopolanski Sep 1, 2026
7a1215c
feat: processor testing, completed harness and first test
enricopolanski Sep 1, 2026
3b4d7eb
feat: more tests for processor
enricopolanski Sep 1, 2026
1c0d6fb
chore: final tests
enricopolanski Sep 1, 2026
66b53f9
chore: remove old test file
enricopolanski Sep 1, 2026
af350d0
feat: address h1
enricopolanski Sep 2, 2026
e36dbe6
feat: rewrite todos for request accepted flow
enricopolanski Sep 2, 2026
43b88f6
feat: bump
enricopolanski Sep 2, 2026
5072fd8
feat: implement timestamps in exchanges
enricopolanski Sep 3, 2026
b7fab00
feat: reject exchange when project or server model and provider are u…
enricopolanski Sep 14, 2026
7fe6e27
chore: cleanup docs/planning
enricopolanski Sep 14, 2026
d89aabe
chore: drop manual resolution of worktreepath
enricopolanski Sep 14, 2026
18101f8
feat: clean up directories.md
enricopolanski Sep 14, 2026
8d24913
chore: cleanup
enricopolanski Sep 14, 2026
97d2f4c
chore: review fake retryable errors into failable
enricopolanski Sep 14, 2026
817d6e5
feat: address review concerns
enricopolanski Sep 15, 2026
89dc2a6
chore: trim review/todos. we cant fix setup script runner
enricopolanski Sep 15, 2026
5ba58ce
fix: cleanup if thread provisioning fails
enricopolanski Sep 15, 2026
51f9f9e
chore: write tests for H5
enricopolanski Sep 16, 2026
bf5d4a2
fix: solve h5
enricopolanski Sep 16, 2026
e4735d4
chore: address m1 and l1
enricopolanski Sep 16, 2026
cda823a
chore: address medium issues in review
enricopolanski Sep 16, 2026
af5f12d
fix: l2
enricopolanski Sep 16, 2026
6d13c9e
chore: solve l3
enricopolanski Sep 16, 2026
391b598
chore: handle l4
enricopolanski Sep 16, 2026
6ee05f0
chore: update review file and todos
enricopolanski Sep 16, 2026
8a9012c
chore: race sweep with activity test
enricopolanski Sep 16, 2026
83e47cf
chore: more review
enricopolanski Sep 16, 2026
645f93c
chore: more tests
enricopolanski Sep 16, 2026
e127cd1
chore: tests
enricopolanski Sep 16, 2026
834b19e
chore: complete review
enricopolanski Sep 16, 2026
e1b37f3
chore: docs - document linear adapter
enricopolanski Sep 17, 2026
91c92ac
fix(server): allow bare repositories in git workflow checks
enricopolanski Sep 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 17 additions & 0 deletions .agents/skills/test-t3-app/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,23 @@ Shared browser dev is single-origin: Vite proxies the backend paths, so never se

The dev runner disables browser auto-open by default. Do not pass `--browser` during automated testing: an automatically opened page can consume the one-time bootstrap token before the controlled browser uses it.

### Previewing the dev server from a remote client

When T3 itself is being driven from another machine — the app connected to this environment over a
tailnet or LAN address rather than `localhost` — a dev server bound to loopback is not reachable at
that address just because the hostname is. Opening it does **not** require `--share`: the
environment resolves the port on demand, reusing an existing `tailscale serve` route, using the
environment's own address when the port already answers there, and otherwise publishing a
tailnet-only HTTPS route for the port and withdrawing it when the dev server exits.

Give the preview a `localhost:<port>` URL and let it resolve. Never hand-write the environment's
hostname with the dev port appended — that is the shape that fails, because nothing promises the
dev port is published under the same number or scheme.

If the port cannot be made reachable, the preview reports why and what to do (dev server not
running, tailscale not logged in, no permission to manage routes, tailnet port already taken).
Treat that message as the result; do not retry the same URL.

### Verify a shared environment before human handoff

When another person will use the printed pairing URL, first open the shared origin without the pairing path or fragment in the controlled browser and confirm the T3 Code app loads. This browser navigation is required even when curl succeeds because browsers block some otherwise reachable ports before making a network request.
Expand Down
2 changes: 1 addition & 1 deletion .agents/skills/test-t3-mobile/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Use these client origins:
- Android Emulator: `http://10.0.2.2:<server-port>`
- Physical device: bind the backend to `0.0.0.0` and use the host's reachable LAN origin

Enter the complete `http://` origin to make the test transport explicit. Bare IP addresses default to HTTP, while bare hostnames default to HTTPS. When testing web and mobile together, run `vp run dev --home-dir <base-dir> --host 127.0.0.1` instead and do not launch a second backend over the same base directory.
Always enter the complete `http://` origin; the mobile host field otherwise assumes HTTPS. When testing web and mobile together, run `vp run dev --home-dir <base-dir> --host 127.0.0.1` instead and do not launch a second backend over the same base directory.

## Start or reuse Metro safely

Expand Down
56 changes: 56 additions & 0 deletions .easignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Keep EAS project archives small. Mobile only needs the monorepo packages it
# resolves through pnpm — not vendored agent reference trees or desktop shells.

# Vendored reference repos (agents only; never imported by app code)
.repos/

# Desktop / electron / native host tooling
apps/desktop/
apps/vscode/
apps/discord-bot/
/native/
release/
release-mock/
dist-electron/
.electron-runtime/

# Infra, docs, agent metadata
docs/
.agents/
.grok/
.github/
.claude/
.cursor/
.vscode/
infra/
artifacts/
.showcase/
apps/mobile/.showcase/

# Tests and snapshots (not needed for EAS bundle)
**/__screenshots__/
**/*.test.ts
**/*.test.tsx
**/*.spec.ts
**/*.spec.tsx
**/test-results/
**/playwright-report/
**/.vitest-*/

# Local / generated
node_modules/
.t3/
.turbo/
.alchemy/
.dir-deploy-n
.logs/
*.log
.DS_Store
.env
.env.*
!.env.example

# Git / IDE noise
.git/
.idea/
*.tsbuildinfo
21 changes: 21 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ T3CODE_CLERK_CLI_OAUTH_CLIENT_ID=hzxSgY2cH10sDU2r
# automatically.
T3CODE_RELAY_URL=https://relay.t3.codes

# Optional: GitHub App bridge for continuing an existing worktree-backed T3 thread
# from a pull-request comment. See docs/integrations/github-app-setup.md.
# The webhook route stays disabled unless all four required values are set.
# T3CODE_GITHUB_APP_ID=123456
# T3CODE_GITHUB_APP_PRIVATE_KEY_PATH=/absolute/path/to/private-key.pem
# T3CODE_GITHUB_WEBHOOK_SECRET=replace-with-a-random-secret
# T3CODE_GITHUB_APP_MENTION=t3-code-dev
# T3CODE_GITHUB_ALLOWED_REPOSITORIES=patroza/*,macs-holding/*,effect-app/*
# T3CODE_GITHUB_MIN_PERMISSION=write
# T3CODE_GITHUB_TURN_TIMEOUT_MS=1800000

# Optional: hosted app origin used by the CLI's out-of-band OAuth flow.
# Defaults to https://app.t3.codes; override to test against a staging deployment.
# T3CODE_HOSTED_APP_URL=https://nightly.app.t3.codes
Expand All @@ -29,3 +40,13 @@ T3CODE_RELAY_URL=https://relay.t3.codes
# T3CODE_MOBILE_OTLP_TRACES_URL=https://api.axiom.co/v1/traces
# T3CODE_MOBILE_OTLP_TRACES_DATASET=t3-code-mobile-traces-dev
# T3CODE_MOBILE_OTLP_TRACES_TOKEN=xaat-...

# Optional: sign and publish the mobile app from your own Expo and Apple teams.
# Development and preview builds append .dev and .preview to the bundle identifier.
# T3CODE_MOBILE_IOS_TEAM_ID=ABC1234567
# T3CODE_MOBILE_IOS_BUNDLE_IDENTIFIER=com.example.t3code
# Set to 1 only for free Xcode Personal Team builds. This disables paid-only
# widgets, push capabilities, App Groups, associated domains, and EAS updates.
# T3CODE_MOBILE_IOS_PERSONAL_TEAM=1
# T3CODE_MOBILE_EAS_PROJECT_ID=00000000-0000-0000-0000-000000000000
# T3CODE_MOBILE_EXPO_OWNER=your-expo-username
9 changes: 9 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Prefer the repo gh policy shim so coding agents cannot undraft with raw
# `gh pr ready` (use `pnpm pr:ready`). Installed by scripts/install-git-hooks.mjs.
PATH_add .tools/bin

# Default bare `gh` commands to the fork, not gh's upstream-parent default
# (`pingdotgg/t3code`). Without this, `gh pr view`/`create`/`checks` resolve
# against upstream and miss the fork's PRs. Explicit `--repo` always overrides,
# so the stack tooling (which always passes `--repo`) is unaffected.
export GH_REPO="${T3CODE_FORK_REPOSITORY:-patroza/t3code}"
49 changes: 49 additions & 0 deletions .githooks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Native Git hooks

`pnpm install` configures `core.hooksPath=.githooks`. The tracked hooks exist
immediately in every linked worktree; `post-checkout` reconciles dependencies
after branch checkout and worktree creation before Git returns. T3 configures
the hook path and triggers that checkout once for a fresh clone, before exposing
the repository to the user.

## `post-checkout`

### 1. Clear TypeScript project emit (always on branch / worktree checkout)

Composite packages and build outputs leave gitignored `dist/` and
`*.tsbuildinfo`. After a branch switch those artifacts can still belong to
another tree while sources follow HEAD. That produces phantom type errors (or
stale emit consumers) that disappear after a clean rebuild — same class of
failure as [scanner#1495](https://github.com/macs-holding/scanner/pull/1495) /
[scanner#2166](https://github.com/macs-holding/scanner/pull/2166) and upstream
typescript-go incremental gaps.

On every **branch** checkout (flag `1`), this hook deletes:

- `apps/*/dist` **except** `apps/server/dist` (live-served SPA + `bin.mjs`; wiping
it 503s any process still serving from this checkout), `apps/*/dist-electron`,
`packages/*/dist`
- any remaining `*.tsbuildinfo` outside `node_modules` / `.git` / `.vite-plus`

File-only checkouts (flag `0`) are left alone.

**This is a workaround.** Remove when TypeScript/tsgo incremental invalidation
is reliable ([typescript-go#2666](https://github.com/microsoft/typescript-go/issues/2666),
[#4664](https://github.com/microsoft/typescript-go/issues/4664),
[#4262](https://github.com/microsoft/typescript-go/issues/4262)). Do not
re-enable cross-tree dist reuse without an exact source-identity key.

### 2. Seed copy + pnpm install

Successful reconciliation records the package/lockfile state under
`node_modules`, so T3's explicit handoff invocation does not repeat an install
which Git already completed. Explicit invocation from the target is required
for bare or stale source repositories.

When T3 will launch a configured worktree setup script, its VCS driver sets
`T3CODE_DEFER_DEPENDENCY_INSTALL=1`. The hook still clears stale emit and copies
seed files, but skips `pnpm install` so setup can perform it asynchronously in
the thread terminal. Raw Git worktree creation does not set this marker and
continues to return with dependencies prepared.

Lefthook may later orchestrate parallel jobs, but is intentionally unused now.
177 changes: 177 additions & 0 deletions .githooks/post-checkout
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
#!/bin/sh
# Reconcile packages after branch checkout and prepare linked git worktrees.
#
# Canonical hook: scripts/install-git-hooks.mjs installs this into the shared
# hooks dir (core.hooksPath) on EVERY host via `pnpm install`, so a raw
# `git worktree add` sets up node_modules identically on smart and the t3vm
# guest -- not only when a worktree is created through the T3 app / t3.json.
#
# Strategy (metadata-safe):
# 1. Drop TypeScript project emit (dist / tsbuildinfo) so composite/incremental
# builds never typecheck against foreign-tree .d.ts after a branch switch.
# 2. Copy *small* gitignored seeds from .worktreeinclude (CLAUDE.md, .nuxt, …)
# via reflink/hardlink when available. NEVER clone node_modules -- that
# creates millions of inodes per worktree on btrfs.
# 3. Populate node_modules with `pnpm install --frozen-lockfile --prefer-offline`
# against the shared store (hardlinks -> one inode per package file).
#
# Idempotent: never overwrites existing seed paths; pnpm is safe to re-run.

# Host-agnostic: pick up pnpm/mise from the invoking user's home on either host.
PATH="$HOME/.local/bin:$HOME/.local/share/pnpm:$HOME/.local/share/mise/shims:/run/current-system/sw/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:$PATH"
export PATH

# post-checkout also runs after file-only checkouts; those do not change packages.
[ "${3:-0}" = "1" ] || exit 0

main_wt=$(git worktree list --porcelain | sed -n '1s/^worktree //p')
wt_root=$(git rev-parse --show-toplevel 2>/dev/null)
[ -n "$wt_root" ] || exit 0

# --- TS build-cache wipe (every branch / worktree checkout) -----------------
#
# Composite/incremental emit (and leftover dist from builds) can outlive a
# branch switch. Foreign .tsbuildinfo / .d.ts produce phantom type errors that
# vanish after clean rebuild — same class as macs-holding/scanner#1495 / #2166
# and typescript-go incremental gaps (#2666, #4664, #4262).
# Workaround until upstream invalidation is solid; see .githooks/README.md.
#
clean_ts_project_emit() {
root=$1
removed=0

for d in \
"$root"/apps/*/dist \
"$root"/apps/*/dist-electron \
"$root"/packages/*/dist
do
[ -e "$d" ] || continue
# Deploy clones (and any long-running `t3 serve` from this checkout) read
# apps/server/dist/client from disk per request. Wiping that tree on every
# `git switch` immediately 503s the UI with "Web assets unavailable" until
# something rebuilds it — including Discord-only deploys that never rebuild
# the server. packages/*/dist + tsbuildinfo still clear below for the
# incremental-cache workaround.
case "$d" in
*/apps/server/dist) continue ;;
esac
rm -rf "$d"
removed=1
done

if [ -d "$root" ]; then
# Prune by basename so nested apps/*/node_modules are skipped too.
tsbuild_files=$(
find "$root" \
\( -name node_modules -o -name .git -o -name .vite-plus \) -prune -o \
-type f -name '*.tsbuildinfo' -print 2>/dev/null || true
)
if [ -n "$tsbuild_files" ]; then
printf '%s\n' "$tsbuild_files" | while IFS= read -r f; do
[ -n "$f" ] || continue
rm -f "$f"
done
removed=1
fi
fi

if [ "$removed" = 1 ]; then
echo "post-checkout: cleared TypeScript project emit (dist / tsbuildinfo) under $root" >&2
echo "post-checkout: workaround for tsgo/tsc stale incremental cache after tree switch — see .githooks/README.md (remove when upstream fixed)" >&2
fi
}

clean_ts_project_emit "$wt_root"

if [ -n "$main_wt" ] && [ "$main_wt" != "$wt_root" ]; then
# Effective include: repo .worktreeinclude if present, else nothing to seed-copy.
include=""
if [ -f "$main_wt/.worktreeinclude" ]; then
include="$main_wt/.worktreeinclude"
fi

# Probe once: reflink (CoW fs) > hard link (same fs) > plain copy (cross-device).
probe="$main_wt/.git-hook-clone-probe.$$"
probe_dst="$wt_root/.clone-probe.$$"
: >"$probe"
if cp --reflink=always "$probe" "$probe_dst" 2>/dev/null; then
clone() { cp -a --reflink=always "$1" "$2"; }
elif ln "$probe" "$probe_dst" 2>/dev/null; then
clone() { cp -al "$1" "$2"; }
else
clone() { cp -a "$1" "$2"; }
fi
rm -f "$probe" "$probe_dst"

# True if path is node_modules or under one (never clone these).
is_node_modules_path() {
case "/$1/" in
*/node_modules/*) return 0 ;;
*) return 1 ;;
esac
}

if [ -n "$include" ] && [ -f "$include" ]; then
git -C "$main_wt" ls-files --others --ignored --exclude-from="$include" --directory |
while IFS= read -r rel; do
rel=${rel%/}
[ -n "$rel" ] || continue
is_node_modules_path "$rel" && continue
src="$main_wt/$rel"
dst="$wt_root/$rel"
[ -e "$dst" ] && continue
[ -e "$src" ] || continue
mkdir -p "$(dirname "$dst")"
if [ -d "$src" ]; then
clone "$src" "$dst"
else
cp "$src" "$dst"
fi
done
fi
fi

# T3 can hand dependency installation to its asynchronous worktree setup
# terminal. Keep the metadata cleanup and seed copy above synchronous so the
# checkout is structurally ready, but let the UI become responsive before a
# potentially slow package install finishes.
if [ "${T3CODE_DEFER_DEPENDENCY_INSTALL:-0}" = "1" ]; then
echo "post-checkout: dependency installation deferred to T3 workspace initialization" >&2
exit 0
fi

# Shared-store hardlink install: fast when the store is warm, no inode clone storm.
[ -f "$wt_root/package.json" ] || exit 0
[ -f "$wt_root/pnpm-lock.yaml" ] || {
echo "post-checkout: package.json without pnpm-lock.yaml; skip install" >&2
exit 0
}
state_file="$wt_root/node_modules/.pnpm-checkout-state"
state=$(cksum "$wt_root/package.json" "$wt_root/pnpm-lock.yaml" | cksum | awk '{print $1 ":" $2}')
if [ -f "$wt_root/node_modules/.modules.yaml" ] && [ "$(cat "$state_file" 2>/dev/null)" = "$state" ]; then
exit 0
fi
command -v pnpm >/dev/null 2>&1 || {
echo "post-checkout: pnpm not on PATH; node_modules not installed" >&2
exit 0
}

export CI=1
echo "post-checkout: pnpm install (hardlink from store) in $wt_root" >&2
cd "$wt_root" || exit 1
if pnpm install \
--frozen-lockfile \
--prefer-offline \
--config.package-import-method=hardlink \
--config.confirmModulesPurge=false
then
printf '%s\n' "$state" >"$state_file"
else
status=$?
echo "post-checkout: dependency preparation failed (exit $status); worktree remains usable but degraded" >&2
echo "post-checkout: fix the lockfile/configuration or rerun this hook after transient failures clear" >&2
# Native Git invokes this hook inside `git worktree add`; dependency setup
# must not turn an already-created worktree into a structural Git failure.
[ "${T3CODE_WORKTREE_PREPARATION_STRICT:-0}" = "1" ] && exit "$status"
exit 0
fi
8 changes: 8 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
root=$(git rev-parse --show-toplevel 2>/dev/null) || exit 1
if [ ! -x "$root/node_modules/.bin/lint-staged" ]; then
echo "pre-commit: worktree preparation is incomplete (lint-staged is missing)" >&2
echo "pre-commit: T3/manual checkout must finish post-checkout before commit" >&2
exit 1
fi
exec pnpm lint-staged
16 changes: 16 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Agent-only ship gate (humans: no-op). See scripts/agent-pre-push.mjs.
# Draft / no PR: static gate (vp check + typecheck). Ready PR: + unit tests.
# Publish: pnpm pr:ready, or raw `gh pr ready` — the shim runs the same full gate first.
#
# Humans: SKIP_AGENT_PREPUSH=1 git push
# Agents: never SKIP_AGENT_PREPUSH / never --no-verify
# Nested Git commands must discover their own repositories, not inherit this
# hook's GIT_DIR/GIT_WORK_TREE from the outer push.
for name in $(git rev-parse --local-env-vars); do
unset "$name"
done
# Plain `node`, not `pnpm exec node`: pnpm runs a dependency-status check first
# and will try to purge node_modules when the lockfile moved (a rebase does it),
# which aborts without a TTY — the hook then fails with a pnpm error instead of
# anything about the gate. The gate puts node_modules/.bin on PATH itself.
node scripts/agent-pre-push.mjs
Loading
Loading