fix: recover failed sessions and streamline bootstrap - #452
Open
geier wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves session bootstrap and recovery behavior by centralizing sidebar session data on the sync context, removing redundant provider bootstrap work, and ensuring “processing” UI state is cleared when a session stops unexpectedly.
Changes:
- Stop stale “pending” indicators and show a clearer error when a session halts before an assistant response is finalized.
- Reuse
SyncProvidersession metadata for the sidebar (removing duplicate session list requests and event-driven reload logic). - Drop provider catalog bootstrap from sync and purge persisted model selections that no longer exist or aren’t connected.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| app-prefixable/src/pages/session.tsx | Stops processing state on failed/ended sessions and surfaces a retry-oriented error. |
| app-prefixable/src/pages/layout.tsx | Switches session sidebar loading to useSync() state and uses sync.refresh() for retry. |
| app-prefixable/src/context/sync.tsx | Removes provider bootstrap/state from sync and simplifies bootstrap to session listing only. |
| app-prefixable/src/context/providers.tsx | Clears persisted agent model selections when provider/model is no longer valid/connected. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1162
to
1166
| createEffect(() => { | ||
| const error = sync.bootstrapError; | ||
| if (!sync.ready && !error) return; | ||
| if (error) { | ||
| setSessions([]); |
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
Verification
bun run typecheckbun test tests/(349 passed)bun run buildNotes