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 |
|
Reviewed by Codex gpt-6-luna (xhigh); verified and validated by Claude Thermo-nuclear review findings:
|
|
Fixes landed at head f37043a: 4 of 5 findings fixed (wiring finding left, see above). Also fixed clippy cast lints in the new tests. Commands run: cargo +1.98.0 fmt --all, clippy -D warnings (rust crate, all targets), cargo test --lib browser (52 passed) and minimax (41 passed). Tauri crate clippy skipped: no changes outside the rust crate. |
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