Skip to content

feat: SSE disconnect/reconnecting indicator - #37

Open
uditdc wants to merge 1 commit into
mainfrom
feat/11-sse-reconnect-indicator
Open

feat: SSE disconnect/reconnecting indicator#37
uditdc wants to merge 1 commit into
mainfrom
feat/11-sse-reconnect-indicator

Conversation

@uditdc

@uditdc uditdc commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Closes #11

api/events.ts had no onerror handler on the EventSource, so a dropped SSE connection was silent to the user. useLiveUpdates now tracks connection state via the EventSource's open/error events and returns it; RepoView surfaces that state as a small amber "Reconnecting…" badge in the top bar whenever the feed drops, using the browser's built-in auto-reconnect (no state is shown while connected).

Acceptance criteria

  • Killing the server shows a visible "reconnecting" state in the UI — the error event handler sets connection state to reconnecting, rendering the badge in RepoView's top action bar; verified by reading the EventSource event flow (browsers fire error on a dropped connection and keep auto-retrying until open fires again).
  • Reconnecting clears the indicator automatically — the open event handler resets state back to connected, which hides the badge; this fires both on initial connect and on every successful auto-reconnect.

pnpm typecheck, pnpm test, and pnpm build all pass.


Generated by Claude Code

useLiveUpdates now tracks the EventSource's open/error transitions and
returns a connection state, surfaced in the top bar as a small amber
"Reconnecting…" badge whenever the SSE feed drops.

Closes #11
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.

feat: SSE disconnect/reconnecting indicator

2 participants