Skip to content

feat(console): add auto-refresh polling and event lifecycle improvements#265

Merged
r2dedios merged 7 commits into
RHEcosystemAppEng:release-0.6from
r2dedios:feat/console-data-pooling
Jun 3, 2026
Merged

feat(console): add auto-refresh polling and event lifecycle improvements#265
r2dedios merged 7 commits into
RHEcosystemAppEng:release-0.6from
r2dedios:feat/console-data-pooling

Conversation

@r2dedios

@r2dedios r2dedios commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Auto-refresh polling: Add refetchInterval to all React Query hooks — 5s for fast-changing data (events, scheduled actions, overview) and 10s for inventory data (accounts, clusters, instances)
  • Migrate Overview hooks to React Query: Replace manual useState/useEffect in useDashboardData and useEventsData with useQuery, adding AbortSignal support and polling while preserving the same return interface
  • Requester fallback: Set userEmail to clusteriq@dev when the gap-auth header is absent (local development), so actions always have a visible requester
  • Event Running state: Add Running() method to EventTracker so audit events transition through Pending → Running → Success/Failed instead of skipping directly to the final state

Test plan

  • Run make console-lint — passes with 0 errors
  • Run make local-build — compiles without errors
  • Start dev environment (make console-start-dev) and verify data refreshes automatically without page reload
  • Trigger a Scan action from Account Details and verify the event shows "Running" before completing
  • Verify requester column in Recent Events shows clusteriq@dev in local development

🤖 Generated with Claude Code

r2dedios added 4 commits June 2, 2026 12:14
Add refetchInterval to all data-fetching hooks: 5s for fast-changing
data (events, actions) and 10s for inventory (accounts, clusters,
instances).
Replace manual useState/useEffect in useDashboardData and useEventsData
with useQuery, adding AbortSignal support and 5s refetchInterval while
preserving the same return interface.
Set userEmail to 'clusteriq@dev' when gap-auth header is absent, so
actions created locally have a visible requester in the UI.
Add ResultRunning constant and Running() method to EventTracker so
events transition through Pending -> Running -> Success/Failed instead
of skipping directly from Pending to the final state.
@r2dedios r2dedios added the enhancement New feature or request label Jun 2, 2026
@r2dedios r2dedios self-assigned this Jun 2, 2026
@r2dedios r2dedios added this to the v0.6 milestone Jun 2, 2026
@r2dedios r2dedios mentioned this pull request Jun 2, 2026
@r2dedios r2dedios merged commit b707454 into RHEcosystemAppEng:release-0.6 Jun 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant