simplify: companion just works with your logins, no flags#45
Merged
Conversation
Driving the real Chrome profile requires quitting Chrome first, since Chrome locks a profile while it's open. --copy-profile clones the profile (Local State + the named profile subdir, minus caches and singleton lock files) into ~/.zero/chrome-profile-copy and launches against the copy, so the user's normal Chrome can stay open. Trade-off: the copy is a point-in-time snapshot — sessions are as of launch and don't sync back. On macOS cookies still decrypt because the Safe Storage key lives in the login keychain. The copy is refreshed on every start so sessions stay reasonably current.
…ault browser connect had grown a confusing flag matrix and a default that threw a profile-lock error unless the user quit Chrome — bad for the non-technical users who'll actually run this. Make the no-flag path just work: clone the profile and launch against the copy, so `zero browser connect` opens Chrome with the user's logins and their normal Chrome can stay open. No flags, no quitting, no lock errors. Demote the rest to advanced flags: --live (drive the real profile in place, must quit Chrome), --fresh, --cdp, --chromium, --user-data-dir, --profile. Help now leads with "just run it" and tucks these below.
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
browser connecthad grown a confusing flag matrix, and the default mode threw a Chrome profile-lock error unless the user fully quit Chrome first. That's bad UX for the non-technical users who will actually run this.Change
Make the no-flag path just work:
zero browser connectclones your Chrome profile and launches against the copy, so it opens with your existing logins and your normal Chrome can stay open — no quitting, no lock errors, zero config.--live(drive the real profile in place; logins sync back but you must quit Chrome),--fresh,--cdp,--chromium,--user-data-dir,--profile.The clone copies
Local State+ the profile subdir, skipping caches and singleton lock files; refreshed each start. On macOS cookies still decrypt (Safe Storage key is in the login keychain). Snapshot trade-off: logins made after launch don't sync back (use--livefor that).Builds on #43 / #44.
Testing
tsc --noEmitclean,bun build.tssucceeds. Not yet exercised end-to-end against a live Chrome.🤖 Generated with Claude Code