Skip to content

feat: replace UI polling with real-time SSE - #78

Merged
roziscoding merged 2 commits into
mainfrom
feat/replace-ui-polling-with-sse
Jul 31, 2026
Merged

feat: replace UI polling with real-time SSE#78
roziscoding merged 2 commits into
mainfrom
feat/replace-ui-polling-with-sse

Conversation

@roziscoding

Copy link
Copy Markdown
Owner

What does this PR do?

Replaces the management UI's HTTP polling with real-time Server-Sent Events while keeping the existing snapshot payloads.

  • publishes download snapshots immediately after persisted download mutations
  • publishes overview/config snapshots immediately after connector and config changes, including rollback completion
  • adds authenticated SSE routes for overview, downloads, and connector config
  • uses a simple periodic heartbeat independent from data delivery
  • bounds pending writes and disconnects slow consumers so EventSource can reconnect with a fresh snapshot
  • shares browser EventSource connections per endpoint and closes them on unmount/logout
  • preserves SSE streaming headers and cancellation through the Nuxt BFF
  • removes the obsolete polling composables and refresh controls

Related issue

None.

Verification

  • mise run lint:fix
  • mise run test — 452 passed
  • mise run typecheck
  • bun run build in apps/ui

Checklist

  • Commits follow Conventional Commits
  • Commits are signed (GitHub enforces this — unsigned commits are rejected)
  • mise run lint:fix was run and its output is committed
  • mise run test passes (transfer/request paths were not changed)
  • Docs are not required: no configuration or public user workflow changed

@roziscoding
roziscoding marked this pull request as ready for review July 31, 2026 18:04
@greptile-apps

greptile-apps Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Replaces management UI polling with authenticated real-time SSE streams.

  • Adds backend snapshot publishers for download, connector, and configuration mutations.
  • Adds bounded SSE delivery with heartbeats, cancellation, and slow-consumer disconnection.
  • Shares browser streams by endpoint and preserves streaming behavior through the Nuxt proxy.
  • Removes polling controls and updates dashboard, downloads, and settings views to consume snapshots.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Reviews (2): Last reviewed commit: "fix(ui): handle expired SSE sessions" | Re-trigger Greptile

Comment thread apps/ui/app/composables/useManagementStream.ts Outdated
@roziscoding
roziscoding merged commit 2f838ac into main Jul 31, 2026
10 checks passed
@roziscoding
roziscoding deleted the feat/replace-ui-polling-with-sse branch July 31, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant