fix(web): render SSE connection-status indicator (TASK-2027)#880
Merged
Conversation
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.
What
From the PLAN-1984 Web-UX audit: the SSE connection status was already computed in
sseServicebut never rendered, so a stale board gave no hint the realtime stream was down or unauthorized.This renders a small, unobtrusive live/reconnecting/offline indicator on the collection board view, wired off the existing
sseService.statusstate (no new polling / no new connection layer).Changes
web/src/lib/components/SSEStatusIndicator.svelte— dot + label badge readingsseService.status. Reuses the visual idiom of the item page's collab-state badge:connected→ subtle "Live" (muted label, quiet green dot)reconnecting→ yellow "Reconnecting…" (pulsing dot; respectsprefers-reduced-motion)disconnected→ red "Offline"unauthorized→ red "Disconnected" (session lost workspace access)[collection]/+page.svelte— renders the indicator in the header title-row (wrapped h1 + indicator in a.title-groupsospace-betweenlayout stays clean).sse.svelte.ts— added a one-shotstatus_requestBroadcastChannel handshake so a follower tab that opens after the leader already connected initializes its status correctly (BroadcastChannel doesn't replay the leader's earlierstatusmessage; without this a peer tab receiving live updates would wrongly show "Offline"). Found in Codex review.Test plan
cd web && npm run check— 0 errors on touched files.cd web && npm run build— succeeds.Refs TASK-2027, PLAN-1984.