Skip to content

feat(browse): add Dia to the cookie-import browser registry - #2939

Closed
JonnyFi wants to merge 1 commit into
garrytan:mainfrom
JonnyFi:add-dia-browser-cookie-import
Closed

JonnyFi wants to merge 1 commit into
garrytan:mainfrom
JonnyFi:add-dia-browser-cookie-import

Conversation

@JonnyFi

@JonnyFi JonnyFi commented Sep 22, 2026 •

Copy link
Copy Markdown

Why

I run Dia as my daily browser, so every session I care about lives in Dia's profile. /setup-browser-cookies told me "Detected browsers: Chrome, Arc" and the picker listed almost nothing, because those two are the browsers I stopped using. From the outside that reads as "cookie import is broken", and I nearly wrote it off. Dia is Chromium and stores cookies exactly like Chrome, so it only needs a registry entry.

Closes #2938.

Live evidence

Before, built from this branch's parent commit (v1.87.5.0):

$ ./browse/dist/browse cookie-import-browser
Cookie picker opened at http://127.0.0.1:32969/cookie-picker
Detected browsers: Chrome, Arc

$ ./browse/dist/browse cookie-import-browser dia --domain github.com
Unknown browser 'dia'. Supported: comet, perplexity, chrome, google-chrome, google-chrome-stable, chromium, arc, brave, edge

After, same machine, same binary rebuilt with the one-line entry:

$ ./browse/dist/browse cookie-import-browser
Cookie picker opened at http://127.0.0.1:33620/cookie-picker
Detected browsers: Chrome, Arc, Dia

$ ./browse/dist/browse goto https://github.com
Navigated to https://github.com (200)

$ ./browse/dist/browse cookie-import-browser dia --domain github.com
macOS is waiting for Keychain permission. Look for a dialog asking to allow access to "Dia Safe Storage".
Imported 6 cookies for github.com from dia

$ ./browse/dist/browse goto https://github.com/settings/profile
Navigated to https://github.com/settings/profile (200)

The last step is the one that matters: /settings/profile redirects an anonymous session to the login page, and here it renders the signed-in settings page with my account name in the nav. The imported Dia session authenticates.

Decryption needed no change. Dia writes v10 payloads, PBKDF2-HMAC-SHA1 over saltysalt at 1003 iterations, AES-128-CBC with a 16-space IV, and the 32-byte domain-hash prefix that decryptCookie() already strips unconditionally.

Scope

  • Changed: one entry in BROWSER_REGISTRY (browse/src/cookie-import-browser.ts), plus the browser lists in README.md, BROWSER.md, ARCHITECTURE.md and docs/skills.md. No VERSION or CHANGELOG.md edit, so the version gate stays out of it.
  • Verified live by: the before/after runs above against a real Dia profile on macOS 15, and bun test test/skill-validation.test.ts test/setup-browser-hint.test.ts (354 pass, 0 fail).
  • Did NOT test: Windows and Linux, since Dia is macOS-only today, which is why the entry carries no linuxDataDir or windowsDataDir. I also did not run the full bun run test:free suite to green: it has failures on my machine in cso-* and plan-count-*, and those same tests fail identically on an unmodified v1.87.5.0 checkout, so they are pre-existing here and untouched by this diff.

Liveness proof (required for external contributors)

gh api user --jq .login → JonnyFi.
liveness-gstack-pr
Blurred my surname for obvious reasons :)

Checklist

Dia (The Browser Company) is Chromium-based and stores cookies exactly like
Chrome, but it is missing from BROWSER_REGISTRY. On a machine where Dia holds
the live sessions, cookie-import-browser reports "Detected browsers: Chrome,
Arc" and the picker comes up nearly empty.

Verified against a real Dia profile on macOS: profile root
~/Library/Application Support/Dia/User Data/, Keychain service "Dia Safe
Storage", v10 payloads with the 32-byte domain-hash prefix that
decryptCookie() already strips. No decryptor change needed.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@trunk-io

trunk-io Bot commented Sep 22, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@capy-ai

capy-ai Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Thanks for the Dia registry contribution and detailed reproduction. Its registry/alias/documentation scope is now covered by merged #2964 (v1.90.0.0), so I’m closing this PR as superseded rather than merging the branch separately. The merged release explicitly retains the native Dia qualification caveat; it does not claim we reproduced the contributor’s live-session evidence.

@capy-ai capy-ai Bot closed this Sep 25, 2026
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.

cookie-import-browser: add Dia (Chromium-based, identical v10 cookie layout)

1 participant