fix: retry message fetch when session encryption not ready#262
Merged
bra1nDump merged 1 commit intoslopus:mainfrom Dec 6, 2025
Merged
fix: retry message fetch when session encryption not ready#262bra1nDump merged 1 commit intoslopus:mainfrom
bra1nDump merged 1 commit intoslopus:mainfrom
Conversation
When a new session is created and the user quickly navigates to it, fetchMessages() may run before fetchSessions() completes and initializes the session encryption. Previously, this case silently returned early, leaving the session with no messages loaded (isLoaded: false forever). Now we throw an error when encryption isn't ready, which triggers the backoff retry mechanism in InvalidateSync. This allows the message fetch to succeed once session encryption becomes available. Fixes slopus#260 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced Dec 6, 2025
Contributor
|
Thanks @kmizzi! Merging this and #263. Sorry for the long review time - we're resuming active work on the project. Aiming to roll out a new version this weekend. Contributions welcome! We're discussing plans in Discord: https://discord.gg/aVhXZfYh |
imjszhang
added a commit
to imjszhang/happy
that referenced
this pull request
Dec 19, 2025
slopus#262) This update improves the message fetching mechanism by throwing an error if session encryption is not ready, triggering a backoff retry. This ensures messages are loaded correctly when a new session is created and the user navigates quickly to it.
JoeLuker
pushed a commit
to JoeLuker/happy
that referenced
this pull request
Feb 1, 2026
When a new session is created and the user quickly navigates to it, fetchMessages() may run before fetchSessions() completes and initializes the session encryption. Previously, this case silently returned early, leaving the session with no messages loaded (isLoaded: false forever). Now we throw an error when encryption isn't ready, which triggers the backoff retry mechanism in InvalidateSync. This allows the message fetch to succeed once session encryption becomes available. Fixes slopus#260 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
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
Fixes the race condition where messages don't load for new sessions when the user quickly navigates to them.
fetchMessages()may run beforefetchSessions()completesfetchMessages()silently returned earlyisLoaded: falseforever (loading spinner)backoffretry mechanism inInvalidateSyncTest plan
yarn typecheck)Fixes #260
🤖 Generated with Claude Code