Repository navigation
OPE-198 Move catch-up into watched stores - #219
Merged
Merged
Conversation
ForegroundRestore split REST across restore, MessageSync, and Screen Models. World signals now mark stores stale; the observing store fetches. Co-authored-by: Cursor <[email protected]>
OPE-198 Reactive data layer
Returning to the app, recovering a network path, or pulling to refresh updates the visible screen from its store. Screens subscribe and mutate. Process-level signals mark stores stale. The store that is being watched fetches. Replaces ForegroundRestore so catch-up is not split across restore, MessageSync, and Screen Models. Remaining:
Docs: |
v1 dual SSE reconnect was dropping the REST snapshot: fullReload ran but observeMessages never emitted, so Session Chat stayed on the partial turn. Co-authored-by: Cursor <[email protected]>
Collaborator
Author
|
@cursor review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit df2387e. Configure here.
Catch-up GET that collides with an SSE epoch bump now adopts the new epoch before publishing, so Session Chat is not stuck on a partial frame. Todo stores clear the stale bit only after REST succeeds. Home pull-to-refresh waits for watched live-store catch-up so the spinner lasts until the list returns.
OPE-199 Pin Session Running accessory above the composer. Keep Working/Retrying/Compacting visible for the whole turn from session status only, so the lamp no longer remounts when thought or tool rows settle. Co-authored-by: Cursor <[email protected]>
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
ForegroundRestoreand the home catch-up registry so resume is not split across restore, MessageSync, and Screen Models.ConnectionEpochmid-GET. Without that,fullReloadmerged the finished turn into the store and Session Chat kept the partial frame.Docs
docs/features/reactive-data-layer/plan.mddocs/features/reactive-data-layer/decisions.mdChecks
ProcessWorldSignalsTest,LiveStoreTest/MessageSyncTest,MainScreenViewModelTest,SessionChatViewModelTestpassed locallyMessageSyncTests(including background-return epoch-bump emit),SceneWorldSignalsTests, live-store and home ViewModel tests passed on simulator locallyobserveMessages emit … reason=background-return count=7Linear
Risks / Follow-ups
Note
High Risk
Rewires Android and iOS resume, SSE occupancy, and REST catch-up for home lists and chat timelines. A stale-bit or epoch-gating bug can leave screens on stale data after background or path restore.
Overview
Moves gap catch-up out of a UI restore registry and into the stores that already have observe interest. Process adapters (
ProcessWorldSignals/SceneWorldSignals) publish foreground, background, path, and profile edges, start/stop SSE after the 5s grace, and never call feature REST.Deletes
ForegroundRestore, home catch-up registry,setOpenSession/setHomeVisible, andForegroundEventLifecycleCoordinator. Screen Models only collect; home pull-to-refreshinvalidates live stores instead ofclearCache+ re-probe.Each Live Store and
MessageSynckeeps a stale bit:Background/PathLostmark dirty;Foreground/PathReadyREST only if dirty. SSE reconnect still force-refreshes and shares oneConnectionEpochfetch with world-signal REST. Catch-up now emits even if dual v1 reconnect bumps epoch mid-GET, so a turn that finished in the background is not stuck on a partial frame.Reviewed by Cursor Bugbot for commit df2387e. Bugbot is set up for automated code reviews on this repo. Configure here.