Skip to content

Commit fbb074b

Browse files
authored
chore: merge upstream t3code to 18e2742 (pingdotgg#253)
Merges upstream `pingdotgg/t3code` `18e2742519` (base `e07595714a`, 45 commits) into the fork. Branched from `main`; no open merge PR to stack on. ## What needs a reviewer's eye - **tsc-rs came back through silent auto-merges.** Upstream pingdotgg#23023 made the catalog `typescript` `npm:@tsc-rs/typescript` and dropped `@effect/tsgo` and the `effect-tsgo patch` prepare step. Most of that landed in `pnpm-workspace.yaml` and `package.json` with no conflict. Restored TypeScript 7.0.2, `@effect/tsgo` and the prepare step, and added a `typecheck-toolchain` inventory entry so the next merge checks these files. Upstream's 25 per-package `tsc-rs --noEmit` → `tsc --noEmit` edits converge with what the fork already had. - **`apps/server/src/ws.ts`:** upstream now splits the RPC group in two to keep handler requirements typed (pingdotgg#23813). That fixes the same TS2589 problem the fork's `toWsRpcLayer`/`WsRpcHandlers` cast worked around, so I took upstream's version and dropped the cast. The fork's sandbox, subtask and scripts handlers fall into upstream's "other" group. - **`no-em-dash-copy` lint (pingdotgg#23799)** flagged 16 lines of fork-only copy (sandbox panel, Moatless settings, fork dialog, preview inspector). Rewrote them, and placeholder `"—"` is now `"-"` to match upstream. - **`resolution-check.mjs`** now reports a path as convergence, not as a dropped upstream change, when a three-way merge of upstream's change onto the fork's copy is a clean no-op. Other conflicts: `SettingsPanels.tsx` puts upstream's `ThreadTitleInstructionsSettings` inside the `FEATURES.serverBehaviorSettings` gate, and its search item is mapped to the same flag. `TimelineUserMessageRow.tsx` keeps the origin chip next to upstream's folded agent rows. `PreviewView.tsx` takes upstream's copy and keeps the fork's inspector reason. In `AGENTS.md` I kept the fork's text and dropped upstream's tsc-rs, "never make a PR" and GitCafe lines. `pnpm-lock.yaml` was re-derived from upstream's copy; the fork's `moatless-api` edge is present and there are no `@tsc-rs` entries. Counts: 323 files landed against 348 in the upstream range. The 25-file gap is the converged typecheck scripts plus the two `decide` files. The fork delta went from 825 files to 797. ## Verification `verify.mjs`: duplicate-adds, tripwires, resolution-check, unsupported-methods (ADD 0 / DROP 0 / KEEP 2), lockfile, fmt, lint, typecheck and build all pass. The test step has failures that are all environmental: - Seen in earlier merges: `t3` `RepositoryIdentityResolver` and `GitVcsDriver` (the sandbox's git `insteadOf` rewrite), `ServerBrowserPage` (missing chromium build), and `provider-opencode` `OpenCodeServerLedger`. - New: `t3` `CodexChatGptAuth` and `CodexManagedRuntime` fail with `Untrusted IPC parent`. The cause is the sandbox's `/tmp`, which is mode 2777 with no sticky bit. Both pass (58 tests) with a private `TMPDIR`. Registered in `gaps.md`. - With a Playwright browser-path shim and that `TMPDIR`, `@t3tools/web` passes 381/381 files and `t3` fails only the two `insteadOf` files. ## Feature classification **Usable as-is** - Messages from other agents fold into one-line rows (pingdotgg#23135). Keyed on `createdBy: "agent"`, which the Moatless projection already sends. - Tool images beyond the preview limit are marked (pingdotgg#23595); tool icons keep their detail in light mode (pingdotgg#23896); toast and subagent-bar layout fixes (pingdotgg#23777, pingdotgg#23502). - ChatView re-render work (pingdotgg#23117, pingdotgg#23124); the sidebar follows the active thread after history navigation (pingdotgg#23519); paused sidebar videos stop reloading (pingdotgg#23106). - A ChatGPT Business usage limit offers a copyable admin request (pingdotgg#23361). It shows when the thread error carries the code. - Provider updates no longer pop toasts on launch (pingdotgg#23233). **Unsupported in Moatless / needs implementation** - Thread title instructions: the `threadTitleInstructions` server setting (pingdotgg#21882). Hidden under `FEATURES.serverBehaviorSettings` because Moatless names its own threads. - Telemetry export endpoint source: the `otlp*Source` and `otlp*Variable` fields (pingdotgg#23713). This is on the diagnostics surface, which `FEATURES.diagnostics` already gates. - GitCafe reviewers, labels and MCP URLs (pingdotgg#23034, pingdotgg#23887, pingdotgg#23899), and managed Codex token renewal (pingdotgg#21786, pingdotgg#21787). These belong to upstream's own server. **Backend behavior to consider reproducing in Moatless** (added to [runtime fixes](docs/fork/gaps.md#runtime-fixes-upstream-made-to-its-own-server)) - `compactIdleThreads` is a boolean on the wire again, and the mode moved to `idleCompaction` (pingdotgg#23454). - A PR watch records `checksAwaitedSince` and wakes its thread when no check ever reports (pingdotgg#23863). - Shell snapshots on large databases no longer scan every thread (pingdotgg#23751). Subagent transcript updates stay off the shell stream (pingdotgg#23783). - A Codex parent resumes once its native children finish (pingdotgg#23840). A Claude agent stops when the server that started it dies (pingdotgg#23389). - A clone retries over HTTPS when the SSH key is refused (pingdotgg#23170). Forgejo merges follow the repository's delete-branch setting (pingdotgg#23471). - Assets carry a `fileRevision` that does not change when the URL is re-signed. Sweep: 2 new-file hits (`apps/mobile/.../ThreadScreenHost.tsx` and the Clerk Expo patch rename). Both are outside the web surface the fork ships, so I took them as upstream's. No new workflows. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- Moatless task: https://moatless.soaplabstest.com/tasks/e677a17e-2f52-4c8d-b273-27a449d05732
2 parents 7befb4f + bae6135 commit fbb074b

337 files changed

Lines changed: 10810 additions & 5201 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/scripts/resolution-check.mjs‎

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@
3737
* Like `duplicate-adds.mjs`, this runs mid-merge on purpose. Before the commit
3838
* exists a finding is still a plain edit.
3939
*/
40+
import * as NodeChildProcess from "node:child_process";
4041
import * as NodeFS from "node:fs";
42+
import * as NodeOS from "node:os";
4143
import * as NodePath from "node:path";
4244

4345
import {
@@ -184,14 +186,40 @@ function checkDeltaDrift(inventory, report, sides, paths) {
184186
if (found === 0) section.ok(`${checked} path(s) checked, each still differs from upstream`);
185187
}
186188

189+
/**
190+
* Whether upstream's change to `path` is already in the fork's copy: a
191+
* three-way merge of it onto `ours` is clean and changes nothing. That is
192+
* convergence, where upstream made an edit the fork had already made, rather
193+
* than an upstream change the resolution dropped.
194+
*/
195+
function upstreamChangeAlreadyCarried(base, sides, path, ours) {
196+
const baseBlob = blobLines(base, path);
197+
const theirs = blobLines(sides.theirs, path);
198+
if (baseBlob === null || theirs === null) return false;
199+
const dir = NodeFS.mkdtempSync(NodePath.join(NodeOS.tmpdir(), "resolution-check-"));
200+
try {
201+
for (const [name, content] of Object.entries({ ours, base: baseBlob, theirs })) {
202+
NodeFS.writeFileSync(NodePath.join(dir, name), content.join("\n"));
203+
}
204+
const result = NodeChildProcess.spawnSync(
205+
"git",
206+
["merge-file", "-p", "--quiet", "ours", "base", "theirs"],
207+
{ cwd: dir, encoding: "utf8", maxBuffer: 64 * 1024 * 1024 },
208+
);
209+
return result.status === 0 && result.stdout === ours.join("\n");
210+
} finally {
211+
NodeFS.rmSync(dir, { recursive: true, force: true });
212+
}
213+
}
214+
187215
/**
188216
* Landed as the fork's own pre-merge content, where upstream had moved on.
189217
*
190218
* The merged tree equalling `ours` on a path upstream changed means upstream's
191219
* change is simply not in. For `decide` that can be deliberate; everywhere else
192220
* the verdict says upstream's version is the base to start from.
193221
*/
194-
function checkUpstreamDrift(inventory, report, sides, paths) {
222+
function checkUpstreamDrift(inventory, report, sides, paths, base) {
195223
const section = report.section("Upstream change, against what landed");
196224
let checked = 0;
197225
let found = 0;
@@ -204,6 +232,10 @@ function checkUpstreamDrift(inventory, report, sides, paths) {
204232
if (blobs === null) continue;
205233
checked += 1;
206234
if (!same(blobs.merged, blobs.ours)) continue;
235+
if (upstreamChangeAlreadyCarried(base, sides, path, blobs.ours)) {
236+
section.info(`${path}: upstream's change was already in the fork's copy [${match.entry.id}]`);
237+
continue;
238+
}
207239

208240
const message =
209241
`${path} landed unchanged from the fork's pre-merge copy, ` +
@@ -365,7 +397,7 @@ export function runResolutionCheck(report, commit = null) {
365397

366398
if (isUpstreamMerge(inventory, sides)) {
367399
checkDeltaDrift(inventory, report, sides, candidates);
368-
checkUpstreamDrift(inventory, report, sides, candidates);
400+
checkUpstreamDrift(inventory, report, sides, candidates, base);
369401
} else {
370402
report
371403
.section("Resolutions against both sides")

‎.devcontainer/devcontainer.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Dev container for T3 Code. Mirrors CI (ubuntu-24.04, Node 24, Rust stable)
1+
// Dev container for T3 Code. Mirrors CI (ubuntu-24.04, Node 26, Rust stable)
22
// and the canonical setup in docs/operations/development.md: global `vp`, `vp i`.
33
// Contributor doc: docs/internals/devcontainer.md
44
{
@@ -8,7 +8,7 @@
88
// nodeGypDependencies (default true) brings python3/make/g++, which Linux
99
// needs for node-pty's node-gyp fallback (its prebuilds are mac/win only).
1010
"ghcr.io/devcontainers/features/node:2": {
11-
"version": "24"
11+
"version": "26"
1212
},
1313
// native/resource-monitor (edition 2024, needs stable >= 1.85). The server
1414
// degrades gracefully without the binary, but CI checks cargo fmt + test.

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

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,38 @@ description: Install Vite+ and the workspace dependencies from cache.
33
runs:
44
using: composite
55
steps:
6-
# setup-vp reuses an installed exact version, so restoring its home skips the
7-
# installer download on every job.
6+
# ~/.vite-plus holds vp, the Node.js runtime, and pnpm. A cache entry never
7+
# updates, so the key names all three versions; otherwise a pnpm or Node.js
8+
# bump makes every job download them from npm again.
89
- name: Resolve Vite+ version
910
id: vp
1011
shell: bash
1112
run: |
1213
echo "version=$(sed -nE 's/^ vite-plus: ([0-9][^ ]*)$/\1/p' pnpm-workspace.yaml)" >> "$GITHUB_OUTPUT"
14+
echo "node=$(jq -r '.engines.node' package.json)" >> "$GITHUB_OUTPUT"
15+
echo "pnpm=$(jq -r '.packageManager' package.json)" >> "$GITHUB_OUTPUT"
1316
1417
- name: Cache Vite+
18+
id: vp_cache
1519
if: steps.vp.outputs.version != ''
1620
uses: actions/cache@v6
1721
with:
1822
path: ~/.vite-plus
19-
key: vite-plus-home-v1-${{ runner.os }}-${{ runner.arch }}-${{ steps.vp.outputs.version }}
23+
key: vite-plus-home-v2-${{ runner.os }}-${{ runner.arch }}-${{ steps.vp.outputs.version }}-node${{ steps.vp.outputs.node }}-${{ steps.vp.outputs.pnpm }}
24+
25+
# setup-vp always runs the installer, which fetches vp from npm even when
26+
# this exact version is installed. A cache hit already has everything, so
27+
# skip setup-vp and do its remaining work here. This keeps npm outages from
28+
# failing jobs.
29+
- name: Use cached Vite+
30+
if: steps.vp_cache.outputs.cache-hit == 'true'
31+
shell: bash
32+
run: |
33+
echo "$HOME/.vite-plus/bin" >> "$GITHUB_PATH"
34+
"$HOME/.vite-plus/bin/vp" env use "${{ steps.vp.outputs.node }}"
2035
2136
- name: Setup Vite+
37+
if: steps.vp_cache.outputs.cache-hit != 'true'
2238
uses: voidzero-dev/setup-vp@v1
2339
with:
2440
node-version-file: package.json

‎.github/workflows/mobile-showcase-screenshots.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ env:
4343

4444
jobs:
4545
ios:
46-
name: iPhone 6.9, iPhone 6.5, and iPad 13
46+
name: iPhone, iPhone Duo, and iPad 13
4747
if: inputs.platform == 'all' || inputs.platform == 'ios'
4848
runs-on: blacksmith-12vcpu-macos-26
4949
# Capturing every palette multiplies the device matrix by six, and only the
@@ -87,6 +87,9 @@ jobs:
8787
brew install cameroncooke/axe/axe
8888
axe --version
8989
90+
- name: Install foldable simulator controls
91+
run: npm install --global [email protected]
92+
9093
- name: Capture iOS showcase
9194
run: pnpm screenshots:mobile --platform ios --appearance "${{ inputs.appearance }}" --theme "${{ inputs.theme }}"
9295

‎.pnpmfile.cjs‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55
// Release scripts stage their own installs with explicit architectures.
66
module.exports = {
77
hooks: {
8+
// `typescript` is @tsc-rs/typescript (the catalog entry). Its npm version (0.8.x) is outside
9+
// vite-plus-core's typescript peer range, so pnpm gave the vite-plus that @effect/vitest
10+
// imports apps/marketing's [email protected] instead, and tests loaded a second vitest.
11+
readPackage(pkg) {
12+
if (pkg.name === "@voidzero-dev/vite-plus-core" && pkg.peerDependencies?.typescript) {
13+
pkg.peerDependencies.typescript = "*";
14+
}
15+
return pkg;
16+
},
817
updateConfig(config) {
918
// oxlint-disable-next-line t3code/no-global-process-runtime -- pnpm loads this file before any Effect runtime exists.
1019
if (process.platform !== "win32") return config;

‎apps/desktop/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@t3tools/desktop",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"private": true,
55
"type": "module",
66
"main": "dist-electron/boot.cjs",

‎apps/desktop/src/app/DesktopObservability.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,19 +366,19 @@ const resolveOtlpEndpoints = Effect.gen(function* () {
366366
otel,
367367
"traces",
368368
{ url: Option.getOrUndefined(environment.otlpTracesUrl), export: signalExport },
369-
persisted.otlpTracesUrl,
369+
{ bootstrapUrl: undefined, settingsUrl: persisted.otlpTracesUrl },
370370
),
371371
metrics: OtelEnvironment.resolveSignalEndpoint(
372372
otel,
373373
"metrics",
374374
{ url: Option.getOrUndefined(environment.otlpMetricsUrl), export: signalExport },
375-
persisted.otlpMetricsUrl,
375+
{ bootstrapUrl: undefined, settingsUrl: persisted.otlpMetricsUrl },
376376
),
377377
logs: OtelEnvironment.resolveSignalEndpoint(
378378
otel,
379379
"logs",
380380
{ url: Option.getOrUndefined(environment.otlpLogsUrl), export: signalExport },
381-
persisted.otlpLogsUrl,
381+
{ bootstrapUrl: undefined, settingsUrl: persisted.otlpLogsUrl },
382382
),
383383
warnings: otel.warnings,
384384
resourceAttributes: otel.resourceAttributes,

‎apps/desktop/src/wsl/DesktopWslEnvironment.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -463,14 +463,14 @@ cd ${shellQuote(linuxServerDir)} && node <<'NODE' >/dev/null 2>&1
463463
// The sentinel must be a package the CLI bundle leaves external. It used to be
464464
// "effect", back when the bundle externalized its runtime deps and the whole
465465
// node_modules tree was unpacked. The bundle now inlines its JS dependencies,
466-
// so "effect" no longer exists on disk and only the native packages do —
467-
// resolving node-pty is what actually validates the unpacked tree.
466+
// so "effect" no longer exists on disk and only the native packages do.
467+
// Resolving node-pty is what actually validates the unpacked tree.
468468
try { require.resolve("node-pty/package.json"); } catch (_e) { process.exit(3); }
469469
const fs = require("node:fs");
470470
const path = require("node:path");
471471
const pkgDir = path.dirname(require.resolve("node-pty/package.json"));
472472
// node-pty 1.x is N-API based, so a single Linux pty.node is ABI-stable across
473-
// Node versions — require() succeeding IS the real compatibility test. Look in
473+
// Node versions, so require() succeeding IS the real compatibility test. Look in
474474
// the same places node-pty's own loader does.
475475
const candidates = [
476476
path.join(pkgDir, "build", "Release", "pty.node"),
@@ -699,7 +699,7 @@ const ensureNodePtyImpl = Effect.fn("DesktopWslEnvironment.ensureNodePtyImpl")(f
699699
return {
700700
ok: false,
701701
reason:
702-
'WSL server dependencies could not be loaded (for example "node-pty"). The native packages the server needs are not unpacked where the WSL distro\'s Node can read them — this is a packaging problem with this build. Please report it.',
702+
'WSL server dependencies could not be loaded (for example "node-pty"). The native packages the server needs are not unpacked where the WSL distro\'s Node can read them. This is a packaging problem with this build. Please report it.',
703703
fatal: true,
704704
} as const;
705705
}

‎apps/desktop/vite.config.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ export default defineConfig({
4343
dependsOn: ["t3#build"],
4444
cache: false,
4545
},
46-
// Plain `tsc` rather than upstream's Rust port, which the fork does not trust;
47-
// a tripwire in docs/fork/inventory.json holds it out. A rewritten tsbuildinfo
48-
// would keep the task out of the cache.
46+
// tsc rewrites the tsbuildinfo it reads, which keeps a task out of the cache.
4947
typecheck: {
5048
command: "tsc --noEmit",
5149
cache: { input: [{ auto: true }, "!*.tsbuildinfo"] },

‎apps/marketing/src/layouts/Layout.astro‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const canonicalUrl = new URL(Astro.url.pathname, Astro.site);
9595
href={GITHUB_REPOSITORY_URL}
9696
target="_blank"
9797
rel="noopener noreferrer"
98-
aria-label={`Star T3 Code on GitHub — ${MARKETING_STATS.githubStars} stars`}
98+
aria-label={`Star T3 Code on GitHub, ${MARKETING_STATS.githubStars} stars`}
9999
>
100100
<svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
101101
<path d="M12 2.3l2.9 5.88 6.49.94-4.7 4.58 1.11 6.47L12 17.12l-5.8 3.05 1.11-6.47-4.7-4.58 6.49-.94L12 2.3z"/>

0 commit comments

Comments
 (0)