Skip to content

fix(server): load Cursor keyring with createRequire - #13678

Merged
Yash-Singh1 merged 2 commits into
mainfrom
fix/cursor-keyring-release-build
Sep 25, 2026
Merged

Yash-Singh1 merged 2 commits into
mainfrom
fix/cursor-keyring-release-build

Conversation

@Yash-Singh1

@Yash-Singh1 Yash-Singh1 commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

What Changed

Load @napi-rs/keyring with createRequire when reading Cursor credentials.

Why

The package's dynamic import failed in release builds. Resolving it with the server module's createRequire keeps Cursor keyring access working in packaged builds.

UI Changes

Not applicable.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Summary by CodeRabbit

  • Bug Fixes
    • Cursor connections on macOS now use an updated approach to access saved credentials. This may make credential retrieval more consistent during connection setup. The change does not alter how credentials are saved or managed, and no change to the connection workflow is required. Other platforms and credential-related behavior are unchanged.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Sep 25, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This focused server fix changes how Cursor access tokens are loaded from the macOS Keychain in packaged builds. Because it affects authentication-sensitive credential handling, the runtime change warrants human review.

No code changes detected at 1e3532b. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

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: Team

Run ID: fa8ceaa7-b503-4527-a00d-250be57a4936

📥 Commits

Reviewing files that changed from the base of the PR and between 1a0c915 and 1e3532b.

📒 Files selected for processing (1)
  • apps/server/src/provider/cursorCredentialStore.ts

Included review availability: 9 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour.


📝 Walkthrough

Walkthrough

The Cursor credential store now loads @napi-rs/keyring synchronously with a module-scoped require function instead of using await import().

Changes

Cursor credential loading

Layer / File(s) Summary
Module-scoped keyring loading
apps/server/src/provider/cursorCredentialStore.ts
The module creates a require function from import.meta.url. readMacCursorAccessToken uses it to load @napi-rs/keyring.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Suggested reviewers: maria-rcks

Merge Risk: ⚪ Minimal · up to 1e353

The packaged server can resolve the Cursor keyring dependency, and keyring read failures degrade gracefully. No actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description explains what changed and why, identifies the release-build issue, and states that UI changes are not applicable. It also confirms that the PR is small and focused.
Title check ✅ Passed The title clearly and concisely identifies the server fix: loading the Cursor keyring with createRequire.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 13.5 KiB −8 B (−0.1%) 15.1 KiB ✅
Codex Thread snapshot wire 7.1 KiB 7.1 KiB +3 B (+0.0%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.5 KiB 6.4 KiB −11 B (−0.2%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 56.3 KiB 56.2 KiB −44 B (−0.1%) 66.4 KiB ✅
Codex Live turn messages 10 9 −1 (−10.0%) 21 ✅
Claude Total thread wire 13.5 KiB 13.5 KiB −30 B (−0.2%) 15.1 KiB ✅
Claude Thread snapshot wire 7.1 KiB 7.1 KiB −5 B (−0.1%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.5 KiB 6.4 KiB −25 B (−0.4%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 57.0 KiB 57.0 KiB 0 B (0.0%) 66.4 KiB ✅
Claude Live turn messages 9 9 0 (0.0%) 21 ✅

Baseline: 1a0c915 · PR result: 1e3532b · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 114.0 KiB
  • Claude decoded thread snapshot: 114.7 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@Yash-Singh1
Yash-Singh1 merged commit f5bd2fd into main Sep 25, 2026
23 checks passed
@Yash-Singh1
Yash-Singh1 deleted the fix/cursor-keyring-release-build branch September 25, 2026 20:17
@Yash-Singh1
Yash-Singh1 restored the fix/cursor-keyring-release-build branch September 25, 2026 20:17
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 25, 2026
## What's Changed
* feat(usage): read cursor, opencode, and antigravity history by @maria-rcks in pingdotgg/t3code#10409
* fix(sqlite): retry failed statement preparations by @yashranaway in pingdotgg/t3code#10584
* fix(mobile): scale Android controls with appearance text size by @none23 in pingdotgg/t3code#13356
* fix(web): return focus to the composer after saving a citation note by @mackinleysmith in pingdotgg/t3code#13450
* feat(observability): honor the standard OTLP endpoint, headers, and protocol variables by @yordis in pingdotgg/t3code#13492
* fix(terminal): settling a thread closes its idle shells by @t3dotgg in pingdotgg/t3code#13673
* fix(server): load Cursor keyring with createRequire by @Yash-Singh1 in pingdotgg/t3code#13678
* perf(server): avoid rereading unchanged files in review previews by @shivamhwp in pingdotgg/t3code#13395


**Full Changelog**: pingdotgg/t3code@v0.0.43-nightly.20260925.2251...v0.0.43-nightly.20260925.2269

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.43-nightly.20260925.2269
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). 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.

1 participant