Skip to content

feat(browser): add Dia browser support - #120

Open
alexknowshtml wants to merge 1 commit into
mvanhorn:mainfrom
alexknowshtml:add-dia-browser
Open

feat(browser): add Dia browser support#120
alexknowshtml wants to merge 1 commit into
mvanhorn:mainfrom
alexknowshtml:add-dia-browser

Conversation

@alexknowshtml

Copy link
Copy Markdown

What

Adds Dia (The Browser Company) to the browser registry so agentcookie can sync cookies from Dia on macOS.

Dia is a Chromium-based browser that uses the standard <App> Safe Storage keychain model — the same pattern as Arc, Brave, and Edge — so the existing path + keychain adapter applies directly.

Changes

  • internal/chrome/browser.go: added "dia" entry to browserRegistry
  • internal/config/config.go: added "dia" entry to sourceBrowserPaths

Profile path: ~/Library/Application Support/Dia/User Data/<profile>/Cookies
Keychain: account Dia, service Dia Safe Storage

Verification

Tested on macOS arm64 (M2 Mini) with Dia installed. agentcookie source --once with browser: {name: dia} in source.yaml successfully posted 1627 cookies to a Linux sink.

agentcookie source: posted 1627 cookies, sink replied: ok

agentcookie doctor reports [OK] Chrome stores: 1 readable store(s) with the Dia profile.

Adds Dia to browserRegistry and sourceBrowserPaths so agentcookie can
read cookies from Dia (The Browser Company). Same Chromium Safe Storage
keychain model as Arc/Brave/Edge.

Profile path: ~/Library/Application Support/Dia/User Data/<profile>/Cookies
Keychain: 'Dia Safe Storage' / 'Dia'
@greptile-apps

greptile-apps Bot commented Aug 24, 2026

Copy link
Copy Markdown

Greptile Summary

Adds Dia as a Chromium source browser using its macOS User Data directory and Dia Safe Storage credentials.

  • Registers Dia's profile root and keychain metadata in the Chrome browser registry.
  • Adds Dia to source configuration path resolution.
  • Leaves an existing unsupported-browser test and the general profile-discovery path inconsistent with the new support.

Confidence Score: 3/5

The PR should not merge until the stale unsupported-browser test and Dia profile-discovery identity are corrected.

Dia now loads successfully where an existing test requires rejection, while the cookies command can classify discovered Dia stores as Chrome and select the wrong Safe Storage credentials.

Files Needing Attention: internal/config/config.go, internal/config/config_test.go, internal/chrome/browser.go, internal/chromepaths/discover.go

Important Files Changed

Filename Overview
internal/chrome/browser.go Adds the Dia descriptor and keychain metadata, but the separate profile-discovery classifier does not preserve Dia identity.
internal/config/config.go Adds Dia source-path support, making an existing test that deliberately treats Dia as unsupported fail.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Dia source configuration] --> B[sourceBrowserPaths]
  B --> C[Dia User Data profile]
  C --> D[Cookie store]
  D --> E[Dia Safe Storage descriptor]
  F[cookies command] --> G[Chromium profile discovery]
  G --> H{Recognizes Dia root?}
  H -- No --> I[Labels store as Chrome]
  I --> J[Selects Chrome Safe Storage]
Loading

Fix all with Greploop Fix All in Codex Fix All in Claude Code Fix All in Cursor Fix All in Conductor

Reviews (1): Last reviewed commit: "feat(browser): add Dia browser support" | Re-trigger Greptile

Comment thread internal/config/config.go
"brave": {SupportDir: []string{"BraveSoftware", "Brave-Browser"}},
"edge": {SupportDir: []string{"Microsoft Edge"}},
"arc": {SupportDir: []string{"Arc", "User Data"}},
"dia": {SupportDir: []string{"Dia", "User Data"}},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Dia support breaks regression test

When the test suite runs, TestLoadSourceUnknownBrowserFailsWithSupportedNames still uses dia as its unsupported-browser fixture, but this entry makes LoadSource accept it, causing the test to fail at expected unsupported browser error.

Fix in Codex Fix in Claude Code Fix in Cursor Fix in Conductor

Comment on lines +100 to +108
// Dia (The Browser Company) follows the same "User Data" layout as Arc.
// Profile paths verified on disk 2026-08-24; keychain account/service
// follow the standard macOS Chromium-fork convention.
"dia": {
Name: "dia",
SupportDir: []string{"Dia", "User Data"},
KeychainAccount: "Dia",
KeychainService: "Dia Safe Storage",
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Discovery loses Dia browser identity

When the macOS cookies command discovers a Dia profile, browserForRoot has no Dia case and labels the store as Chrome, causing key lookup to select Chrome Safe Storage instead of Dia Safe Storage and preventing Dia cookies from being decrypted.

Knowledge Base Used: Chrome cookie access

Fix in Codex Fix in Claude Code Fix in Cursor Fix in Conductor

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