Auto-refresh requests on SSE ILLDEV-500 - #40
Draft
skomorokh wants to merge 1 commit into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds SSE-driven live updates for patron request detail views, including reconnect handling, query invalidation, and action settling.
Changes:
- Adds a shared broker event-stream provider and request-event hook.
- Refreshes request queries after matching peer events and disables stale actions while settling.
- Adds integration/unit tests, mocks, exports, and environment flags.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
ui-rs/test/jest/setupFiles.js |
Adds text codec test polyfills. |
ui-rs/src/test/stripesCore.js |
Supports per-test ReShare flags. |
ui-rs/src/test/okapiKyMock.js |
Adds mock event streams. |
ui-rs/src/routes/ViewRoute.test.js |
Tests event-driven refresh behavior. |
ui-rs/src/routes/ViewRoute.js |
Subscribes the viewed request to events. |
ui-rs/src/index.js |
Mounts the shared event provider. |
stripes-reshare/src/useRequestEvents.test.js |
Tests matching, settling, and refreshes. |
stripes-reshare/src/useRequestEvents.js |
Implements request event handling. |
stripes-reshare/src/useIsActionPending.test.js |
Tests settling-state subscriptions. |
stripes-reshare/src/useIsActionPending.js |
Includes event settling in pending state. |
stripes-reshare/src/BrokerEvents.test.js |
Tests stream parsing and recovery. |
stripes-reshare/src/BrokerEvents.js |
Implements SSE connection management. |
stripes-reshare/index.js |
Exports the new APIs. |
platform-rs-dev/stripes.config.js |
Enables development live updates. |
environments/platform-resharex/stripes.config.js |
Adds environment feature flags. |
environments/platform-resharex/consortial.stripes.config.js |
Adds consortial feature flags. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+10
to
+11
| showRefresh: true, | ||
| liveUpdates: true, |
Comment on lines
+10
to
+11
| showRefresh: true, | ||
| liveUpdates: true, |
Comment on lines
+56
to
+57
| } finally { | ||
| setSettling(false); |
Comment on lines
+19
to
23
| // Never fetches: the query is here to subscribe to the entry above. | ||
| const { data: settling } = useQuery(settlingKey(reqId), () => false, { | ||
| enabled: false, | ||
| initialData: false, | ||
| }); |
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.
No description provided.