Add profile picker to cookie import UI#121
Closed
ngurney wants to merge 2 commits intogarrytan:mainfrom
Closed
Conversation
Chromium-based browsers support multiple profiles, each with its own cookie store. The previous implementation always read from the 'Default' profile, making it impossible to import cookies from non-default profiles (e.g. a work or freelance profile in Arc or Chrome). Changes: - cookie-import-browser.ts: add `listProfiles()` which scans a browser's data directory for profile subdirs (Default, Profile N) that have a Cookies file, reads the display name from each profile's Preferences JSON, and returns `ProfileInfo[]` sorted Default-first - cookie-picker-routes.ts: expose GET /cookie-picker/profiles?browser= endpoint; thread an optional `profile` query/body param through the /domains and /import routes - cookie-picker-ui.ts: after selecting a browser, load its profiles and render a row of monospace profile pills (hidden when only one profile exists); switching profiles reloads the domain list; the selected profile id is sent with import requests - write-commands.ts: support --profile flag in direct CLI import mode (cookie-import-browser <browser> --domain <d> --profile "Profile 1") Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
For Chromium profiles signed into a Google account, prefer account_info[0].email over the generic profile.name (e.g. 'Person 2'). The email is more distinctive when a user has multiple profiles signed into different accounts. Falls back to profile.name, then directory id. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
|
Closing in favour of #65 which covers the same ground and adds an Import All button + fixes findInstalledBrowsers() detection. One thing worth adding to #65: for Chrome profiles signed into a Google account, const email = prefs?.account_info?.[0]?.email;
if (email) return email;
return prefs?.profile?.name ?? null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Chromium-based browsers support multiple profiles, each with its own cookie store. The cookie picker always read from the `Default` profile, making it impossible to import cookies from other profiles (e.g. a work or personal Arc/Chrome profile where your dev app session lives).
Solution
After selecting a browser, the picker now loads its available profiles and shows a row of profile pills. Switching profiles reloads the domain list. The selected profile is sent with import requests.
Profile display names are read from each profile's `Preferences` JSON (the same name shown in the browser's profile switcher), falling back to the directory name if unavailable.
Changes
Behaviour
🤖 Generated with Claude Code