Skip to content

feat(browser): keep selected logins synced - #4452

Merged
reachjalil merged 9 commits into
devfrom
feature/browser-login-import
Sep 6, 2026
Merged

reachjalil merged 9 commits into
devfrom
feature/browser-login-import

Conversation

@reachjalil

@reachjalil reachjalil commented Sep 4, 2026 •

Copy link
Copy Markdown
Member

Problem

Most browser work stops at a login wall. Signing in separately inside OpenWork also drifts as the source browser rotates or removes its session.

What changes

  • Personal Desktop users explicitly choose one supported browser profile and individual sites to keep signed in. Finance, email, and identity sites remain unchecked by default.
  • OpenWork performs one-way live sync into the shared persist:openwork-browser partition, so the login is available to visible and background conversations and Desktop Automations.
  • A metadata-only preview avoids reading cookie values. Continuing reads select only the chosen registrable sites and HttpOnly rows. Source databases are copied to a stable temporary snapshot and never written.
  • Settings shows the source, selected sites, last success, status, Sync now, pause/resume, per-site stop and sign-out, and disconnect-and-forget. Source deletion removes only identities managed by sync; incomplete reads never drive deletion.
  • Discovery, metadata read, exact-site enrollment, and resume require native confirmation. Persisted enrollment restarts paused.
  • New @openwork/browser-logins owns profile discovery, Chromium/Firefox readers, macOS Chromium decryption, tldts site grouping, sensitivity defaults, and Electron cookie mapping.

Managed Desktop boundary

Organization-managed and enterprise-required Desktop contexts are disabled in this PR. Main-process installation state enables personal Desktop sync; renderer code can only revoke access with disableForManagedContext and cannot assert an allow decision. A trusted Den policy channel and deploy-before-consume rollout remain a follow-up.

Safety boundary

Cookie values stay in the Electron main process: they are absent from persisted state, IPC responses, renderer state, and logs. Production accepts discovered source IDs rather than renderer paths. The eval-only source writer and value-free witness require an explicit isolated-Electron environment flag and temporary paths. Windows Chromium app-bound encryption and Safari Full Disk Access are not bypassed.

Proof

Overall verdict: Incomplete on 0802e543cf4cc7389f6024aad8f38115212d62f6.

Rebased onto dev at f58b627c993b981fe16bfa2723665e57c2811844. Resolved the single pnpm-lock.yaml conflict by retaining both upstream telemetry contracts and browser-login dependencies. No intended feature behavior changed.

Current-head checks:

  • Frozen-lockfile offline install passed for browser-logins and Desktop.
  • pnpm --filter @openwork/browser-logins test: 14 passed, 0 failed.
  • node --test apps/desktop/electron/browser-login-sync.test.mjs: 9 passed, 0 failed, 0 skipped after installing Desktop dependencies (initial attempt could not resolve the workspace package).
  • pnpm --filter @openwork/browser-logins typecheck: passed.
  • git diff --check origin/dev...HEAD: passed. All nine rebased commits have verified signatures.
  • Exact-head pnpm evals:e2e browser-login-sync was not run: new Daytona provisioning/spend is outside this conflict-resolution scope. Placement and test counts are unavailable. Current-head journey evidence remains missing; rerun and publish it before claiming Passed.
  • Fresh CI results are pending; prior CI results do not certify this head.

Historical Proof (Previous Head Only)

The following Passed results and published evidence apply only to d156bc9e69033a91d4b738de6f11ca43995e6852, not the rebased head.

  • OPENWORK_EVAL_REF=d156bc9e69033a91d4b738de6f11ca43995e6852 pnpm evals:e2e browser-login-sync
    • placement: daytona (daytona CLI authenticated)
    • checkout resolved d156bc9e6903
    • 1 passed / 0 failed / 0 skipped
    • proves explicit setup and sensitive defaults, HttpOnly login delivery, shared background-conversation access, automatic source rotation and deletion, value-free public state, and pause.
  • @openwork/browser-logins: 14/14.
  • Electron login-sync service: 9/9; browser panel overlap: 9/9.
  • App, package, SDK, and Electron typechecks passed; generated SDK and Electron bridge checks passed; testkit/env 70/70; changed eval dependency slice passed.
  • Den Web production build passed.
  • Warden and every required CI check pass on this exact head.

Historical test evidence for the previous head is published on this PR; it does not validate the rebased head.

Deferred

Managed Desktop policy enablement and the browser URL allowlist tie-in are separate rollout-ordered work. Chromium Linux keyrings, Safari, Windows Chromium app-bound encryption, and password-manager fill also remain separate outcomes.

@vercel

vercel Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 6, 2026 10:54pm UTC
openwork-den Ready Ready Preview Sep 6, 2026 10:54pm UTC
openwork-diagnostics Ready Ready Preview Sep 6, 2026 10:54pm UTC
openwork-landing Ready Ready Preview, v0 Sep 6, 2026 10:54pm UTC

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Deploying openwork with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7d073ba
Status: ✅  Deploy successful!
Preview URL: https://870360d0.openwork.pages.dev
Branch Preview URL: https://feature-browser-login-import.openwork.pages.dev

View logs

@vercel
vercel Bot temporarily deployed to Preview – openwork-den September 5, 2026 19:55 Inactive
@vercel
vercel Bot temporarily deployed to Preview – openwork-landing September 5, 2026 19:55 Inactive
@vercel
vercel Bot temporarily deployed to Preview – openwork-app September 5, 2026 19:55 Inactive
@vercel
vercel Bot temporarily deployed to Preview – openwork-diagnostics September 5, 2026 19:55 Inactive
@reachjalil
reachjalil force-pushed the feature/browser-login-import branch from 7d073ba to 8ab6cd9 Compare September 6, 2026 06:59
@reachjalil reachjalil changed the title feat(browser): bring your logins into the built-in browser feat(browser): keep selected logins synced Sep 6, 2026
@vercel
vercel Bot temporarily deployed to Preview – openwork-app September 6, 2026 07:24 Inactive
@vercel
vercel Bot temporarily deployed to Preview – openwork-landing September 6, 2026 07:24 Inactive
@vercel
vercel Bot temporarily deployed to Preview – openwork-den September 6, 2026 07:24 Inactive
@vercel
vercel Bot temporarily deployed to Preview – openwork-diagnostics September 6, 2026 07:24 Inactive
diff-warden[bot]
diff-warden Bot previously approved these changes Sep 6, 2026

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (d156bc9e69033a91d4b738de6f11ca43995e6852). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@reachjalil

Copy link
Copy Markdown
Member Author

Test evidence — selected-browser-logins-stay-synced-until-the-user-pauses-them — ✅ passed

SHA d156bc9 · engine v1

✅ passed · 0 expectations passed · 0 failed · 0 pending

screenshots not attached (gh < 2.99; run brew upgrade gh)

[world] desktop(daytona) · workspace(/tmp/openwork-builtin-browser-1788680856383) · session("New task") · [seed:raw] evalIn() ×2
[user] see(testId=login-sync-card, timeoutMs=30000) · testId=login-sync-open · click(testId=login-sync-open) · testId=login-sync-source-firefox:openwork-logins-chosen-1788680886434 · click(testId=login-sync-source-firefox:openwork-logins-chosen-1788680886434) · see(testId=login-sync-site-127.0.0.1, timeoutMs=30000) · testId=login-sync-confirm · click(testId=login-sync-confirm) · see(testId=login-sync-done, timeoutMs=30000) · text=Done · click(text=Done) · notSee(testId=login-sync-card) · see(testId=login-sync-configured, timeoutMs=30000) · testId=login-sync-pause · click(testId=login-sync-pause)
steps 1 ✅ Personal Desktop offers setup but reads nothing until the user acts (0.5s) · 2 ✅ The user chooses one profile and sites; finance stays unchecked (7.3s) · 3 ✅ The initial HttpOnly login reaches the shared built-in browser without exposing its value (6.0s) · 4 ✅ A source rotation and deletion propagate without another user action (6.1s) · 5 ✅ Pause stops continuing reads (11.5s)
verdict passed · 5 user observations (see ×4, notSee ×1) · 0 probes · steps 5/5


Test run created 2026-09-06T07:45:55.708Z · Source: evals/results/test-runs/2026-09-06T07-45-55-708Z-selected-browser-logins-stay-synced-until-the-user-pauses-them/test-run.json · Repro: pnpm --dir evals artifacts:publish -- --pr 4452 --test-run 2026-09-06T07-45-55-708Z-selected-browser-logins-stay-synced-until-the-user-pauses-them

Let users explicitly select one browser profile and sites whose HttpOnly login cookies OpenWork keeps synchronized into the shared built-in browser. Keep source reads one-way, native-confirmed, policy-gated, value-free outside the main process, and revocable from Settings.
Remove the undeployed Den policy dependency from this PR. Main-process installation state now enables personal Desktop sync, renderer code can only revoke access for managed contexts, and organization enablement remains a follow-up after a trusted policy channel exists.

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (0802e543cf4cc7389f6024aad8f38115212d62f6). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@reachjalil
reachjalil merged commit 172897c into dev Sep 6, 2026
38 checks passed

This branch was successfully deployed

4 active deployments
Preview – openwork-den — 0802e543 Deployed Sep 6, 2026 by vercel[bot]
Preview – openwork-landing — 0802e543 Deployed Sep 6, 2026 by vercel[bot]
Preview – openwork-app — 0802e543 Deployed Sep 6, 2026 by vercel[bot]
Preview – openwork-diagnostics — 0802e543 Deployed Sep 6, 2026 by vercel[bot]
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