Support LongCat Firefox cookie imports - #2462
Conversation
|
Codex review: found issues before merge. Reviewed July 27, 2026, 11:37 PM ET / July 28, 2026, 03:37 UTC. ClawSweeper reviewWhat this changesThe PR changes LongCat Automatic cookie discovery from Chrome-only to Chrome followed by Firefox, with regression assertions for the provider’s browser order. Merge readinessKeep this PR open for a maintainer product decision. The Firefox-only LongCat case is credible and has real live proof, but the patch changes Automatic import from the repository’s Chrome-only default to an unconditional second-browser probe; the prior review’s compatibility concern remains unresolved. Priority: P2 Review scores
Verification
How this fits togetherLongCat usage probing starts by selecting browser cookie stores when its Cookie source is Automatic. A discovered authenticated flowchart LR
A[User refresh] --> B[LongCat Automatic cookie source]
B --> C[Browser import order]
C --> D[Chrome cookie store]
C --> E[Firefox cookie store]
D --> F[Authenticated LongCat session]
E --> F
F --> G[Usage API probes]
G --> H[Menu bar usage display]
Decision needed
Why: Both paths are technically viable: the PR proves the Firefox-only use case, while repository policy favors Chrome-only defaults unless broader browser probing is deliberately selected. Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Preserve Chrome-only Automatic behavior unless a maintainer explicitly accepts LongCat’s Chrome-to-Firefox exception; the more durable alternative is a bounded user-visible browser-source selection that keeps the default conservative. Do we have a high-confidence way to reproduce the issue? Yes—at source level with high confidence: current Is this the best way to solve the issue? Unclear—the Chrome-to-Firefox fallback is a narrow technical fix, but it is not clearly the best product path while the repository policy favors Chrome-only defaults and lacks an explicit LongCat browser-selection decision. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against de3389771177. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
I believe this bounded LongCat override follows the The closest merged precedent is #1985, which intentionally expanded Mistral Automatic from Chrome-only to Chrome → Firefox → Safari so Firefox users are detected without Manual mode. LongCat currently exposes only Automatic / Manual cookie header / Off; I could not find an existing per-provider browser picker, so making Firefox explicitly selectable would require a broader settings/config feature rather than a focused compatibility fix. Would you accept the LongCat-specific Chrome → Firefox exception, or would you prefer that broader opt-in browser-selection UX first? |
|
Merged after final review of the exact head and the surrounding LongCat cookie-import path. Verification:
Thank you for the focused fix and the live Firefox validation, @akshayprabhu200! |
Summary
Root cause
LongCat's automatic cookie import order was hard-coded to
[.chrome]. Although the shared cookie importer already supports Firefox and other providers use it successfully, Firefox was never included in LongCat's candidate list, so a validlongcat.chatFirefox session could not be discovered.Real behavior proof
Ran a credential-safe local proof on a machine signed in to LongCat only in Firefox. The proof used the exact SweetCookieKit
0.4.1revision pinned by this checkout and the same Firefox cookie query and LongCat endpoints used by the production importer.The Chrome check was count-only and did not decrypt or print cookie data. The Firefox proof imported the live cookie store, sent authenticated GET requests only to
longcat.chat, and printed only status/schema evidence. No cookie names, values, account identity, quota values, or response bodies were retained.Firefox uses the shared Gecko SQLite/WAL reader and does not use Chromium Safe Storage, so this fallback does not introduce a browser Keychain prompt. It does expand LongCat's file-based browser probing from Chrome to Firefox when Automatic import runs; Chrome remains first.
Verification
user-currentandtokenUsagerequests succeededmake check— all portable repository checks and SwiftFormat passed; the initial SwiftLint invocation could not load SourceKit from the active Command Line Tools pathDEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer .build/lint-tools/bin/swiftlint --strict— 0 violations across 1,581 filesswift test --filter BrowserCookieOrderStatusStringTests— could not start because this checkout requires Swift tools 6.2 while the installed Xcode/Swift toolchain is 5.10make test— same local Swift 6.2 toolchain prerequisite prevented test discovery; upstream CI remains the compilation and test gateChangelog
LongCat: detect Firefox web sessions during Automatic cookie import.
No screenshots needed; this changes provider cookie-source selection only.
Fixes #2463