diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 5880459d75a1..144879ecdb56 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,4 +1,4 @@ -// Dev container for T3 Code. Mirrors CI (ubuntu-24.04, Node 24, Rust stable) +// Dev container for T3 Code. Mirrors CI (ubuntu-24.04, Node 26, Rust stable) // and the canonical setup in docs/operations/development.md: global `vp`, `vp i`. // Contributor doc: docs/internals/devcontainer.md { @@ -8,7 +8,7 @@ // nodeGypDependencies (default true) brings python3/make/g++, which Linux // needs for node-pty's node-gyp fallback (its prebuilds are mac/win only). "ghcr.io/devcontainers/features/node:2": { - "version": "24" + "version": "26" }, // native/resource-monitor (edition 2024, needs stable >= 1.85). The server // degrades gracefully without the binary, but CI checks cargo fmt + test. diff --git a/AGENTS.md b/AGENTS.md index 1bb59f2a8d6f..a819ca117ae4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -139,6 +139,7 @@ For authorized mobile verification, a missing or outdated native client is a bui ## Pull requests - Never make a PR unless the developer explicitly asks you to do so. +- If `origin` is git.cafe, follow [GitCafe mirror](docs/operations/development.md#gitcafe-mirror-optional): use `cafe` for existing PRs, issues, comments and labels, but push and open PRs on GitHub, where CI runs. - Conventional commit titles, plain language: `fix(web): new threads no longer spike CPU`. - Body: the problem in a sentence or two, then how you fixed it. End with the model and harness that did the work. - UI changes need before/after images. Motion or timing needs a short video. diff --git a/docs/internals/devcontainer.md b/docs/internals/devcontainer.md index 60eb602a9024..2d07c620483e 100644 --- a/docs/internals/devcontainer.md +++ b/docs/internals/devcontainer.md @@ -2,7 +2,7 @@ > For maintainers. Using T3 Code? See [docs/user](../user/). -`.devcontainer/` gives you a ready-to-code Linux environment matching CI: Ubuntu 24.04, Node 24, pnpm, Rust stable, the global `vp` CLI, and the GitHub CLI. Open the repo in VS Code and "Reopen in Container", or create a GitHub Codespace. Dependency install (`vp i`), the Electron exec-bit repair, and the Vite dep-cache warmup all run automatically before you attach. +`.devcontainer/` gives you a ready-to-code Linux environment matching CI: Ubuntu 24.04, Node 26, pnpm, Rust stable, the global `vp` CLI, and the GitHub CLI. Open the repo in VS Code and "Reopen in Container", or create a GitHub Codespace. Dependency install (`vp i`), the Electron exec-bit repair, and the Vite dep-cache warmup all run automatically before you attach. ## What works in the container diff --git a/docs/operations/background-verification.md b/docs/operations/background-verification.md index 6d68e974bf0a..6204879e21a4 100644 --- a/docs/operations/background-verification.md +++ b/docs/operations/background-verification.md @@ -1,6 +1,6 @@ # Live background-work verification -Run from the repository root with Node 24 and installed dependencies. This uses +Run from the repository root with installed dependencies (`vp` provides the pinned Node). This uses real provider CLI credentials and consumes model usage: ```sh diff --git a/docs/operations/development.md b/docs/operations/development.md index d3c3226d9b04..5b1212580388 100644 --- a/docs/operations/development.md +++ b/docs/operations/development.md @@ -2,8 +2,8 @@ ## First checkout -Install `vp` using the [root README](../../README.md#install-vp). The checkout requires Node 24; -Bun is optional. From the repository root: +Install `vp` using the [root README](../../README.md#install-vp). It provides the Node version +pinned in `package.json` (Node 26), so no separate Node install is needed. From the repository root: ```sh vp i @@ -15,6 +15,47 @@ a new browser. Prefer a container? See [Dev container](../internals/devcontainer.md) for VS Code and Codespaces setup. +## GitCafe mirror (optional) + +GitHub is the source of truth. [git.cafe/pingdotgg/t3code](https://git.cafe/pingdotgg/t3code) is a +two-way synced mirror with much higher API rate limits, which helps when many agents read PRs and +issues at once. You never need it to contribute. + +Comments, reviews, labels, and issue edits made on GitCafe sync back to GitHub. The exception is +code: push branches and open PRs on GitHub, where CI runs. GitCafe mirrors a new PR within about a +minute, and from then on you can work with it through either forge. + +```sh +git remote set-url origin https://git.cafe/pingdotgg/t3code.git +git remote add github https://github.com/pingdotgg/t3code.git +# The GitHub remote you push to: `github`, or your fork's remote. +git config remote.pushDefault github +gh repo set-default pingdotgg/t3code +bun install -g @gitcafe/cli # `cafe` needs Bun 1.2 or newer +cafe auth login && cafe auth http setup +cafe skills install --global # optional: cafe-* skills for coding agents +``` + +With `origin` on git.cafe: + +- Use `cafe` for existing PRs, issues, comments, reviews, and labels, both reading and writing. Check status + comes from `cafe pr status --json`. +- Create PRs on GitHub: `git push` (to the `pushDefault` remote), then `gh pr create` or `gh stack`. + A PR opened with `cafe pr create` or `cafe stack submit` can get a different number on each forge, + a sync marker appended to its body, and rewritten references, and it cannot come from a fork. +- Write or edit text with closing keywords using `gh`. Any text GitCafe writes to GitHub has its + `#` references turned into GitCafe links, so a `Fixes #` edited through `cafe` silently stops + closing the issue. +- Merge with `gh pr merge --match-head-commit `. `cafe pr merge` only pins the head + GitCafe last saw, not the commit you reviewed. +- Use `gh` where the mirror falls short: CI logs and reruns, a fork PR's head repository, and + anything `cafe` returns empty or 403/404 for. +- PR and issue numbers can differ between the forges. Name PRs by branch + (`cafe pr list --head `, `gh pr view `), and write `Fixes #`. +- `cafe` flags differ from `gh`: `--repo` not `-R`, `cafe issue comments ` not `--comments`, + `cafe pr status` not `pr checks`. This repository's CI is GitHub Actions on GitHub, so `cafe ci` + has no runs for it; read logs with `gh run view`. `cafe api` paths omit `/api` (`cafe api /repos/...`). + ## Choosing a dev process Use `vp run dev` for server and web, or `vp run dev:desktop` for the Electron client. @@ -27,7 +68,9 @@ Add `--browser` to open a browser automatically. ### State and ports Linked worktrees default to their own `.t3/userdata`, even when `T3CODE_HOME` is set. -The main checkout defaults to `~/.t3/dev/userdata`. An explicit `--home-dir` wins in both cases. +The main checkout defaults to `~/.t3/dev`. An explicit `--home-dir` wins in both cases. +The first start in a worktree seeds its empty database from a read-only copy of +`~/.t3/userdata`; `--no-seed` or `T3CODE_DEV_SEED=0` skips that. Never run a development server against the live `~/.t3/userdata`. See [test data](../../AGENTS.md#test-data) for copying a consistent database snapshot. @@ -132,7 +175,6 @@ and runs in headless Chromium with the React Compiler on, like the app. There is TypeScript workspaces typecheck with `tsc`. The `typescript` catalog entry is `@tsc-rs/typescript`, the tsc-rs drop-in, with Effect diagnostics, quick fixes, and refactors built in. VS Code uses it through `js/ts.tsdk.path` in `.vscode/settings.json`. -Marketing keeps `astro check` for Astro files. Use `vp run lint:mobile` for native mobile changes. CI owns the full suite; see [ci.yml](../../.github/workflows/ci.yml) for its current jobs. diff --git a/docs/user/install.md b/docs/user/install.md index 59c8648934ca..64b1f19fac54 100644 --- a/docs/user/install.md +++ b/docs/user/install.md @@ -48,7 +48,7 @@ Node.js for `npx`). ### Intel Macs There is no `t3` executable for Intel Macs (the desktop app is available). To -run a server there, build it from source with Node.js 24 and `vp` +run a server there, build it from source with `vp`, which provides the Node version it needs ([Install vp](https://github.com/pingdotgg/t3code#install-vp)): ```bash