fix: auth/sync robustness (5 review mediums)#65
Merged
Conversation
…d errors; surface unmergeable/push-retry conflicts; disconnect clears memory
|
🎉 PR Validation ✅ PASSED Commit: Checks:
Ready to merge! ✨ |
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.
Fixes the 5 MEDIUM findings from the desktop-only re-review. No version bump — bundled into the upcoming 0.2.0 with the public-prep PR.
isSignedIn()stayed true: green dot, every sync fails. Now a 4xx refresh (invalid/expired/revoked) clears the session + flips the UI to signed-out + notices "session expired"; a 5xx/network blip keeps tokens (retryable). New typedOAuthHttpErrorcarries the status.oauth.ts,auth-flow.ts(+2 tests).vault+lastVault→ next session starts at "Choose Memory".main.tslistVaultsnow returns a result ({ok,vaults}|{ok:false,error}); the chooser shows "Couldn't load your memories: … + Retry" distinct from the empty state.settings.ts,main.ts,memory-chooser.tspush()retry swallowed a conflict — a non-ff re-pull that conflicts is now propagated (no blind re-push → "not ok after rebase");push()returns the conflict outcome.git-client.ts,sync-controller.tsMergeNotSupportedErrorno longer bubbles raw;pull()returns{unmergeable:true}and the controller surfaces an actionable "diverged too far — resolve and sync again" message (no silent LWW). Misleading comment removed.Also adds: chooser "Use & sync" on non-current rows.
npm run verifygreen (68 tests, build, host/docs/bundle checks).