Skip to content

fix: mirror Electron profile path in environment - #35

Open
thomast8 wants to merge 1 commit into
Ducksss:mainfrom
thomast8:agent/electron-user-data-env-hardening
Open

fix: mirror Electron profile path in environment#35
thomast8 wants to merge 1 commit into
Ducksss:mainfrom
thomast8:agent/electron-user-data-env-hardening

Conversation

@thomast8

Copy link
Copy Markdown

Summary

  • Mirror each named ChatGPT profile's Electron data directory through CODEX_ELECTRON_USER_DATA_PATH.
  • Keep --user-data-dir as the explicit Chromium/Electron argument so both desktop path-selection mechanisms resolve to the same directory.
  • Add regression coverage that named launches set both mechanisms while app default remains unchanged.

Why

The integrated ChatGPT desktop bundle can consult its Electron data path through app environment state as well as Chromium arguments. Supplying only --user-data-dir leaves those two path-selection mechanisms inconsistent. Mirroring the same managed profile directory closes that gap without copying tokens, cookies, or app bundles.

Testing

  • make check
  • Live macOS verification against the active secondary ChatGPT process:
    • CODEX_HOME matched the secondary profile home
    • CODEX_ELECTRON_USER_DATA_PATH matched the same profile's Electron directory
    • the process command line used the matching --user-data-dir

Scope and compatibility

  • Affected scope: named Desktop profiles only.
  • app default continues to use the stock ChatGPT session without a custom Electron directory.
  • Compatibility impact: no command or storage migration; this adds an environment mirror for the directory already selected by --user-data-dir.

Checklist

  • I ran make check; if the environment lacks ShellCheck, I ran make test and documented the missing lint result instead.
  • I did not add code that reads, copies, prints, parses, uploads, compares, or migrates auth tokens or ChatGPT cookies.
  • Desktop changes preserve the stock app default session and use the original signed app bundle.
  • I did not claim that CLI and Desktop account equality can be inspected or verified.
  • I updated documentation for user-facing behavior changes.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@thomast8, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e1193120-da9a-4e20-a92a-2baeb4448225

📥 Commits

Reviewing files that changed from the base of the PR and between b0df2dd and b527c7a.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • README.md
  • bin/codex-profile
  • test/cli/desktop-test.sh
  • test/lib/cli-fixtures.sh
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@thomast8
thomast8 marked this pull request as ready for review July 21, 2026 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant