feat(browser): add Dia source adapter with discovery identity - #124
Merged
Merged
Conversation
Register Dia as a Chromium-family source browser (Arc User Data layout, Dia Safe Storage). Classify discovered Dia roots as dia so key lookup does not fall through to Chrome Safe Storage, and move unsupported- browser fixtures off dia now that it is supported. Co-authored-by: Matt Van Horn <mvanhorn@users.noreply.github.com>
Greptile SummaryAdds Dia as a Chromium-family source browser and aligns explicit configuration with browser discovery.
Confidence Score: 5/5The PR appears safe to merge with no accepted new findings or outstanding previous findings. The prior path-misclassification thread was manually resolved without explanation, so it is not outstanding and does not affect merge safety. No new actionable issue remains after excluding that duplicate edge case.
|
| Filename | Overview |
|---|---|
| internal/chromepaths/discover.go | Adds Dia’s Darwin discovery root and narrows path-based identity detection to consecutive Dia/User Data components. |
| internal/chromepaths/discover_test.go | Covers Dia discovery identity and regression cases involving unrelated paths containing dia. |
| internal/chrome/browser.go | Registers Dia’s profile layout and Safe Storage credentials. |
| internal/config/config.go | Enables source configuration to derive Dia’s default cookie database path. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Dia User Data root] --> B[Profile discovery]
B --> C[Browser identity: dia]
C --> D[Dia Safe Storage]
D --> E[Decrypt discovered cookie stores]
Reviews (2): Last reviewed commit: "fix(chromepaths): require Dia/User Data ..." | Re-trigger Greptile
A lone "dia" path component mislabeled custom Chrome roots under a folder or user named dia, so key lookup requested Dia Safe Storage and dropped the store. Match consecutive Dia/User Data components only. Co-authored-by: Matt Van Horn <mvanhorn@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Dia (The Browser Company) as a Chromium-family source browser so
source.yamlbrowser.name: diareads~/Library/Application Support/Dia/User Data/<profile>/Cookieswith keychain accountDia/ serviceDia Safe Storage.This supersedes #120 (fork
alexknowshtml/agentcookie/add-dia-browser). We cannot push to that fork, so this is a fresh branch off latestmainthat keeps #120's registry intent and lands the two gaps that blocked it.Fixes beyond #120
browserForRootininternal/chromepaths/discover.gohad no Dia case, so a discovered Dia User Data root was labeledchromeand key lookup used Chrome Safe Storage. Dia is classified by consecutiveDia/User Datapath components (not a lonediafolder, and not the substringmedia) and DarwinchromeRootsscansDia/User Dataso extra-profile /cookies/ doctor discovery actually finds it.TestLoadSourceUnknownBrowserFailsWithSupportedNames(and the matching LookupBrowser / doctor tests) still useddiaas the unsupported name. They now usevivaldi, which remains unsupported.Verified
go build ./...go vet ./internal/chrome ./internal/config ./internal/chromepaths ./internal/cligo test ./internal/chrome ./internal/config ./internal/chromepaths ./internal/cliNotes
agentcookie source --onceposted 1627 cookies); this PR adds the missing identity + test coverage on latest main.cookiescommand, sink adapter paste) will include Dia stores when Dia is installed andDia Safe Storageis readable, matching Brave/Edge. Arc is still not inchromeRoots(pre-existing); this PR does not expand Arc discovery.dia(viaCHROME_USER_DATA_DIR/cdp.profile_dir) stay labeled Chrome.browser.name: diais opt-in foragentcookie source.govulncheckfail is existing go1.26.4 stdlib debt (same as feat: fan out cookie and secret sync to multiple sinks #122 / main); not chased here.