Skip to content

Commit 7befb4f

Browse files
authored
chore: merge upstream t3code to e075957 (pingdotgg#252)
Merges upstream `pingdotgg/t3code` `e64766c56a..e075957` (191 commits) into the fork. Resolutions and verification are recorded in `docs/fork/upstream-merge-log.md` (2026-10-22 entry). ## Resolution - **11 conflicts, each resolved by its preflight verdict.** Upstream split `ChatView`, `ChatComposer`, `MessagesTimeline`, `Sidebar`, `SettingsPanels` and `ChatMarkdown` into dozens of new hook and row files. Each fork delta was re-stated where its code moved, marked `// Fork:`, and the guards, paths and notes in `docs/fork/inventory.json` were re-pointed to match. - **Thread fork:** the dialog's choices (same sandbox, first message, harness) now go through upstream's `useTimelineRewind.onForkFromRun` as an optional `submission`, so `ChatView.tsx` does not keep a copy of the fork handler. - **Typecheck:** upstream moved the web and desktop `typecheck` tasks into `vite.config.ts` and switched them to `tsc-rs` (pingdotgg#22716). The fork keeps the move but runs `tsc --noEmit`. The `tsc-rs` tripwire now also scans `*vite.config.ts`. `tsc-rs` was stripped from the lockfile before re-deriving it. - **Deletions kept:** `apps/server/src/cli/pair.ts` and its test stay deleted (modify/delete against upstream pingdotgg#22855). - **`AGENTS.md`:** the fork's Moatless dev-server section is kept. Upstream's new setup, seeding and test-proof guidance is taken, except its "use tsc-rs" line. ## Verification `verify.mjs` (full) passes duplicate-adds, tripwires, resolution-check, unsupported-methods, lockfile, fmt, lint, typecheck and build. In the test step: - **Failing, same as the last merge:** `shared` AgentScope, `t3` RepositoryIdentityResolver and GitVcsDriver, and `provider-opencode` OpenCodeServerLedger. These are sandbox machine failures that were already recorded on 2026-10-21. - **Failing only because of the sandbox's browser:** `web` and `t3` ServerBrowserPage need Playwright chromium build 1223, which this sandbox lacks. With build 1243 symlinked in its place, `web` passes 381/381 files and ServerBrowserPage passes. ## Usable as-is - Automation messages render as compact rows (pingdotgg#22638). - The composer stays usable while approvals are pending; sending declines them (pingdotgg#21503). - Right-to-left text support (pingdotgg#22777). - Client fixes: pingdotgg#22783, pingdotgg#22607, pingdotgg#22898, pingdotgg#22621, pingdotgg#22627, pingdotgg#22905, pingdotgg#22936, pingdotgg#22399, pingdotgg#22853, pingdotgg#22188, pingdotgg#22922, pingdotgg#22149, pingdotgg#21519, pingdotgg#21924, pingdotgg#22787, pingdotgg#22917, pingdotgg#23315. ## Unsupported in Moatless / needs implementation - **`queued-run.start`** (pingdotgg#22790): a new `OrchestrationV2Command` behind "Send now" on a held queued message in a stopped thread. Moatless must dispatch it. Added to gaps: *A command cannot be refused*. - **Pull request `isDraft`** (pingdotgg#22832), `packages/contracts/src/pullRequest.ts`. Added to gaps: *A pull request snapshot carries no update instant…*. - **Optional new fields, added to gaps: *Runtime fixes upstream made to its own server*:** - approval `reason` / `fullAccessOverride` (pingdotgg#22546) - push error kinds `push_rejected_by_remote` / `push_rejected_non_fast_forward` (pingdotgg#22904) - project clone `stalled` (pingdotgg#22780) - **Idle compaction** (pingdotgg#23037): `compactIdleThreads` is now an enum, and there is a new per-instance `idleCompaction` setting. Both sit behind `serverBehaviorSettings` and `providerConfiguration`. - **Already hidden here:** orchestrator MCP changes (pingdotgg#22889, pingdotgg#22901, pingdotgg#22452), the `t3 thread` CLI (pingdotgg#22732), and `remoteUrl` on repository identity (pingdotgg#22492). - No new RPC methods. The unsupported-method derivation is unchanged (ADD 0, DROP 0). ## Backend behavior to consider reproducing in Moatless - **Stop an abandoned provider turn before a new turn starts** (pingdotgg#23169). - **Delegates:** Stop always clears a delegate (pingdotgg#22653), and a delegate finishes once its leftover work settles (pingdotgg#22709). - **Held queue:** held queued messages send when a thread is stopped (pingdotgg#22790). - **Run metrics:** each run records its duration and outcome (pingdotgg#22094). - **Idle compaction scheduling** (pingdotgg#23037). - **PR draft sync:** upstream updates the cached pull request when only its draft state changes (pingdotgg#22832). - **Provider fixes:** Pi (pingdotgg#23052, pingdotgg#21822), OpenCode (pingdotgg#22938, pingdotgg#22596), Codex (pingdotgg#22541, pingdotgg#22558), Cursor (pingdotgg#22897), Antigravity (pingdotgg#22019). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- Moatless task: https://moatless.soaplabstest.com/tasks/a5f5632a-35b8-4f7a-bda4-935cf818e570
2 parents 14c60f6 + ebd6ab7 commit 7befb4f

485 files changed

Lines changed: 48202 additions & 32411 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/fork-upstream-merge/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ git merge upstream/main
490490
changed) — computed from the merge commit's own parents, nothing to have
491491
captured beforehand — diffs the two file lists so any gap already comes
492492
with which files are on which side, and prints `git diff --stat HEAD^2
493-
HEAD` (the whole fork delta, restated against upstream). A merge that
493+
HEAD` (the whole fork delta, restated against upstream). A merge that
494494
touched far fewer files than upstream changed is the failure this step
495495
exists to catch: `ours` resolutions on live upstream paths produce a clean,
496496
green, quiet merge that threw upstream's work away. If the gap is not

‎.github/scripts/ci-changes.cjs‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
// node ci-changes.cjs --paths <file> --full run every Linux job, gate only the macOS lint
66
// node ci-changes.cjs changed paths unknown: run everything
77
//
8+
// scripts/check-changed.ts requires the same decisions so local runs match CI.
9+
//
810
// Every changed path maps to workspace packages, which then pull in their
911
// dependents from package.json. A path this file does not recognize runs
1012
// everything, so a new root file or directory can only cost minutes.
@@ -201,4 +203,6 @@ function main() {
201203
for (const [key, value] of Object.entries(outputs)) console.log(`${key}=${value}`);
202204
}
203205

204-
main();
206+
module.exports = { readWorkspace, decide };
207+
208+
if (require.main === module) main();

‎.github/scripts/ci-changes.d.cts‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
interface WorkspacePackage {
2+
readonly name: string;
3+
readonly dir: string;
4+
readonly hasTest: boolean;
5+
readonly deps: ReadonlyArray<string>;
6+
}
7+
8+
export function readWorkspace(): Array<WorkspacePackage>;
9+
10+
export function decide(
11+
files: ReadonlyArray<string> | null,
12+
packages: ReadonlyArray<WorkspacePackage>,
13+
full: boolean,
14+
): {
15+
affected: Array<string>;
16+
outputs: {
17+
typecheck: boolean;
18+
build: boolean;
19+
test: boolean;
20+
test_packages: string;
21+
test_web: boolean;
22+
test_server: boolean;
23+
rust: boolean;
24+
release_smoke: boolean;
25+
mobile_native: boolean;
26+
};
27+
};
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
const assert = require("node:assert/strict");
2+
const { spawnSync } = require("node:child_process");
3+
const { mkdtempSync, readFileSync, rmSync, existsSync } = require("node:fs");
4+
const { tmpdir } = require("node:os");
5+
const { join } = require("node:path");
6+
const { test } = require("node:test");
7+
8+
const release = readFileSync(join(__dirname, "../workflows/release.yml"), "utf8");
9+
const preview = readFileSync(join(__dirname, "../workflows/web-preview.yml"), "utf8");
10+
const stepPattern =
11+
/ name: (?:Build staged deployment|Deploy preview)\n shell: bash\n run: \|\n((?: .*\n|\n)+)/g;
12+
const steps = [
13+
...Array.from(release.matchAll(stepPattern), (match, index) => [
14+
index === 0 ? "hosted web" : "marketing",
15+
match[1],
16+
]),
17+
...Array.from(preview.matchAll(stepPattern), (match) => ["web preview", match[1]]),
18+
];
19+
assert.equal(steps.length, 3, "Expected both release steps and the preview step");
20+
21+
const url = "https://t3code-fixture-pinglabs.vercel.app";
22+
const warning = 'Error while parsing config file: "/runner/t3code/pnpm-lock.yaml"';
23+
24+
function runStep(script, stdout, exitCode = 0) {
25+
const directory = mkdtempSync(join(tmpdir(), "t3-vercel-output-"));
26+
const outputFile = join(directory, "output");
27+
try {
28+
const result = spawnSync(
29+
"bash",
30+
[
31+
"-c",
32+
'vp() { printf "%s\\n" "$FIXTURE_STDOUT"; return "$FIXTURE_EXIT"; }\n' +
33+
'curl() { printf \'{"id":"fixture-project"}\\n\'; }\n' +
34+
script.replace(/^ /gm, "").replace(/\$\{\{.*?\}\}/g, "fixture"),
35+
],
36+
{
37+
encoding: "utf8",
38+
env: {
39+
PATH: process.env.PATH,
40+
VERCEL_TOKEN: "fixture-token",
41+
VERCEL_ORG_ID: "fixture-org",
42+
VERCEL_PROJECT_ID: "fixture-project",
43+
GITHUB_OUTPUT: outputFile,
44+
FIXTURE_STDOUT: stdout,
45+
FIXTURE_EXIT: String(exitCode),
46+
},
47+
},
48+
);
49+
assert.ifError(result.error);
50+
return {
51+
...result,
52+
output: existsSync(outputFile) ? readFileSync(outputFile, "utf8") : "",
53+
};
54+
} finally {
55+
rmSync(directory, { recursive: true, force: true });
56+
}
57+
}
58+
59+
for (const [name, script] of steps) {
60+
for (const [label, stdout] of [
61+
["plain URL", url],
62+
["lockfile warning", `${warning}\n${url}`],
63+
["trailing diagnostic", `${url}\nDone`],
64+
]) {
65+
test(`${name}: saves one deployment URL after ${label}`, () => {
66+
const result = runStep(script, stdout);
67+
assert.equal(result.status, 0, result.stderr);
68+
assert.deepEqual(
69+
result.output.split("\n").filter((line) => !line.startsWith("project_id=")),
70+
[`deployment_url=${url}`, ""],
71+
);
72+
});
73+
}
74+
75+
for (const [label, stdout, exitCode] of [
76+
["missing URL", warning, 0],
77+
["invalid URL", "https://example.invalid/deployment", 0],
78+
["multiple URLs", `${url}\nhttps://other.vercel.app`, 0],
79+
["failed deployment", url, 1],
80+
]) {
81+
test(`${name}: rejects ${label} without saving output`, () => {
82+
const result = runStep(script, stdout, exitCode);
83+
assert.notEqual(result.status, 0);
84+
assert.equal(result.output, "");
85+
});
86+
}
87+
}

‎.github/workflows/ci.yml‎

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ jobs:
8383
- name: Setup Vite+
8484
uses: ./.github/actions/setup-ci-deps
8585

86+
# electron's install.js (run by ensure:electron) reads this cache before it
87+
# downloads from GitHub. The key changes only with the Electron version.
88+
- name: Cache Electron download
89+
uses: actions/cache@v6
90+
with:
91+
path: ~/.cache/electron
92+
key: electron-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('node_modules/.pnpm/electron@*/node_modules/electron/package.json') }}
93+
8694
- name: Ensure Electron runtime is installed
8795
run: vp run --filter @t3tools/desktop ensure:electron
8896

@@ -132,6 +140,14 @@ jobs:
132140
- name: Setup Vite+
133141
uses: ./.github/actions/setup-ci-deps
134142

143+
# electron's install.js (run by ensure:electron) reads this cache before it
144+
# downloads from GitHub. The key changes only with the Electron version.
145+
- name: Cache Electron download
146+
uses: actions/cache@v6
147+
with:
148+
path: ~/.cache/electron
149+
key: electron-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('node_modules/.pnpm/electron@*/node_modules/electron/package.json') }}
150+
135151
- name: Ensure Electron runtime is installed
136152
id: electron
137153
run: vp run --filter @t3tools/desktop ensure:electron
@@ -235,14 +251,22 @@ jobs:
235251
- name: Setup Vite+
236252
uses: ./.github/actions/setup-ci-deps
237253

254+
# electron's install.js (run by ensure:electron) reads this cache before it
255+
# downloads from GitHub. The key changes only with the Electron version.
256+
- name: Cache Electron download
257+
uses: actions/cache@v6
258+
with:
259+
path: ~/.cache/electron
260+
key: electron-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('node_modules/.pnpm/electron@*/node_modules/electron/package.json') }}
261+
238262
- name: Ensure Electron runtime is installed
239263
run: vp run --filter @t3tools/desktop ensure:electron
240264

241265
- name: Test preview artifact validation
242266
run: python3 -B .github/scripts/stage-preview-bundle.test.py
243267

244268
- name: Test release checks
245-
run: node --test .github/scripts/check-nightly-release.test.cjs
269+
run: node --test .github/scripts/check-nightly-release.test.cjs .github/scripts/vercel-deployment-output.test.cjs
246270

247271
- name: Finish installing browser secret helper build libraries
248272
timeout-minutes: 5

‎.github/workflows/cursor-hygiene-webhook.yml‎

Lines changed: 0 additions & 52 deletions
This file was deleted.

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -253,18 +253,13 @@ jobs:
253253
if [[ "${{ inputs.version }}" =~ -nightly\.[0-9]{8}\.[0-9]+$ ]]; then brand=nightly; fi
254254
node scripts/apply-web-brand-assets.ts "$brand" apps/server/dist/client
255255
256-
# The single-executable is built with a Node that supports --build-sea
257-
# (25.7+); the repo itself stays on the engines.node version. A native
258-
# build injects into the runner's own Node; a Windows target downloads its
259-
# node.exe.
256+
# Setup Vite+ selects the exact engines.node version from package.json.
257+
# Native builds embed that executable; cross-target builds download the
258+
# same version for their target.
260259
- name: Build CLI single-executable
261260
if: inputs.cli_archive
262261
shell: bash
263262
env:
264-
# The exact version, not a major: vp downloads it from nodejs.org/dist on
265-
# the runner, and only exact versions have a dist directory. Keep in
266-
# step with SEA_NODE_VERSION in apps/server/vite.config.ts.
267-
VP_NODE_VERSION: "26.8.2"
268263
# The executable bundles the server again, so it needs the same stamp
269264
# as release.yml's JS bundle.
270265
T3CODE_TELEMETRY_CHANNEL: ${{ github.repository == 'pingdotgg/t3code' && inputs.release_channel || 'dev' }}

‎.github/workflows/release.yml‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ jobs:
10721072
fi
10731073
10741074
echo "Building hosted web app for $channel_name channel."
1075-
deployment_url="$(
1075+
deployment_output="$(
10761076
vp dlx vercel@53.1.1 deploy \
10771077
--archive=tgz \
10781078
--prod \
@@ -1091,6 +1091,13 @@ jobs:
10911091
--build-env "VITE_HOSTED_APP_URL=$router_url" \
10921092
--build-env "VITE_HOSTED_APP_CHANNEL=$channel_name"
10931093
)"
1094+
printf '%s\n' "$deployment_output"
1095+
# Vercel can print lockfile warnings to stdout before the deployment URL.
1096+
deployment_url="$(printf '%s\n' "$deployment_output" | grep -E '^https://[[:alnum:].-]+\.vercel\.app$')"
1097+
if [[ "$deployment_url" == *$'\n'* ]]; then
1098+
echo "Vercel returned multiple deployment URLs." >&2
1099+
exit 1
1100+
fi
10941101
echo "Staged $deployment_url."
10951102
echo "deployment_url=$deployment_url" >> "$GITHUB_OUTPUT"
10961103
@@ -1219,7 +1226,7 @@ jobs:
12191226
)"
12201227
export VERCEL_PROJECT_ID
12211228
1222-
deployment_url="$(
1229+
deployment_output="$(
12231230
vp dlx vercel@53.1.1 deploy \
12241231
--archive=tgz \
12251232
--prod \
@@ -1228,6 +1235,13 @@ jobs:
12281235
--token "$VERCEL_TOKEN" \
12291236
--scope "${VERCEL_TEAM_SLUG:-$VERCEL_ORG_ID}"
12301237
)"
1238+
printf '%s\n' "$deployment_output"
1239+
# Vercel can print lockfile warnings to stdout before the deployment URL.
1240+
deployment_url="$(printf '%s\n' "$deployment_output" | grep -E '^https://[[:alnum:].-]+\.vercel\.app$')"
1241+
if [[ "$deployment_url" == *$'\n'* ]]; then
1242+
echo "Vercel returned multiple deployment URLs." >&2
1243+
exit 1
1244+
fi
12311245
echo "Staged $deployment_url."
12321246
echo "deployment_url=$deployment_url" >> "$GITHUB_OUTPUT"
12331247
echo "project_id=$VERCEL_PROJECT_ID" >> "$GITHUB_OUTPUT"

‎.github/workflows/typecheck.yml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ jobs:
6060

6161
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
6262
with:
63-
# `engines.node` in the root package.json is the single source.
64-
node-version-file: package.json
63+
# Not `engines.node`: upstream pinned Node 26 there (#23165), whose
64+
# binary needs `libatomic.so.1` this runner image lacks and which ships
65+
# no corepack. Keep in step with NODE_VERSION in docker/Dockerfile.
66+
node-version: "24.18.1"
6567

6668
# pnpm's version comes from the `packageManager` field, not from a pin
6769
# here, so this cannot drift from what a developer's install resolves.

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,20 @@ jobs:
7777
7878
vercel_scope="${VERCEL_TEAM_SLUG:-$VERCEL_ORG_ID}"
7979
80-
deployment_url="$(
80+
deployment_output="$(
8181
vp dlx vercel@53.1.1 deploy \
8282
--archive=tgz \
8383
--yes \
8484
--token "$VERCEL_TOKEN" \
8585
--scope "$vercel_scope"
8686
)"
87+
printf '%s\n' "$deployment_output"
88+
# Vercel can print lockfile warnings to stdout before the deployment URL.
89+
deployment_url="$(printf '%s\n' "$deployment_output" | grep -E '^https://[[:alnum:].-]+\.vercel\.app$')"
90+
if [[ "$deployment_url" == *$'\n'* ]]; then
91+
echo "Vercel returned multiple deployment URLs." >&2
92+
exit 1
93+
fi
8794
8895
echo "Deployed $deployment_url"
8996
echo "deployment_url=$deployment_url" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)