Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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
Stacked on #646 (shared Chromium LevelDB reader). Adds
browser::storage_discovery, a shared, read-only locator for raw Chromium profile stores, and switches the MiniMax browser-storage importer to it.storage_discovery::discover(StorageKind)walks every installed Chromium-family browser in theBrowserTypecatalog and returns candidate directories:Local Storage/leveldb,Session Storage, orIndexedDB/<origin>.indexeddb.leveldbfiltered by origin prefixes. Profiles areDefault,Profile *, anduser-*(sorted; hidden entries, files, and guest/system profiles ignored). Nothing is opened, locked, or decrypted.MiniMaxLocalStorageImporter::import_sessionpreviously looked only at theDefaultprofile of Chrome, Edge, and Brave Local Storage (per-OS hard-coded paths). It now visits every catalog browser and profile, trying Local Storage first, then Session Storage, then MiniMax-origin IndexedDB only when earlier stores yield no session.source_labelis now the candidate label (for exampleGoogle Chrome Profile 2 (Session Storage)).https_platform.minimax.io_,https_www.minimax.io_,https_minimax.io_,https_platform.minimaxi.com_,https_minimaxi.com_,https_www.minimaxi.com_.No user-visible change yet:
MiniMaxLocalStorageImporteris still not called by the MiniMax fetch path (it uses API key or cookie header only), as noted in the 0.66.0 audit.Upstream reference
62cdd065.Sources/CodexBarCore/ChromiumLocalStorageDiscovery.swift(Storageenum,profileCandidates),Sources/CodexBarCore/Providers/MiniMax/MiniMaxLocalStorageImporter.swift(indexedDBStorage,storageCandidates, local, session, then IndexedDB order),Tests/CodexBarTests/MiniMaxLocalStorageImporterTests.swift(allowed and excluded IndexedDB fixture names, profile-name filter),docs/minimax.md.Ported / Deferred
Ported: the three-storage discovery, profile filter, IndexedDB origin-prefix filter, and MiniMax fallback order.
Deferred:
BrowserType, and upstream evidence gives macOS roots only, so their WindowsUser Datapaths would be invented. Other upstream catalog members (Chrome Beta/Canary, Edge Beta/Canary, Brave Beta/Nightly, Vivaldi, Dia, Atlas, Helium) are likewise outsideBrowserType; extending it belongs with the Chrome-channel work (feat(browser): support Chrome channels and Chromium profiles #614). Adding a browser there makes it visible to this discovery with no change here..ldb/.logfiles rather than using the Port upstream 0.66.0: shared Chromium LevelDB + Snappy reader #646 LevelDB reader (Snappy-compressed tables are invisible to a raw scan). Switching the parse to the reader, and wiring the importer into the fetch path, are separate behavior changes.Validation
Toolchain
cargo +1.98.0, slot-4 target dir, E-core wrappers.cargo +1.98.0 fmt --all: cleancargo +1.98.0 clippy --workspace --all-targets -- -D warnings: passcargo +1.98.0 test -p codexbar storage -- --test-threads=4: 14 passed, 0 failed (includes the 4 new discovery tests and 3 new importer tests)cargo +1.98.0 test -p codexbar -- minimax browser:: --test-threads=4: 84 passed, 0 failedNew tests: per-kind path and label resolution, missing stores and missing user-data dir, profile-name filter and ordering (
Default,Profile 2,user-workkept;Guest Profile,System Profile,Profile1, hidden, and file entries dropped), IndexedDB allow/exclude list from the upstream fixture (18 candidates across 3 profiles), and importer order (local beats session, session and IndexedDB fallback, no-browser vs no-session errors). Fullcargo test -p codexbarnot run (no shared core code touched).Affected areas
rust/src/browser/,rust/src/providers/minimax/local_storage.rs)UI proof
Not applicable