fix(desktop): upgrade Electron for the macOS GPU sandbox fix#28123
Problem
Current main pins Electron 44.10.1 / Chromium 152 and lacks Chromium's macOS GPU TCC-responsibility fix. The upstream fix prevents a GPU child from inheriting an authorized parent's TCC context when the browser is launched directly. Exploitation also requires a browser-process compromise; this PR does not claim that an arbitrary page alone can execute commands.
Change
Upgrade the desktop runtime to Electron 45.2.3 / Chromium 156.0.8078.80, including its exact release-age exception and lockfile.
- Update
node-abito 4.40.0 so native rebuilds recognize Electron 45's ABI 150. - Remove the Node events/timers/url shims from the preload verifier to match Electron 45's sandbox, and cover all six removed import names in the existing verifier tests.
- Merge current upstream
main(0d3b01a8884b) and resolve the dependency-file conflicts.
Status, 2026-11-05: the upstream runtime concern that prompted the earlier hold no longer reproduces on 45.2.3, and the private report has been updated with that verification. The upstream hold is cleared. GitHub CI passed on cd5b03f083; CodeRabbit reported no actionable findings on that commit. Maintainer review and the remaining validation listed below are still outstanding. Private report details are not disclosed here.
References: Chromium GPU/TCC fix, research and prerequisites, Electron 45.2.3, Electron 45 breaking changes.
Scope and approval
Submitted under the focused-fix exception for a specific upstream security-runtime defect. The ABI and verifier changes are required compatibility work for that same upgrade. No product defaults, UI design, shared contracts, or unrelated application behavior are intentionally changed. No prior maintainer approval is claimed.
Verification
Fresh validation of cd5b03f083 on macOS 27.0.1 / Apple Silicon:
vp run check:changed upstream/mainpasses: formatting, lint, unused patches, knip, affected typechecks, and all 10 selected tests across 2 files.vp run dist:desktop:artifact --platform mac --target dir --arch arm64succeeds. This builds desktop/server/web bundles, rebuilds native dependencies for Electron 45.2.3, generates server bytecode using the packaged runtime, and validates the macOS payload.- The unsigned packaged app starts its backend, migrates the repository's launch-fixture database, opens “Release launch check,” and renders its saved message. Both the Electron-driven check and the Playwright check passed.
- All four packaged preload bundles load in hidden BrowserWindows with sandbox and context isolation enabled, with no preload errors. The desktop bridge, Clerk passkey bridge, and picture-in-picture bridge are exposed as expected.
- Runtime reports Electron 45.2.3, Chromium 156.0.8078.80, Node 24.22.2, and ABI 150. The verified official 45.2.3 framework contains
MacDisclaimGpuTccResponsibility; 44.10.1 does not. This is source/version evidence, not an exploit-chain reproduction.
The smoke fixture uses an isolated database and Chromium profile. Before application entry, inspector instrumentation redirects the process's home-path lookup and stubs OS credential-storage availability to false; packaged files are unchanged. Without that credential-storage stub, the unsigned app's keychain check stalled. These results do not validate macOS keychain integration, signed authentication/passkeys, recording/capture permissions, Windows/Linux, or an exploit chain. Those remain release/maintainer checks.
The existing standalone VM preload verifier lacks a DOM for the macOS preload path; the real sandboxed packaged-runtime checks above cover the bundles instead. The installed T3 Code app was not modified.
Model: GPT-6-Astra. Harness: Codex in T3 Code.
Checks
Added 1 commit
- fix(desktop): upgrade Electron for the macOS GPU sandbox fix97d8c58
Approvability
Verdict: Approved at 97d8c58
Macroscope's review found this PR approvable — This supports the Electron sandbox fix with an updated ABI dependency and stricter preload validation. Reported sandboxed-runtime smoke testing provides relevant compatibility evidence, with no product-default or permission expansion identified.
You can add or adjust custom eligibility rules. Learn more.
No actionable comments were generated in the recent review.
Walkthrough
-
The desktop app now uses Electron 45.2.3, with an updated
node-abioverride. The preload verifier rejects six Node module imports, and its tests cover the updated import rules.Changes: Desktop runtime updates
Layer / File(s) Summary Electron and ABI version updates
apps/desktop/package.json,pnpm-workspace.yamlThe desktop Electron dependency changed to 45.2.3. Thenode-abioverride changed to4.40.0, andelectron@45.2.3was added to the minimum-release-age exclusion list.Preload verifier import rules
apps/desktop/scripts/verify-preload-bundle.mjs,apps/desktop/scripts/verify-preload-bundle.test.mjsThe verifier no longer accepts events,node:events,timers,node:timers,url, ornode:urlas sandbox imports. Tests confirm these imports are rejected and thatelectron/commonandelectron/rendererare accepted.Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related issues
- pingdotgg/t3code#25625: The Electron runtime update is relevant to the reported crash context, but this change does not claim to fix the Linux X11 lifetime fault.
- pingdotgg/t3code#24094: The Electron update uses Chromium 156, while the reported screenshot crash requires a Chromium 157 fix.
Suggested reviewers:
valuin,juliusmarminge,nabettu
Merge Risk: External image Minimal · up to cd5b0
-
The Electron upgrade has no identified merge-blocking issue. Signed authentication and Windows/Linux validation remain outstanding.
Pre-merge checks: Passed 4
-
Check name Status Explanation Title check Passed The title clearly identifies the main change: upgrading Electron to address the macOS GPU sandbox fix. Linked Issues check Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request. Description check Passed The description follows the repository template closely. It has Problem, Change, Scope and approval, and Verification sections, and each contains specific, substantive content. The Problem section sta… Full details: Description check
-
Explanation
The description follows the repository template closely. It has Problem, Change, Scope and approval, and Verification sections, and each contains specific, substantive content. The Problem section states the Electron 44.10.1 / Chromium 152 pin and the missing macOS GPU TCC-responsibility fix. The Change section lists the Electron 45.2.3 upgrade, the node-abi 4.40.0 update, and the preload verifier shim removal. The Verification section reports concrete commands, platform, and observed results, and it states what was not validated. The Scope and approval section uses the focused-fix exception and states that no prior maintainer approval is claimed. The template's Verification guidance applies to UI changes, and this PR changes no UI, so the lack of screenshots is not a gap. The description does not include the template's closing line naming the model and harness, but the author does provide it (Model: GPT-6-Astra. Harness: Codex in T3 Code.), so that item is covered. The description's status section also records a hold cleared on 2026-11-05 and cites CI and CodeRabbit state that may change; this is context, not a template gap.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Tip
🎯 Customize your risk assessments
-
Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.
✅ Automatic approvals, with your rules
-
Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.
External image Recent review info
-
External image Run configuration
-
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: 0d3b01a
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
c8004963-0868-4ae9-9fd4-3d09e5f25b87
External image Commits
-
Reviewing files that changed from the base of the PR and between 97d8c58a3330d7fc1518ddf218cad860c3a751d4 and cd5b03f083dd9c6c84c2e750af48c6cba66db438.
External image Files ignored due to path filters: 1
-
pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
External image Files selected for processing: 2
-
apps/desktop/package.jsonpnpm-workspace.yaml
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
External image Recent review info
-
External image Run configuration
-
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: 0d3b01a
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
c8004963-0868-4ae9-9fd4-3d09e5f25b87
External image Commits
-
Reviewing files that changed from the base of the PR and between 97d8c58a3330d7fc1518ddf218cad860c3a751d4 and cd5b03f083dd9c6c84c2e750af48c6cba66db438.
External image Files ignored due to path filters: 1
-
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
External image Files selected for processing: 2
-
apps/desktop/package.jsonpnpm-workspace.yaml
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
-
Update, 2026-11-05: this hold has been cleared. The PR now targets Electron 45.2.3; see the new validation and status update. The original hold notice below is retained for context.
Status update: this upgrade is on hold pending upstream Electron assessment.
The macOS GPU/TCC fix remains outstanding on current main. While evaluating a newer Electron runtime, I found a regression that needs upstream assessment before proceeding. A report has now been submitted privately under Electron's reporting policy. I will link public upstream tracking when it becomes available; the private report's details are not included here.
This PR remains open. Once upstream resolves the concern, I will refresh it against current main, select the appropriate released Electron version, and rerun packaged-app validation and CI before requesting merge. The existing 45.2.1 verification does not cover a newer runtime.
Added 1 commit
- fix(desktop): refresh Electron upgrade to 45.2.3cd5b03f
Update (2026-11-05): upstream hold cleared; refreshed to Electron 45.2.3.
Pushed cd5b03f083, merging current main and resolving the dependency conflicts. The upstream runtime concern no longer reproduces on 45.2.3, and the private report now records the passing result.
Fresh validation passes:
vp run check:changed upstream/main(including all 10 selected tests).- Unsigned macOS arm64 packaging, native dependency rebuilds, and packaged server bytecode generation.
- Packaged-app startup and rendering the repository's seeded thread, through both Electron and Playwright.
- All four packaged preloads under sandbox/context isolation, with no preload errors.
The launch fixture isolates app data and disables OS credential-storage availability to avoid the unsigned app's keychain stall. Signed authentication/passkeys, keychain integration, recording permissions, and Windows/Linux remain unverified; the PR body records these limits.
GitHub reports the branch as conflict-free. CI is queued, and fresh CI/review results are still pending.
Worker16 independent macOS Electron-runtime review — exact candidate
Candidate: T3 PR #28123, author Hypermaker2, fork branch fix/electron-45-macos-sandbox, exact HEAD cd5b03f083dd9c6c84c2e750af48c6cba66db438 → main. Reviewed all five changed paths:
apps/desktop/package.jsonapps/desktop/scripts/verify-preload-bundle.mjsapps/desktop/scripts/verify-preload-bundle.test.mjspnpm-lock.yamlpnpm-workspace.yaml
Source review
No P1/P2 source defect was demonstrated.
- The desktop dependency, lockfile importer/snapshot and workspace metadata consistently pin Electron 45.2.3. The matching
node-abi@4.40.0override/lockfile update is scoped to the ABI transition (ABI 150 as reported by the author). The release-age exception is limited to the exactelectron@45.2.3package, not a broad minimum-age policy bypass. - The preload verifier removes the
events,timersandurlNode shims (both bare andnode:aliases) from the sandbox module map. Its AST inspection still rejects dynamic imports and nonliteral/dynamicrequirecalls, and the runtime check rejects unsupported imports before executing the preload in the isolated verifier. - The added regression covers all six removed import aliases. The normal Build and Typecheck job actually executes
node apps/desktop/scripts/verify-preload-bundle.mjsagainst the built preload output, so the changed verifier is not only a standalone unit fixture. - The root
AGENTS.mdanddocs/internals/testing.mdwere read at candidate HEAD and are byte-identical to current main. No nestedapps/desktop/AGENTS.mdorapps/desktop/scripts/AGENTS.mdexists.
Exact-head CI
Normal PR workflow #42105105479 succeeded on this exact candidate:
scripts/verify-preload-bundle.test.mjs: 8/8.- Test job: SUCCESS; selected package suites include the changed verifier test.
- Build and Typecheck: SUCCESS; the actual preload verifier command ran successfully.
- Lint, Rust, Test Web, Release Smoke and aggregate Check: SUCCESS.
- Agent Context Budget and Mobile Fingerprint: SUCCESS.
- Mobile Native Static Analysis, Web Preview, Mobile EAS Preview and relay preview: SKIPPED, not passed.
Platform evidence and remaining qualification
The author reports unsigned macOS arm64 packaging, native dependency rebuilds, packaged startup/thread rendering and all four packaged preloads loading under sandbox/context isolation. This is author-provided evidence, not independently reproduced by Worker16. Signed keychain/passkeys, capture/recording permissions, Windows/Linux packaged acceptance and an exploit-chain reproduction remain NOT RUN. These are accurately bounded release/maintainer gates, not a blanket source-merge veto.
Fresh compare: current T3 main is 0ea3c0243fb5b3c07bb8c2bad01c1d3d0f5fde35; this candidate is 2 commits ahead / 7 behind its current main. The intervening 7-commit main delta (65 changed paths) touches none of the five PR paths. The observed normal CI is still on the recorded PR base 0d3b01a8884b5ebbe42705ccfbbf15b0e8b039e2, not a current-main-composed head; the existing upstream landing owner should require normal exact-head qualification after forward-syncing to current main.
Disposition: APPROVED for scoped source correctness at exact HEAD. This is not current-main CI qualification, signed-platform acceptance, maintainer approval, merge authorization or landing custody. Hypermaker2 retains all five paths and the fork branch. Worker16 performed review only: no source edit, CI dispatch, install, release, deployment or merge.
This PR conflicts with main. Rebase it or merge main into it. If it still conflicts after 7 days with no activity, it will be closed automatically.
See the conflict window.