GeezerVison is showing github.com — fix(desktop): register Windows OAuth callbacks with the app entry point by AskPlays · Pull Request #15995 · pingdotgg/t3code
Conversation
AskPlays
commented
Oct 5, 2026
•
edited by juliusmarminge
Loading
Uh oh!
There was an error while loading. Please reload this page.
Windows OAuth callbacks in unpackaged production runs could launch bare Electron with the callback URL as its app path, producing “Unable to find Electron app.” After Clerk initializes, register the callback with the running Electron executable and the absolute dist-electron/main.cjs entry. Development remains excluded because this OS launch command cannot restore the development server environment.
Thanks @AskPlays for the diagnosis and original fix in #15995. This maintainer takeover preserves contributor history and merges current main, including its earlier single-instance locking behavior. The implementation stays focused on unpackaged, non-development Windows runs.
Verification on headless Linux:
DesktopClerk.test.ts: 20 → 23 tests. Replaced the two outdated PR cases with five parameterized registration-boundary cases covering the Windows path (including spaces), executable, scheme, bridge ordering, and development/packaged/macOS/Linux exclusions.
- Before: main’s production code passes 22 tests and fails the Windows registration regression. After: all 23 pass.
- Desktop typecheck, targeted lint, formatting, and whitespace checks pass. Electron executable-path lookup is bypassed for tests; no Electron process launches.
The original author reported a successful Windows reproduction and fix. This takeover could not repeat actual Windows registry registration or OAuth callback delivery. Verification here covers the mocked Electron API boundary and startup code paths. Human approval and a Windows unpackaged production callback test remain required. Windows, macOS, iOS, Android, and Electron desktop were not exercised live; this change does not alter web/mobile authentication.
Implementation: GPT-6.1-Sol; tests: GPT-6-Astra; independent reviews: Claude Opus 5.5 and GPT-6-Sol. Orchestrated in T3 Code through the Codex harness.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Not approved
Macroscope's review found this PR not approvable — This change modifies Windows OAuth callback registration on a production desktop startup path and applies to unpackaged development runs as well as non-development runs. An unresolved high-severity finding indicates development callbacks may launch the production instance without the development environment, requiring runtime review.
Not approved because:
- 1 blocking correctness issue found at or above your repo's Minimum Blocking Severity
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Oct 5, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

Warning
Review limit reached
Only developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing.
Next included review available in 12 minutes.
Check out review usage here.
View limit details
-
Limit details: You’ve used all 10 included reviews currently available.
Learn how review limits work.
Review configuration:
⚙️ Run configuration
-
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Advanced
- Run ID:
4c108162-3adf-46e3-9e2c-27e973eed402
📥 Commits
-
Reviewing files that changed from the base of the PR and between 60dea87 and beb7f5e.
📒 Files selected for processing: 2
-
apps/desktop/src/app/DesktopClerk.test.ts
apps/desktop/src/app/DesktopClerk.ts
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
- Review profile: CHILL
- Plan: Advanced
- Run ID:
b9bc29ed-6d16-48ed-b777-a90855cd6653
📥 Commits
-
Reviewing files that changed from the base of the PR and between cf3e714 and 60dea87.
📒 Files selected for processing (2)
-
apps/desktop/src/app/DesktopClerk.test.ts
apps/desktop/src/app/DesktopClerk.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
-
Unpackaged Windows runs now register the t3code protocol with the Electron executable and the distribution main.cjs entry point. A test checks the registration behavior in development and non-development modes.
Changes: Windows protocol registration
| Layer / File(s) |
Summary |
Protocol registration and test apps/desktop/src/app/DesktopClerk.ts, apps/desktop/src/app/DesktopClerk.test.ts |
For unpackaged, non-development Windows runs, DesktopClerk.configure registers t3code with process.execPath and the distribution main.cjs entry point. The test checks that development mode makes no registration call and that non-development mode uses those arguments. |
Priority: ➖ Normal
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers: juliusmarminge
Merge Risk: ⚪ Minimal · up to 60dea
-
The Windows OAuth callback registration appears ready to merge after normal checks; no actionable issue remains in the supplied evidence.
Security Architecture Review
-
Security architecture risk: 🔵 Low · up to 60dea
The change is narrowly limited to unpackaged Windows sign-in callbacks. The executable and application entry point are selected by the running application, while existing URL and sign-in flow checks remain in place. Registration failure, persistence and cleanup behavior could not be fully verified.
Retained concerns
No architecture-level concerns identified.
Security review details
-
Security Blast Radius
- inferred — The direct exposure change is restored browser-to-desktop callback reachability in the targeted Windows configuration. Existing provider handoffs can subsequently reach a target provider flow; the change does not itself supply new credentials, select a different executable from URL input, or remove the inspected flow controls. Exact OS registration scope remains unverified.
Trust Boundaries and Controls
- observed — The inspected Codex path constrains authorization URLs to OpenAI, requires a loopback redirect and PKCE/state shape, and checks callback origin, path and state. Server completion requires a matching active owner and flow ID, an unexpired waiting flow, and callback acceptance. The Codex completion callback rejects reuse. These controls predate this PR; external Clerk callback validation was not inspected.
Resilience and Maintainability Implications
- observed — The existing Codex callback helper binds only to loopback, rejects duplicate active state values, bounds the wait to five minutes, and closes its listener in finally. These containment measures remain unchanged by the registration fix.
Hardening Proposals
- proposed — Make registration failure distinguishable from successful callback setup, and document ownership and recovery expectations for the persistent Windows mapping. Validate overwrite failure, interruption, restart and cleanup against the actual SDK and OS behavior before treating the transition as rollback-safe.
Pre-merge checks: 5
-
| Check name |
Status |
Explanation |
| Docstring Coverage |
 |
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
| Title check |
 |
The title clearly and concisely describes the Windows OAuth callback registration fix. |
| Description check |
 |
The description explains the problem, implementation, scope, verification results, limitations, and tooling in sufficient detail. It does not use the template headings and does not provide explicit ma… |
Full details: Docstring Coverage
-
Explanation
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.
Full details: Description check
-
Explanation
The description explains the problem, implementation, scope, verification results, limitations, and tooling in sufficient detail. It does not use the template headings and does not provide explicit maintainer approval evidence, but the focused fix and linked prior PR provide adequate context.
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Oct 12, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
⚠️ Action not completed
Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.
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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Oct 12, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
✅ Action performed
Full review finished.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Taking over this one as maintainer for desktop-app-03. I will preserve contributor history, merge main, keep development excluded from protocol registration, and run focused verification plus independent reviews. No merge is planned.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…ry-point
# Conflicts:
# apps/desktop/src/app/DesktopClerk.ts
Uh oh!
There was an error while loading. Please reload this page.
|
Reverting this in #22222 together with the other desktop fixes the takeover campaign merged yesterday. Nothing was wrong with the review of this change; it was merged on CI and code audits only, and after #20907 from the same batch broke existing installs the maintainer decided that desktop changes do not ship without being run on a real desktop build. To bring it back: open a fresh PR from the original commit, run it on a real build that already has user state on each platform it touches, and put the before/after proof in the body.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Labels
size:S
10-29 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|