Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
7778a1c
Use rounded depth logo for production splash screen (#3780)
juliusmarminge Jul 7, 2026
03ac1f0
fix(release): stage pnpm 11 allowBuilds for desktop installs (#3781)
juliusmarminge Jul 7, 2026
e775bc6
Upgrade Clerk toolchain to latest versions (#3785)
juliusmarminge Jul 8, 2026
0c66565
fix(release): bump electron-builder so pnpm 11 deduped deps land in t…
avocardow Jul 8, 2026
18a4138
Fix desktop native optional dependency packaging (#3816)
Prgm-code Jul 9, 2026
e912765
[codex] Upgrade Clerk stack (#3821)
juliusmarminge Jul 9, 2026
3201e00
[codex] Preserve worktree metadata during branch sync (#3822)
juliusmarminge Jul 9, 2026
2250e3e
feat(client): persist offline environment data and mobile preferences…
juliusmarminge Jul 9, 2026
ca1e08b
[codex] Label max and ultra reasoning (#3824)
juliusmarminge Jul 9, 2026
843cf17
fix(mobile): embed fonts and render project favicons reliably (#3823)
juliusmarminge Jul 9, 2026
8619ef2
Show compact PR number badges in mobile thread rows (#3827)
juliusmarminge Jul 9, 2026
f61fa94
Expose mobile PR indicator labels to accessibility (#3828)
juliusmarminge Jul 9, 2026
ef943a2
Fix truncated chat error alert layout (#3899)
jakeleventhal Jul 12, 2026
619b0ec
fix(marketing): show platform-appropriate commit shortcut on the webs…
VedankPurohit Jul 12, 2026
c1ec191
[codex] Add Android mobile support (#3579)
juliusmarminge Jul 12, 2026
8de254a
Use client-side fallbacks for missing project favicons (#3959)
juliusmarminge Jul 14, 2026
735240f
Skip stale working-task notifications (#3961)
juliusmarminge Jul 14, 2026
3513fa0
Prepare Android beta branding and review diff UI (#3967)
juliusmarminge Jul 14, 2026
2fdc704
perf(web): duty-cycle status animations and remove fixed noise overla…
t3dotgg Jul 15, 2026
7b928d5
fix(docs): correct CI task-runner commands in ci.md (#3990)
kridaydave Jul 15, 2026
c69120f
fix(docs): repair broken source links in architecture overview (#3991)
kridaydave Jul 15, 2026
4624426
fix(docs): replace stale codething-mvp absolute paths with repo-relat…
kridaydave Jul 15, 2026
d359789
docs: Add T3 Code Legal Docs (#3972)
juliusmarminge Jul 15, 2026
ecb35f7
Fix Legal modal header crash (#4000)
juliusmarminge Jul 15, 2026
b982337
[codex] Fix onboarding connection status (#4001)
juliusmarminge Jul 16, 2026
5e8b2c8
Isolate native diff highlight grammar state (#4029)
juliusmarminge Jul 16, 2026
0418301
Fix macOS fullscreen titlebar spacing (#4019)
D3OXY Jul 16, 2026
d114e27
Prevent duplicate project workspace roots (#3829)
juliusmarminge Jul 16, 2026
54f167e
Normalize over-indented markdown list items (#4020)
juliusmarminge Jul 16, 2026
bde0a4c
Resolve localhost preview URLs for remote environments (#4011)
juliusmarminge Jul 16, 2026
2a33a18
fix(mobile): Send composer images in upload wire format (#4035)
juliusmarminge Jul 16, 2026
5d68fca
Fix iOS terminal Enter input encoding (#4043)
juliusmarminge Jul 16, 2026
fdca154
Add native mobile share target support (#4021)
juliusmarminge Jul 16, 2026
8a02c71
[codex] Expand real-route app store screenshot harness (#4014)
juliusmarminge Jul 17, 2026
eb733c1
fix(server): use CLAUDE_CONFIG_DIR instead of HOME for Claude instanc…
dmstoykov Jul 17, 2026
c14a5ca
Fix dropped events during initial thread snapshot (#4079)
D3OXY Jul 17, 2026
1f27973
feat: show nightly update changelog tooltip (#3832)
HugoVizcainoSantana Jul 17, 2026
58302b2
fix(git): treat selected commit paths literally (#3998)
EricTsai83 Jul 17, 2026
8b54698
fix(server): stabilize non-repository Git diagnostics (#4077)
EricTsai83 Jul 17, 2026
6e9987c
Refresh app icons across release variants (#4080)
juliusmarminge Jul 17, 2026
0748134
Update marketing GitHub star count (#4088)
AmoonPod Jul 17, 2026
4804a98
fix(marketing): correct Cursor icon color (#4090)
AmoonPod Jul 17, 2026
c49d424
Normalize protocol-relative remote host input as https (#3971)
kridaydave Jul 17, 2026
7f1cb61
fix(cursor): default binary path to cursor-agent (avoid path conflict…
BunnyGamezsc Jul 17, 2026
f9a4f59
Fix documented task-runner commands (bun run -> vp) (#3965)
kridaydave Jul 17, 2026
a7f6d97
Allow preview panel to grow on wide displays (#4044)
olivoil Jul 17, 2026
e057e2e
fix: prevent initial right-click from selecting a context menu item (…
Fazalkadivar21 Jul 17, 2026
7dc7512
Fix duplicate keybinding rule when replacing with an existing rule (#…
kridaydave Jul 17, 2026
ed81c15
fix(server): image upload crashed dispatchCommand with a stack overfl…
t3dotgg Jul 17, 2026
b49a2e6
Remove unused code parameter from describePreviewError (#3970)
kridaydave Jul 17, 2026
bcd640b
[codex] prevent ACP assistant ID collisions after restarts (#3932)
maxwellyoung Jul 17, 2026
7b8d126
fix(web): inset Windows desktop scrollbars from resize edge (#4097)
nateEc Jul 17, 2026
6a17629
[codex] fix mobile composer Enter behavior (#3930)
maxwellyoung Jul 17, 2026
cf58cad
feat(server): include runtime model and effort in Codex developer ins…
t3dotgg Jul 17, 2026
143b9c9
fix(ux): spamming cmd + , no longer stack opening settings (#2757)
jamesx0416 Jul 17, 2026
1047dac
fix(terminal): strip AppImage runtime env from spawned terminals (#3108)
leorivastech Jul 17, 2026
4e3f2f0
fix(server): thread cwd through Claude capability probe (#2048) (#2124)
mvanhorn Jul 17, 2026
b655a9f
[codex] fix: guard invalid web timestamps (#3515)
StiensWout Jul 17, 2026
43e2aea
[codex] fix: tolerate invalid latest user message timestamps (#3521)
StiensWout Jul 17, 2026
73bf127
[codex] Fix provider update checks restore defaults (#3531)
StiensWout Jul 17, 2026
31ca9e5
fix(server): skip undecodable provider runtime rows when listing sess…
t3dotgg Jul 17, 2026
24f9c2a
Share MCP OAuth locks across Codex shadow homes (#4104)
juliusmarminge Jul 17, 2026
8b33799
Preserve T3 Code identity in macOS development launcher (#4102)
juliusmarminge Jul 17, 2026
5ca3266
fix(web): increase contrast of question option descriptions (#3867)
xxashxx-svg Jul 17, 2026
1bd2fa2
feat: draft hero landing on the index route (#4055)
yordis Jul 18, 2026
4cfec8c
feat: file explorer mention actions and zoom-aware context menus (#4054)
yordis Jul 18, 2026
2318e00
fix(web): avoid duplicate mention text on paste
juliusmarminge Jul 18, 2026
03e20c8
fix(mobile): restore iOS home screen branding (#4025)
PixPMusic Jul 18, 2026
765e1b5
perf(client): defer active thread cache writes (#4006)
Chrrxs Jul 18, 2026
38e0bb0
Default diffs to working changes (#3974)
jakeleventhal Jul 18, 2026
e350c0a
Add Grok to marketing site provider list (#3484)
Aditya190803 Jul 18, 2026
31caa56
Fix reopening existing Diff tab (#3973)
jakeleventhal Jul 18, 2026
d8b12ae
Fix sending messages during active turns (#3919)
jakeleventhal Jul 18, 2026
d0b9f8d
[codex] Route OpenCode missing-session errors through Effect (#3608)
StiensWout Jul 18, 2026
c0e161a
[fix/feat:ui] Show default option badge (#3232)
sandersonstabo Jul 18, 2026
e63403f
[fix/feat:ui] Preserve open-in editor brand colors (#3225)
sandersonstabo Jul 18, 2026
b859a57
fix(web): handle macOS Home and End in composer (#2508)
GuilhermeVieiraDev Jul 18, 2026
0506508
Allow failed remote environments to be removed (#4084)
zepi2509 Jul 18, 2026
da3c203
[codex] canonicalize client timestamps (#4112)
maxwellyoung Jul 18, 2026
5c66110
[fix/feat:ui] Make selected menu checks blue (#3234)
sandersonstabo Jul 18, 2026
bf76535
fix(desktop): Validate WSL node version against engine range after pr…
UtkarshUsername Jul 18, 2026
ebe8afb
Refresh splash screen and favicon branding (#4120)
juliusmarminge Jul 18, 2026
1735e27
Add terminal selection copy action (#2904)
tarik02 Jul 18, 2026
4f11740
Add isolated app testing workflow (#4121)
juliusmarminge Jul 19, 2026
53e3c98
feat(web): themed sidebar header art for nightly and dev builds (#4130)
maria-rcks Jul 19, 2026
7a820ab
feat: add headless `t3 connect` setup for SSH hosts (#3749)
t3dotgg Jul 19, 2026
2b180a2
Refine T3 Connect authorization surfaces (#4159)
juliusmarminge Jul 19, 2026
398140a
fix: increase OpenCode server startup timeout from 5s to 30s (#4132)
UtkarshUsername Jul 19, 2026
e8ff6bc
fix(shared): delete unused agentAwareness phase predicates (#4134)
kridaydave Jul 19, 2026
271454c
fix(mobile): Stabilize native stack option updates (#4037)
juliusmarminge Jul 19, 2026
69c8be2
Make test-t3-app skill discoverable by Claude Code (#4162)
juliusmarminge Jul 19, 2026
b511227
fix(web): improve dev sidebar backdrop contrast & remove version pill…
maria-rcks Jul 19, 2026
7e1a0d5
Fix draft banner stack overlap (#4164)
juliusmarminge Jul 19, 2026
e34250d
Add portable mobile app testing guidance (#4165)
juliusmarminge Jul 19, 2026
2640e6d
fix(client): use lightweight connection probe (#4137)
eeinarsson Jul 19, 2026
3795dbb
fix(server): resolve Claude SDK executable path on Windows npm instal…
nsxdavid Jul 20, 2026
63b6b44
Fix project action preview settings persistence (#3842)
keeperxy Jul 20, 2026
78485e6
fix(desktop): allow clipboard writes in the preview browser (#3889)
carlosricojr Jul 20, 2026
dfbda84
fix(web): handle sidebar shortcut before editors (#3921)
Bortlesboat Jul 20, 2026
68ea280
fix(server): recognize Bedrock-backed Claude as authenticated (#3931)
PieterVanZyl-Dev Jul 20, 2026
d7baa37
Fix incorrect pluralization of “entry” (#3933)
McMelonTV Jul 20, 2026
749baec
feat(server): title background-task work-log rows with the task name …
t3dotgg Jul 20, 2026
3235658
fix: delegate OpenCode session titles to provider (#3720)
tris203 Jul 20, 2026
df65a6c
Archive selected threads from the context menu (#3895)
theduke Jul 20, 2026
5fcfe24
fix(cli): support force removing projects (#3922)
Bortlesboat Jul 20, 2026
d266c06
fix: allow sidebar to be shrunk when wider than viewport (#2456)
shoaib050326 Jul 20, 2026
33f1cb4
fix(codex): show web search query and url in tool call details (#2093)
GuilhermeVieiraDev Jul 20, 2026
40c0ab0
Add Codex launch arguments setting (#2892)
jamesx0416 Jul 20, 2026
501ce27
[orchestration] Clear stale active turn when session becomes inactive…
Andrew-Forster Jul 20, 2026
08993a5
Regenerate Codex reset credit protocol bindings (#4173)
juliusmarminge Jul 20, 2026
2fae0d0
fix(preview): preserve direct localhost navigation (#3939)
Chrrxs Jul 20, 2026
8e3467f
Synchronize mobile threads with authoritative shell snapshots (#4163)
juliusmarminge Jul 20, 2026
b6d9ce3
Gate iOS glass layout on native support (#4032)
juliusmarminge Jul 20, 2026
f4da4f3
fix(opencode): resume the OpenCode session on follow-ups instead of s…
vdmkotai Jul 20, 2026
0ca3240
fix(server): use CLI for OpenCode health check instead of spawning se…
UtkarshUsername Jul 20, 2026
946b867
fix(web): scope timeline minimap hover target to the side gutter (#3869)
xxashxx-svg Jul 20, 2026
a135f2c
[codex] show complete approval details (#4111)
maxwellyoung Jul 20, 2026
c710167
fix(web): paint text selection over composer chips (#4139)
yordis Jul 20, 2026
fa69f05
[codex] preserve custom model slugs (#4168)
maxwellyoung Jul 20, 2026
0936fd2
fix(web): preview workspace images in the file panel (#3996)
Rhiz3K Jul 20, 2026
8ca4eec
feat(web): drag files from the explorer into the chat composer (#4140)
yordis Jul 20, 2026
2c199aa
fix(desktop): preserve main window bounds (#3851)
anirudhsama Jul 20, 2026
db4b2d8
perf(orchestration): speed up new-chat propagation and offline catch-…
RusiruSadathana Jul 20, 2026
c8a04bd
Finale: upgrade changed files card to fix various UI issues (#4113)
sandersonstabo Jul 20, 2026
5d34f9f
Pass CLI OAuth config to hosted web deploy (#4186)
juliusmarminge Jul 20, 2026
c0bb237
fix(web): always show environment chip for remote projects (#4217)
t3dotgg Jul 21, 2026
23c18fd
fix(web): keep composer editable while disconnected (#4241)
t3dotgg Jul 21, 2026
62cf461
fix: better defaults — Claude 1M context, Codex gpt-5.6, worktrees fr…
t3dotgg Jul 22, 2026
6f34ad3
fix(claude): handle all SDK stream messages; stop spurious work-log w…
t3dotgg Jul 22, 2026
d963ff7
merge: upstream through 6f34ad3e8 (2026-07-21) — pre-Sidebar-v2 cut
DanielGGordon Jul 23, 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
  •  
  •  
  •  
21 changes: 21 additions & 0 deletions .agents/skills/ios-debugger-agent/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) OpenAI

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
64 changes: 64 additions & 0 deletions .agents/skills/ios-debugger-agent/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
name: ios-debugger-agent
description: Build, launch, inspect, and drive iOS apps with the repository-configured XcodeBuildMCP server. Use on macOS for iOS Simulator builds, focused native test runs, semantic UI automation, screenshots, logs, or debugging, including T3 Code Mobile verification.
---

# iOS Debugger Agent

Use the repository-configured `xcodebuildmcp` tools instead of requiring a globally installed Codex plugin. Prefer MCP tools over raw `xcodebuild`, `xcrun`, or `simctl` when the client exposes them.

## Confirm availability

This workflow requires macOS 14.5 or newer, Xcode 16 or newer, and Node.js 18 or newer. The repository pins XcodeBuildMCP in both `.mcp.json` for Claude Code and `.codex/config.toml` for Codex. Project MCP servers may require one-time trust or approval followed by a new session.

If the tools are missing:

1. Confirm the repository is trusted and its project MCP server was approved.
2. Restart or recreate the agent session after approving configuration.
3. Run `npx --yes xcodebuildmcp@2.6.2 doctor` when the server starts but simulator or UI-automation tools are unavailable. Follow its actionable Xcode or AXe setup guidance.
4. Fall back to the pinned XcodeBuildMCP CLI or native Apple CLIs only when the current agent client cannot expose project MCP tools.

Do not ask contributors to install the OpenAI `build-ios-apps` plugin globally.

## Establish one simulator context

1. Call `session_show_defaults` before discovery, build, launch, or UI work.
2. Call `list_sims` and select one explicit simulator UDID. Prefer a simulator that is already booted; boot an installed simulator when verification requires it, but do not create or download runtimes without user authorization.
3. Call `session_set_defaults` with the project or workspace, scheme, Debug configuration, simulator ID, and bundle identifier when known.
4. Keep every subsequent build, launch, screenshot, log capture, and UI action pinned to that same UDID.

Avoid generic Mac window automation for switching among Simulator windows. Explicit device identity is more reliable.

## Choose build or launch

- Use `build_run_sim` when native source, native dependencies, entitlements, or project configuration changed.
- Use `test_sim` for the smallest relevant native test target or test cases; do not run an entire workspace test matrix routinely.
- Use `launch_app_sim` when a compatible app is already installed and no native rebuild is needed.
- To reuse an existing build artifact, use `get_sim_app_path` or `get_app_bundle_id`, install it with `install_app_sim` when necessary, and then launch it.
- Do not run a build-only action immediately before `build_run_sim` unless the task requires both artifacts.

After launch, call `snapshot_ui` or `screenshot` before interacting. An open Simulator window alone is not evidence that the intended app launched.

## Drive the UI semantically

1. Call `snapshot_ui` to obtain the current accessibility hierarchy and element references.
2. Use only current `elementRef` values whose snapshot entries list the intended action. XcodeBuildMCP `2.6.2` does not accept coordinates for `tap`; when the app exposes no actionable reference, prefer a registered deep link or another app-supported route and otherwise report the accessibility blocker.
3. Refresh with `snapshot_ui` after navigation or layout changes. Element references are snapshot-specific.
4. Use `wait_for_ui` for asynchronous transitions when available rather than fixed sleeps.
5. Capture a final `screenshot` for the state that proves the affected flow.

Use `gesture` or scoped swipe actions when needed. If a gesture is unreliable, return to a known route or relaunch rather than switching to generic desktop automation.

## Capture logs and debug

- Use `start_sim_log_cap` and `stop_sim_log_cap` with the exact bundle identifier for focused runtime logs.
- Use debugger tools only when the task requires runtime diagnosis; attach to the selected simulator and app rather than an ambiguous process.
- Summarize relevant errors instead of returning unbounded logs.

## Clean up

Stop only log captures, debugger sessions, apps, or simulators started for the current test. Leave pre-existing simulators and unrelated sessions alone.

## Upstream

Adapted from OpenAI's [`build-ios-apps`](https://github.com/openai/plugins/tree/main/plugins/build-ios-apps) plugin version `0.1.2` (`ios-debugger-agent`, MIT) and aligned with XcodeBuildMCP `2.6.2` tool names.
9 changes: 9 additions & 0 deletions .agents/skills/ios-debugger-agent/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
interface:
display_name: "iOS Debugger Agent"
short_description: "Build and drive iOS Simulator apps"
default_prompt: "Use $ios-debugger-agent to build, launch, and inspect the current iOS app on Simulator."
dependencies:
tools:
- type: "mcp"
value: "xcodebuildmcp"
description: "Repository-configured Xcode build, simulator, logging, debugging, and semantic UI tools"
21 changes: 21 additions & 0 deletions .agents/skills/ios-simulator-browser/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) OpenAI

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
51 changes: 51 additions & 0 deletions .agents/skills/ios-simulator-browser/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: ios-simulator-browser
description: Stream an explicit iOS Simulator through pinned serve-sim into the T3 Code in-app browser or another agent browser. Use on Apple Silicon macOS when the user should watch simulator verification live or when browser-visible simulator evidence is needed.
---

# iOS Simulator Browser

Use serve-sim as the shared visual feed for an iOS Simulator. Use `ios-debugger-agent` and XcodeBuildMCP semantic UI tools to drive the app; do not treat browser-canvas coordinates as a substitute for missing app accessibility.

## Confirm availability

serve-sim `0.1.45` requires Apple Silicon macOS, Xcode command-line tools, and Node.js 20 or newer. If the host is unsupported, continue with XcodeBuildMCP screenshots and report that live streaming was unavailable.

When running inside T3 Code, use its product-native browser MCP to open the stream. Other agent hosts may use their own browser or preview surface.

Keep serve-sim on its default `127.0.0.1` binding. Do not expose its preview to a LAN or tunnel unless the user explicitly requests that access and the network is trusted; the preview includes a token-gated shell-execution route.

## Start one owned stream

1. Obtain the exact simulator UDID from the iOS build or launch workflow.
2. Check whether an existing serve-sim stream for that UDID belongs to another task. Reuse it only when explicitly shared; never kill another task's stream.
3. Otherwise, clear only a stale stream for that UDID and start the pinned version with scoped cleanup:

```bash
SIMULATOR_ID=<simulator-udid>
cleanup_serve_sim() {
npx --yes serve-sim@0.1.45 --kill "$SIMULATOR_ID" >/dev/null 2>&1 || true
}
trap cleanup_serve_sim EXIT INT TERM HUP
cleanup_serve_sim
npx --yes serve-sim@0.1.45 "$SIMULATOR_ID"
```

4. Keep the terminal alive and open the exact local URL printed by serve-sim in the agent's browser.
5. Verify that a live simulator frame renders. A loaded wrapper page is not sufficient evidence.

## Observe while driving semantically

- Let the user watch the serve-sim stream while XcodeBuildMCP performs `snapshot_ui`, semantic taps, typing, gestures, and screenshots.
- Keep the browser and Xcode tooling pinned to the same simulator UDID.
- Do not switch to generic desktop automation or browser-canvas clicking merely because the stream is visible.

If the in-app browser explicitly reports that previews are unavailable, do not install unrelated browser automation. Continue through XcodeBuildMCP, capture a simulator screenshot, report the unavailable live stream, and clean up the owned serve-sim process.

## Finish

Stop the long-running terminal and wait for its cleanup trap to finish. If it disappeared without cleanup, run `npx --yes serve-sim@0.1.45 --kill <simulator-udid>` for that exact simulator. Never run an unscoped `--kill`.

## Upstream

Adapted from OpenAI's [`build-ios-apps`](https://github.com/openai/plugins/tree/main/plugins/build-ios-apps) plugin version `0.1.2` (`ios-simulator-browser`, MIT). It invokes serve-sim `0.1.45` under its Apache-2.0 license without vendoring the package.
4 changes: 4 additions & 0 deletions .agents/skills/ios-simulator-browser/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
interface:
display_name: "iOS Simulator Browser"
short_description: "Stream iOS Simulator in the browser"
default_prompt: "Use $ios-simulator-browser to stream the selected iOS Simulator into the T3 Code in-app browser."
File renamed without changes.
71 changes: 71 additions & 0 deletions .agents/skills/test-t3-app/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
name: test-t3-app
description: Launch and test the T3 Code web app in isolated development environments, including first-try browser authentication with one-time pairing URLs, pairing-token recovery, worktree-safe state directories, dev server lifecycle, and direct SQLite inspection or fixture seeding. Use when an agent needs to run T3 locally, test UI behavior in a browser, recover from an expired or consumed pairing token, isolate dev state, or prepare test data in state.sqlite.
---

# Test T3 App

Use this skill for the web client. For iOS Simulator, Android Emulator, or physical-device testing against an isolated T3 backend, use the sibling [`test-t3-mobile`](../test-t3-mobile/SKILL.md) skill.

## Start an isolated web environment

1. Run commands from the repository root.
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 --home-dir <base-dir>`.
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.

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.

## Authenticate the browser on the first navigation

1. Wait for the server log that says authentication is required and includes a URL ending in `/pair#token=...`.
2. Use the controlled in-app browser or browser-automation surface available to the agent. Do not use a system-browser launch command during automated testing.
3. Open that complete URL exactly once as the controlled browser's first navigation. Preserve the fragment and token verbatim.
4. Wait for the pairing exchange and redirect to finish before navigating elsewhere.
5. Continue in the same browser context so its stored bearer session remains available.

Treat pairing URLs as secrets. Do not copy them into final responses, screenshots, committed files, or durable logs. A pairing token is short-lived and single-use; opening the URL in another browser or opening it twice can consume it.

## Recover a consumed or expired pairing token

Create another token against the same database and web URL as the running dev server:

```bash
T3CODE_PORT=<server-port> node apps/server/src/bin.ts auth pairing create \
--base-dir <base-dir> \
--dev-url <web-url> \
--base-url <web-url> \
--ttl 15m \
--label agent-ui-test
```

Use the `Pair URL` from this command once. Derive `<server-port>` and `<web-url>` from the current dev-runner output, including any automatically selected port offset. Setting `T3CODE_PORT` keeps the administrative CLI from probing for an unrelated free port.

Always pass `--dev-url` for a dev-runner environment so the generated pairing URL uses the current web origin. An explicit base directory stores runtime state in `<base-dir>/userdata`; the `<base-dir>/dev` fallback is only used by an implicit dev home. Use `auth pairing list` to inspect active token metadata; it intentionally cannot reveal token secrets.

## Inspect or seed SQLite state

Read [references/sqlite-fixtures.md](references/sqlite-fixtures.md) before changing the database.

- Use `node apps/server/scripts/t3-sqlite-state.ts query` for schema discovery and read-only checks.
- Stop the dev server before using `node apps/server/scripts/t3-sqlite-state.ts exec`, then restart it with the same base directory.
- Seed projection tables only for disposable UI fixtures. Use application commands and APIs when testing business behavior or projection correctness.
- Use the auth CLI, not direct `auth_*` table edits, for pairing and sessions.

The helper refuses to write to the shared `~/.t3` directory by default and creates a database backup before each mutation.

## Finish the test

Stop the dev process with its terminal interrupt. Preserve the isolated base directory when it contains useful reproduction evidence; otherwise remove only a path that was created for this test after resolving and verifying the exact target. A fresh isolated base directory is the safest reset when authentication, migrations, or fixture state becomes ambiguous.

## Troubleshoot predictably

- If the browser shows an unauthenticated pairing screen, issue a new token instead of retrying the consumed URL.
- If the pairing URL is no longer visible, create a replacement token with both `--dev-url` and `--base-url`.
- If the replacement token is rejected, verify that the CLI and server use the identical absolute base directory and web URL.
- If the UI shows unexpected data, verify that every command uses the identical explicit base directory before editing anything.
- If ports move because another instance is running, trust the current dev-runner output rather than assuming ports `13773` and `5733`.
4 changes: 4 additions & 0 deletions .agents/skills/test-t3-app/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
interface:
display_name: "T3 App Testing"
short_description: "Launch and seed isolated T3 test environments"
default_prompt: "Use $test-t3-app to launch an isolated T3 development environment and test it in the browser."
58 changes: 58 additions & 0 deletions .agents/skills/test-t3-app/references/sqlite-fixtures.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# SQLite fixtures

Load this reference only when inspecting or seeding local T3 state directly.

## Select the correct database

When `--base-dir` or `--home-dir` is explicit, runtime state lives under `<base-dir>/userdata` and the database path is `<base-dir>/userdata/state.sqlite`. The `<base-dir>/dev` state directory is only the fallback for an implicit development home, preventing an ordinary `vp run dev` from touching production state.

Start the target runtime once before seeding so all migrations have run. Use an isolated base directory. Stop the server before writes to avoid racing application state or an active projection.

## Use the helper

List tables:

```bash
node apps/server/scripts/t3-sqlite-state.ts query \
--base-dir <base-dir> \
--sql "SELECT name FROM sqlite_schema WHERE type = 'table' ORDER BY name"
```

Inspect current columns before writing a fixture:

```bash
node apps/server/scripts/t3-sqlite-state.ts query \
--base-dir <base-dir> \
--sql "PRAGMA table_info(projection_threads)"
```

Apply a SQL fixture from a file:

```bash
node apps/server/scripts/t3-sqlite-state.ts exec \
--base-dir <base-dir> \
--file /tmp/t3-seed.sql
```

Use one statement per invocation for both `query` and `exec`; the helper wraps writes in a transaction and prints the backup path after a successful mutation. Use a single insert with multiple value rows when a fixture needs several records.

## Seed projection data carefully

The web UI primarily reads these projection tables:

- `projection_projects`
- `projection_threads`
- `projection_thread_messages`
- `projection_thread_activities`
- `projection_thread_sessions`
- `projection_turns`
- `projection_pending_approvals`
- `projection_thread_proposed_plans`

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.

Direct projection writes are appropriate for ephemeral visual states, edge-case counts, long titles, activity lists, and similar UI fixtures. They do not create a coherent orchestration event history. Do not modify `orchestration_events` unless the test specifically exercises projector internals, and do not use direct projection writes to claim backend business behavior works.

Use the app's commands or APIs for behavior tests. Use `node apps/server/src/bin.ts auth ...` for auth state rather than editing `auth_pairing_links` or `auth_sessions`.
Loading
Loading