Skip to content

Record upstream ancestry for July sync#135

Merged
aaditagrawal merged 77 commits into
mainfrom
sync/upstream-20260701-ancestry
Jul 3, 2026
Merged

Record upstream ancestry for July sync#135
aaditagrawal merged 77 commits into
mainfrom
sync/upstream-20260701-ancestry

Conversation

@aaditagrawal

@aaditagrawal aaditagrawal commented Jul 1, 2026

Copy link
Copy Markdown
Owner

What Changed

Merges upstream main on top of the ported downstream changes so the fork becomes 0 commits behind upstream once the stack lands. Includes upstream package version bumps to 0.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

  • Part 6 of the upstream sync stack
  • Validation on stack tip: vp check
  • Validation on stack tip: vp run typecheck
  • Validation on stack tip: vp run lint:mobile
  • Full vp test had one ACP timeout flake; rerunning apps/server/src/provider/acp/AcpJsonRpcConnection.test.ts passed

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 31530ba4-0191-4f4d-971e-a762735346e0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sync/upstream-20260701-ancestry

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

aaditagrawal commented Jul 1, 2026

Copy link
Copy Markdown
Owner Author

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 effective changed lines (test files excluded in mixed PRs). labels Jul 1, 2026
@aaditagrawal aaditagrawal changed the title Stabilize chat scroll anchoring after send (#3564) Record upstream ancestry for July sync Jul 1, 2026
@aaditagrawal aaditagrawal marked this pull request as ready for review July 2, 2026 12:53
@aaditagrawal

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

aaditagrawal and others added 10 commits July 3, 2026 00:00
…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
@github-actions github-actions Bot added size:XL 500-999 effective changed lines (test files excluded in mixed PRs). and removed size:L 100-499 effective changed lines (test files excluded in mixed PRs). labels Jul 2, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread apps/desktop/package.json
{
"name": "@t3tools/desktop",
"version": "0.0.27",
"version": "0.0.28",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +299 to +300
const error = recordingStartupCancelledError(recording, cause);
rejectStartup(error);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +366 to +370
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");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment thread apps/web/src/connection/platform.ts Outdated
Comment on lines +476 to +482
.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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread apps/desktop/package.json
{
"name": "@t3tools/desktop",
"version": "0.0.27",
"version": "0.0.28",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment thread .github/workflows/release.yml Outdated
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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}`),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +42 to +45
isDesktopWslBackendExpected:
desktopWslState?.available === true &&
desktopWslState.enabled &&
!desktopWslState.wslOnly,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@aaditagrawal aaditagrawal changed the base branch from graphite-base/135 to sync/upstream-20260701-claude-sonnet-5 July 3, 2026 08:14
@graphite-app graphite-app Bot changed the base branch from sync/upstream-20260701-claude-sonnet-5 to graphite-base/135 July 3, 2026 08:23
@aaditagrawal aaditagrawal changed the base branch from graphite-base/135 to main July 3, 2026 08:28

Copy link
Copy Markdown
Owner Author

Merge activity

  • Jul 3, 8:29 AM UTC: Graphite couldn't merge this PR because it had merge conflicts.

@aaditagrawal aaditagrawal merged commit 5373c22 into main Jul 3, 2026
12 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants