Record upstream ancestry for July sync#135
Conversation
Co-authored-by: Julius Marminge <jmarminge@gmail.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
…eam-20260701-ancestry # Conflicts: # apps/mobile/src/features/threads/ThreadFeed.tsx # apps/server/src/provider/Layers/ClaudeAdapter.test.ts # apps/server/src/provider/Layers/ClaudeAdapter.ts # apps/server/src/provider/Layers/ProviderRegistry.test.ts # apps/web/src/browser/HostedBrowserWebview.tsx # apps/web/src/browser/browserRecording.test.ts # apps/web/src/browser/browserRecording.ts # apps/web/src/components/ChatView.tsx # apps/web/src/components/chat/MessagesTimeline.tsx # apps/web/src/components/preview/PreviewAutomationHosts.tsx # apps/web/src/modelSelection.test.ts # apps/web/src/modelSelection.ts # packages/contracts/src/model.ts # packages/shared/src/model.test.ts
…eam-20260701-ancestry
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7989257ba5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| { | ||
| "name": "@t3tools/desktop", | ||
| "version": "0.0.27", | ||
| "version": "0.0.28", |
There was a problem hiding this comment.
Record upstream as an actual merge parent
Fresh evidence for this revision: git cat-file -p 15e8a8acf67f054b70f69297f69d13bd0e8dc7b5 lists only parent a0acab3d, and git merge-base --is-ancestor 24482123 15e8a8acf67f054b70f69297f69d13bd0e8dc7b5 exits 1. Since this commit says it records upstream ancestry for the July sync, landing it as a normal version-bump/code-copy commit leaves upstream 24482123 outside the fork history, so GitHub/future syncs still won't get the intended merge base; recreate it as a true merge with upstream as a parent.
Useful? React with 👍 / 👎.
| const error = recordingStartupCancelledError(recording, cause); | ||
| rejectStartup(error); |
There was a problem hiding this comment.
Clear timed-out recordings when startup later rejects
When stopBrowserRecording times out in wait-startup, it keeps the slot reserved and schedules cleanup with recording.startupSettled.then(...); if the delayed startScreencast then rejects while the lifecycle is already stopping, this new rejectStartup path makes that promise reject, so the scheduled discardBrowserRecording never runs and active remains stuck, causing all later recording starts to hit the conflict path. Handle the rejected startup in the timeout cleanup path as well, e.g. with a finally/two-branch then.
Useful? React with 👍 / 👎.
| const name = line.slice("resolvedEnv:".length, separator); | ||
| const encoded = line.slice(separator + 1).trim(); | ||
| if (!/^[A-Z_][A-Z0-9_]*$/.test(name) || encoded.length === 0) continue; | ||
| try { | ||
| resolved[name] = Buffer.from(encoded, "base64").toString("utf8"); |
There was a problem hiding this comment.
Filter parsed WSL env names to the allowlist
Because runWslShell captures all login-shell stdout, a user profile or shell hook that emits a line like resolvedEnv:PATH=... or resolvedEnv:NODE_OPTIONS=... will be accepted here even though the producer only intends to forward a bounded credential allowlist. Those parsed names are later appended to the env argv for the WSL backend, so shell noise can override the carefully constructed PATH or inject Node flags and break backend/provider startup; check name against the same forwarded-env allowlist before adding it.
Useful? React with 👍 / 👎.
| .filter((bootstrap) => bootstrap.httpBaseUrl === null || bootstrap.wsBaseUrl === null) | ||
| .flatMap((bootstrap) => { | ||
| const cached = previous.get(bootstrap.id); | ||
| return cached !== undefined && | ||
| cached.expiresAtEpochMs !== undefined && | ||
| nowEpochMs < cached.expiresAtEpochMs | ||
| ? ([[bootstrap.id, cached]] as const) |
There was a problem hiding this comment.
Stop advertising stale WSL URLs while pending
When a desktop-local WSL backend that was previously ready restarts and the desktop reports a pending bootstrap with null endpoints, this retains the old bearer registration until its token expires. That bypasses the pending/null-endpoint state from getLocalEnvironmentBootstraps, so the renderer keeps targeting the stale HTTP/WS URL and reconnecting to a dead port instead of showing the backend as connecting; drop the cached registration for pending bootstraps or mark it pending rather than re-advertising the old target.
Useful? React with 👍 / 👎.
…eam-20260701-ancestry
…eam-20260701-ancestry
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 629046e70a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| { | ||
| "name": "@t3tools/desktop", | ||
| "version": "0.0.27", | ||
| "version": "0.0.28", |
There was a problem hiding this comment.
Record upstream as a merge parent
Fresh evidence for this exact commit: git cat-file -p 0be574cb36f3889e723bb78899cf38b5403ee904 lists only parent a0acab3d..., and git merge-base --is-ancestor 24482123 0be574cb36f3889e723bb78899cf38b5403ee904 exits 1. Since this change is specifically meant to record upstream ancestry for the sync, landing it as a normal version/code-copy commit leaves the upstream release outside the fork history, so GitHub/future syncs still won't get the intended merge base; recreate it as an actual merge commit with upstream as a parent.
Useful? React with 👍 / 👎.
| runs-on: blacksmith-8vcpu-ubuntu-2404 | ||
| # Build on an older glibc baseline so the bundled WSL native addon loads on | ||
| # common Ubuntu 20.04/22.04 WSL distros; N-API covers Node ABI, not libc ABI. | ||
| runs-on: blacksmith-8vcpu-ubuntu-2204 |
There was a problem hiding this comment.
Build WSL prebuilds on the oldest supported distro
In the release workflow's build_wsl_node_pty job, this still builds the bundled pty.node on Ubuntu 22.04 even though the adjacent comment says the binary should load on common Ubuntu 20.04 WSL distros. For Windows users running Ubuntu 20.04 WSL, a native addon produced on a glibc 2.35 baseline can require newer glibc symbol versions than their distro provides, causing the packaged WSL backend preflight to reject the shipped binary; build this artifact on the oldest supported baseline, e.g. Ubuntu 20.04 or an equivalent container, instead of 22.04.
Useful? React with 👍 / 👎.
| "--exec", | ||
| "env", | ||
| `PATH=${launchPath}`, | ||
| ...Object.entries(preflight.resolvedEnv).map(([name, value]) => `${name}=${value}`), |
There was a problem hiding this comment.
Avoid putting WSL credentials in process arguments
When a WSL login shell contains provider credentials such as OPENAI_API_KEY or CURSOR_API_KEY, this expands them into the wsl.exe --exec env NAME=value ... argv. Those command lines are visible to local process inspection while the WSL backend is running, so API keys captured from WSL can leak outside WSL; pass these values via environment, stdin, or the bootstrap payload instead of argv.
Useful? React with 👍 / 👎.
| isDesktopWslBackendExpected: | ||
| desktopWslState?.available === true && | ||
| desktopWslState.enabled && | ||
| !desktopWslState.wslOnly, |
There was a problem hiding this comment.
Gate provider update prompt until expected WSL appears
When WSL is enabled but the secondary backend has not registered yet, this returns true only because isDesktopWslBackendExpected is true, but the mounted environment-flow component still builds rows and isAnySettling solely from useEnvironments(). During that startup window there is no WSL row and the prompt is not gated, so a user can run the primary update before the configured WSL backend is represented and skip updating WSL; add a pending WSL environment/group or keep the notification gated until the expected backend appears or fails.
Useful? React with 👍 / 👎.
… sync/upstream-20260701-ancestry-review-fix
… sync/upstream-20260701-ancestry-review-fix
… sync/upstream-20260701-ancestry-review-fix
a0acab3 to
ced218f
Compare
Merge activity
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 11d3fe9927
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # Build on an older glibc baseline so the bundled WSL native addon loads on | ||
| # common Ubuntu 20.04/22.04 WSL distros; N-API covers Node ABI, not libc ABI. | ||
| runs-on: blacksmith-8vcpu-ubuntu-2204 | ||
| runs-on: blacksmith-8vcpu-ubuntu-2004 |
There was a problem hiding this comment.
Use a supported runner for the WSL prebuild job
Checked Blacksmith's Instance Types docs, which list x64 Ubuntu 24.04/22.04 runner tags such as blacksmith-8vcpu-ubuntu-2404 and blacksmith-8vcpu-ubuntu-2204, but no ubuntu-2004 tag: https://docs.blacksmith.sh/blacksmith-runners/overview. As written, this release job will remain queued or fail runner selection before it can build the WSL pty.node; keep the supported Blacksmith runner and build inside a 20.04 container, or use a real supported 20.04 runner label.
Useful? React with 👍 / 👎.

What Changed
Merges upstream
mainon top of the ported downstream changes so the fork becomes 0 commits behind upstream once the stack lands. Includes upstream package version bumps to0.0.28.Why
This records the upstream ancestry after the fork-specific sync slices, making the final stack state match upstream while preserving the fork's local changes.
UI Changes
No additional UI changes beyond the upstream changes already isolated in the lower stack PRs.
Checklist
vp checkvp run typecheckvp run lint:mobilevp testhad one ACP timeout flake; rerunningapps/server/src/provider/acp/AcpJsonRpcConnection.test.tspassed