Skip to content

Auto-refresh requests on SSE ILLDEV-500 - #40

Draft
skomorokh wants to merge 1 commit into
mainfrom
sse-illdev-500
Draft

Auto-refresh requests on SSE ILLDEV-500#40
skomorokh wants to merge 1 commit into
mainfrom
sse-illdev-500

Conversation

@skomorokh

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants