fix(ollama): try every browser before giving up on cookie import - #446
Conversation
Auto/Web cookie import stopped at the first installed browser that returned any cookies for ollama.com, even when those cookies were stale/irrelevant (e.g. a consent or analytics cookie left over from a one-off visit) and carried no recognized session cookie. That starved out a later browser (often the one actually signed in) and surfaced "No cookies available for web API" even with a valid, logged-in session sitting on disk. Walk every detected browser and keep going until one yields a header containing a recognized Ollama session cookie, instead of stopping at the first non-empty result. Extracted the selection logic into a small pure helper with a focused regression test reproducing the exact scenario (irrelevant-only cookies on one browser, real session on the next). Fixes #426 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L23pzyCfMvfbMQwnHXmKCp
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughOllama cookie resolution now scans all detected browsers, returns the first recognized session header, preserves the first meaningful extraction error, and returns ChangesOllama cookie resolution
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to Ollama session-cookie resolution now continues through detected browsers until it finds a recognized session, while retaining meaningful extraction errors when none is available. No current merge-blocking risk is established. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Maintainer replacement for #430 because the original head is in an external fork. Includes the reviewed fix plus preservation of meaningful browser cookie extraction errors.\r\n\r\nSupersedes #430.\r\n
Summary by CodeRabbit