Skip to content

simplify: companion just works with your logins, no flags#45

Merged
Anton-Horn merged 2 commits into
mainfrom
feat/companion-copy-profile
Jun 4, 2026
Merged

simplify: companion just works with your logins, no flags#45
Anton-Horn merged 2 commits into
mainfrom
feat/companion-copy-profile

Conversation

@Anton-Horn
Copy link
Copy Markdown
Contributor

@Anton-Horn Anton-Horn commented Jun 4, 2026

Problem

browser connect had 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 connect clones 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.
  • Everything else is demoted to advanced flags: --live (drive the real profile in place; logins sync back but you must quit Chrome), --fresh, --cdp, --chromium, --user-data-dir, --profile.
  • Help text now leads with "just run it" and tucks advanced flags below.

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 --live for that).

Builds on #43 / #44.

Testing

tsc --noEmit clean, bun build.ts succeeds. Not yet exercised end-to-end against a live Chrome.

🤖 Generated with Claude Code

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.
@Anton-Horn Anton-Horn changed the title feat: add --copy-profile mode to companion simplify: companion just works with your logins, no flags Jun 4, 2026
@Anton-Horn Anton-Horn merged commit dc4230c into main Jun 4, 2026
2 checks passed
@Anton-Horn Anton-Horn deleted the feat/companion-copy-profile branch June 4, 2026 14:21
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