feat(browser): add Dia browser support - #120
Conversation
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 SummaryAdds Dia as a Chromium source browser using its macOS User Data directory and Dia Safe Storage credentials.
Confidence Score: 3/5The 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
|
| 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]
Reviews (1): Last reviewed commit: "feat(browser): add Dia browser support" | Re-trigger Greptile
| "brave": {SupportDir: []string{"BraveSoftware", "Brave-Browser"}}, | ||
| "edge": {SupportDir: []string{"Microsoft Edge"}}, | ||
| "arc": {SupportDir: []string{"Arc", "User Data"}}, | ||
| "dia": {SupportDir: []string{"Dia", "User Data"}}, |
There was a problem hiding this comment.
| // 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", | ||
| }, |
There was a problem hiding this comment.
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
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 Storagekeychain 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 tobrowserRegistryinternal/config/config.go: added"dia"entry tosourceBrowserPathsProfile path:
~/Library/Application Support/Dia/User Data/<profile>/CookiesKeychain: account
Dia, serviceDia Safe StorageVerification
Tested on macOS arm64 (M2 Mini) with Dia installed.
agentcookie source --oncewithbrowser: {name: dia}insource.yamlsuccessfully posted 1627 cookies to a Linux sink.agentcookie doctorreports[OK] Chrome stores: 1 readable store(s)with the Dia profile.