Fix auth invalidation during batch transcription - #7257
Merged
Conversation
✅ Deploy Preview for anarlog canceled.
|
ComputelessComputer
force-pushed
the
fix/persist-auth-batch-recovery
branch
from
September 2, 2026 12:07
56931ac to
bc9a5e1
Compare
ComputelessComputer
force-pushed
the
fix/persist-auth-batch-recovery
branch
from
September 2, 2026 15:29
bc9a5e1 to
7068729
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7068729. Configure here.
Keep the existing persisted session unless the user explicitly signs out, and refresh cloud transcription credentials before starting a batch request.
ComputelessComputer
force-pushed
the
fix/persist-auth-batch-recovery
branch
from
September 2, 2026 15:41
7068729 to
e31af0f
Compare
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
Validation
Note
High Risk
Broad changes to authentication persistence, multi-window sign-out, and when sessions are cleared—security-sensitive behavior with intentional relaxation of SDK-driven logout.
Overview
Fixes unexpected logouts during batch transcription and fragile Supabase refresh by making the desktop app own session persistence and treat SDK sign-out as non-authoritative unless the user (or main window) commits logout.
Session storage and startup: Tauri auth storage blocks the Supabase client from removing the primary session key; sessions are read back on cold start. Initial load falls back to the persisted session when
getSessionfails or returns empty, instead of clearing storage on “fatal” refresh errors (isFatalSessionErroris removed).Auth provider behavior: Unsolicited
SIGNED_OUTfrom the SDK is ignored; explicit sign-out still runs the existing main/secondary coordination and now broadcastsanlg:auth-sign-out-committedso other windows clear only after a real logout. Transient cloudsync account verification failures keep the in-memory session rather than wiping auth.API calls: New
getSessionForRequestresolves a token for outbound requests (SDK lookup, proactive refresh within ~2 minutes, offline fallbacks). Batch transcription uses it for Anarlog Cloud / paid paths so jobs start with a fresh access token (existing 401 retry unchanged).Reviewed by Cursor Bugbot for commit e31af0f. Bugbot is set up for automated code reviews on this repo. Configure here.