Skip to content

Commit d3fd5a9

Browse files
committed
merge main into fix/server-setup-shell-fallback
2 parents d4c4284 + c677d5f commit d3fd5a9

1,502 files changed

Lines changed: 34213 additions & 30440 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.agents/skills/test-t3-app/SKILL.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@ Test with meaningful project and thread data. Read
2121
[references/sqlite-fixtures.md](references/sqlite-fixtures.md) only when
2222
inspecting or seeding SQLite. Stop the test server before direct fixture writes.
2323

24+
## Drive agent turns for free
25+
26+
Do not spend a paid model to see a turn render. `vp run dev` registers the
27+
`Replay (dev)` provider, which replays recorded turns with simulated streaming
28+
through the real adapter and orchestration. Its models are scenarios:
29+
`showcase` covers thinking, a plan, tool calls, an approval, and markdown.
30+
Press `Ctrl+Alt+Shift+R` for a picker (GNOME takes that key for screen
31+
recording), call `window.t3dev.replay("showcase")`
32+
with `preview_evaluate`, or run
33+
`node apps/server/src/bin.ts thread start --base-dir .t3 --provider devReplay --model showcase <project> "go"`.
34+
When the test needs real provider behavior, use that provider's cheapest
35+
model, such as Haiku for Claude or Luna for Codex.
36+
2437
## Use the Browser panel
2538

2639
Call `preview_status`, then `preview_open` if the Browser panel is

‎.coderabbit.config.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default defineConfig((ctx) => ({
2727
instructions: "Hold changed code to the rules in docs/internals/web-ui.md.",
2828
},
2929
{
30-
path: "**/*.test.{ts,tsx}",
30+
path: "**/*.test.*",
3131
instructions:
3232
"Hold changed tests to the rules in docs/internals/testing.md. Request tests only as those rules allow.",
3333
},

‎.github/actions/setup-ci-deps/action.yml‎

Lines changed: 55 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ inputs:
55
description: Read-only credential for the private maintainer task cache
66
required: false
77
default: ""
8+
install:
9+
description: Set to "false" to set up Vite+ only, with no pnpm store or install
10+
required: false
11+
default: "true"
12+
install-args:
13+
description: Arguments for `vp install`, such as filters. Empty installs the whole workspace.
14+
required: false
15+
default: ""
816
runs:
917
using: composite
1018
steps:
@@ -19,10 +27,11 @@ runs:
1927
echo "node=$(jq -r '.engines.node' package.json)" >> "$GITHUB_OUTPUT"
2028
echo "pnpm=$(jq -r '.packageManager' package.json)" >> "$GITHUB_OUTPUT"
2129
30+
# Pinned because release-desktop.yml signs builds with this action in the job.
2231
- name: Cache Vite+
2332
id: vp_cache
2433
if: steps.vp.outputs.version != ''
25-
uses: actions/cache@v6
34+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
2635
with:
2736
path: ~/.vite-plus
2837
key: vite-plus-home-v2-${{ runner.os }}-${{ runner.arch }}-${{ steps.vp.outputs.version }}-node${{ steps.vp.outputs.node }}-${{ steps.vp.outputs.pnpm }}
@@ -38,38 +47,73 @@ runs:
3847
echo "$HOME/.vite-plus/bin" >> "$GITHUB_PATH"
3948
"$HOME/.vite-plus/bin/vp" env use "${{ steps.vp.outputs.node }}"
4049
50+
# vp gives each Node.js download attempt 10 minutes by default, so one
51+
# stalled stream holds the job that long. It retries 3 times and resumes
52+
# partial bytes, so a shorter limit costs a slow download only a retry.
4153
- name: Setup Vite+
4254
if: steps.vp_cache.outputs.cache-hit != 'true'
43-
uses: voidzero-dev/setup-vp@v1
55+
uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb # v1
56+
env:
57+
VP_DOWNLOAD_TIMEOUT: "120"
4458
with:
4559
node-version-file: package.json
4660
cache: false
4761
run-install: false
4862

49-
- name: Resolve pnpm store path
63+
# A shared key lets whichever install saves first, often a small filtered
64+
# one, become every job's store. Each set of install args gets its own.
65+
- name: Resolve pnpm store
5066
id: pnpm_store
67+
if: inputs.install == 'true'
5168
shell: bash
69+
env:
70+
INSTALL_ARGS: ${{ inputs.install-args }}
5271
run: |
53-
store_path="$(vp pm cache dir)"
54-
echo "path=$store_path" >> "$GITHUB_OUTPUT"
72+
echo "path=$(vp pm cache dir)" >> "$GITHUB_OUTPUT"
73+
if [[ -z "$INSTALL_ARGS" ]]; then
74+
echo "namespace=full" >> "$GITHUB_OUTPUT"
75+
else
76+
echo "namespace=filtered-$(printf '%s' "$INSTALL_ARGS" | cksum | cut -d' ' -f1)" >> "$GITHUB_OUTPUT"
77+
fi
5578
56-
# setup-vp's shared cache key ignores install filters. Keep full installs in a
57-
# separate namespace, including fallback restores.
79+
# Filtered installs prefer the current full store, which holds every package,
80+
# over an older store of their own.
5881
# The pnpm store stays a cache tarball on the runner's own disk. A store on a
5982
# Blacksmith sticky disk mounts in under a second, but pnpm then copies every
6083
# package across filesystems instead of hard-linking it: install took 28-49s
6184
# against 9s plus an 11s restore.
62-
- name: Cache full pnpm store
63-
uses: actions/cache@v6
85+
- name: Restore pnpm store
86+
id: pnpm_cache
87+
if: inputs.install == 'true'
88+
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
6489
with:
6590
path: ${{ steps.pnpm_store.outputs.path }}
66-
key: pnpm-full-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pnpm-lock.yaml', 'pnpm-workspace.yaml', 'package.json') }}
91+
key: pnpm-${{ steps.pnpm_store.outputs.namespace }}-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pnpm-lock.yaml', 'pnpm-workspace.yaml', 'package.json') }}
6792
restore-keys: |
93+
pnpm-full-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pnpm-lock.yaml', 'pnpm-workspace.yaml', 'package.json') }}
94+
pnpm-${{ steps.pnpm_store.outputs.namespace }}-v1-${{ runner.os }}-${{ runner.arch }}-
6895
pnpm-full-v1-${{ runner.os }}-${{ runner.arch }}-
6996
7097
- name: Install dependencies
98+
if: inputs.install == 'true'
7199
shell: bash
72-
run: vp install
100+
env:
101+
INSTALL_ARGS: ${{ inputs.install-args }}
102+
# Unquoted so each filter is its own argument.
103+
run: vp install $INSTALL_ARGS
104+
105+
# A filtered install that started from the current full store adds nothing
106+
# worth a second copy of it.
107+
- name: Save pnpm store
108+
if: >-
109+
inputs.install == 'true' &&
110+
steps.pnpm_cache.outputs.cache-hit != 'true' &&
111+
(steps.pnpm_store.outputs.namespace == 'full' ||
112+
steps.pnpm_cache.outputs.cache-matched-key != format('pnpm-full-v1-{0}-{1}-{2}', runner.os, runner.arch, hashFiles('pnpm-lock.yaml', 'pnpm-workspace.yaml', 'package.json')))
113+
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
114+
with:
115+
path: ${{ steps.pnpm_store.outputs.path }}
116+
key: ${{ steps.pnpm_cache.outputs.cache-primary-key }}
73117

74118
- name: Enable shared task cache
75119
if: >-

‎.github/triage/PLAYBOOK.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ provided alongside this playbook. Everything machine-specific lives there, not h
1111

1212
## 1. Ask what went wrong
1313

14-
Your first message to the user: ask them to describe what went wrong, in their own
15-
words. Ask them to paste screenshots directly into this session if they have any.
14+
Unless the user already described it, your first message asks what went wrong, in
15+
their own words. Ask them to paste screenshots directly into this session if they have any.
1616
Ask follow-up questions when the description is vague. Good repro steps are the most
1717
valuable thing you can extract from this conversation.
1818

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -225,16 +225,6 @@ jobs:
225225
!/apps/mobile/modules/t3-terminal/Vendor/**/*.a
226226
sparse-checkout-cone-mode: false
227227

228-
# Blacksmith boots GitHub's Ubuntu runner image (gcc is usually present),
229-
# but ACP process-tree live tests compile a small pthread fixture with `cc`
230-
# and soft-skip when it is missing. Install build-essential so that path
231-
# always runs in CI instead of silently no-oping.
232-
- name: Install C toolchain for process-tree fixtures
233-
run: |
234-
sudo apt-get update
235-
sudo apt-get install -y --no-install-recommends build-essential
236-
command -v cc
237-
238228
- uses: ./.github/actions/setup-apt-mirrors
239229

240230
# The desktop tests compile the browser secret helper. The install runs in
@@ -364,7 +354,9 @@ jobs:
364354
id-token: write
365355
name: Test Server ${{ matrix.shard }}
366356
runs-on: blacksmith-4vcpu-ubuntu-2404
367-
timeout-minutes: 10
357+
# Shards take 2-5 minutes. When the shared task cache throttles reads, each
358+
# failed fetch stalls vp for 15-90s, which pushed shards past 10 minutes.
359+
timeout-minutes: 20
368360
strategy:
369361
fail-fast: false
370362
matrix:

‎.github/workflows/deploy-relay.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ jobs:
8080
CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }}
8181
APNS_PRIVATE_KEY: ${{ secrets.APNS_PRIVATE_KEY }}
8282
FCM_SERVICE_ACCOUNT: ${{ secrets.FCM_SERVICE_ACCOUNT }}
83+
T3CHAT_LINK_SECRET: ${{ secrets.T3CHAT_LINK_SECRET }}
8384

8485
- name: Publish relay deploy commit status
8586
uses: actions/github-script@v8

‎.github/workflows/relay-preview.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,5 @@ jobs:
7979
PLANETSCALE_API_TOKEN: ${{ secrets.PLANETSCALE_API_TOKEN }}
8080
AXIOM_TOKEN: ${{ secrets.AXIOM_TOKEN }}
8181
CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }}
82+
# Unset by default, so previews keep the T3 Chat link off.
83+
T3CHAT_LINK_SECRET: ${{ secrets.T3CHAT_LINK_SECRET }}

‎.github/workflows/release-desktop.yml‎

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,6 @@ jobs:
147147
git sparse-checkout set --no-cone '/*' '!/.repos/'
148148
git -c checkout.workers=0 checkout --detach FETCH_HEAD
149149
150-
- name: Setup Vite+
151-
uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb # v1
152-
with:
153-
node-version-file: package.json
154-
cache: true
155-
run-install: false
156-
157150
# pnpm checks the lockfile and policy before reusing this result. A missing
158151
# artifact leaves the cache empty, so installation runs the checks again.
159152
- name: Download dependency verification
@@ -163,10 +156,12 @@ jobs:
163156
name: release-dependency-verification
164157
path: ${{ runner.temp }}/pnpm-metadata
165158

166-
- name: Install desktop dependencies
159+
- name: Setup dependencies
160+
uses: ./.github/actions/setup-ci-deps
161+
with:
162+
install-args: --filter=@t3tools/desktop... --filter=t3... --filter=@t3tools/scripts...
167163
env:
168164
pnpm_config_cache_dir: ${{ runner.temp }}/pnpm-metadata
169-
run: vp install --filter=@t3tools/desktop... --filter=t3... --filter=@t3tools/scripts...
170165

171166
- name: Cache resource monitor
172167
id: resource_monitor_cache
@@ -259,6 +254,24 @@ jobs:
259254
if [[ "${{ inputs.version }}" =~ -nightly\.[0-9]{8}\.[0-9]+$ ]]; then brand=nightly; fi
260255
node scripts/apply-web-brand-assets.ts "$brand" apps/server/dist/client
261256
257+
# tsdown downloads the target Node with one fetch and no retry, and
258+
# nodejs.org drops that download often enough to fail releases. Seed
259+
# tsdown's cache with a retried, checksum-verified copy instead.
260+
- name: Download target Node.js for the CLI executable
261+
if: inputs.cli_archive && inputs.platform == 'win'
262+
shell: bash
263+
run: |
264+
set -euo pipefail
265+
version="$(node -p 'require("./package.json").engines.node')"
266+
name="node-v$version-win-${{ inputs.arch }}"
267+
dest="${XDG_CACHE_HOME:-$HOME/.cache}/tsdown/node/v$version/win-${{ inputs.arch }}"
268+
dir="$RUNNER_TEMP/node-download"
269+
mkdir -p "$dir" "$dest"
270+
curl -fsSL --retry 5 --retry-all-errors -o "$dir/$name.zip" "https://nodejs.org/dist/v$version/$name.zip"
271+
curl -fsSL --retry 5 --retry-all-errors -o "$dir/SHASUMS256.txt" "https://nodejs.org/dist/v$version/SHASUMS256.txt"
272+
(cd "$dir" && grep " $name.zip\$" SHASUMS256.txt | sha256sum -c -)
273+
unzip -p "$dir/$name.zip" "$name/node.exe" > "$dest/node.exe"
274+
262275
# Setup Vite+ selects the exact engines.node version from package.json.
263276
# Native builds embed that executable; cross-target builds download the
264277
# same version for their target.

0 commit comments

Comments
 (0)