feat(web): real-time dashboard with SSE and optimistic UI updates#94
feat(web): real-time dashboard with SSE and optimistic UI updates#94AgentWrapper wants to merge 1 commit intomainfrom
Conversation
b17d6c9 to
b287922
Compare
6a14da4 to
3b5facf
Compare
- SSE subscription: Dashboard subscribes to /api/events and patches status/activity/lastActivityAt in real-time — no page reloads needed - applySSESnapshot: bail-out optimization (returns original array ref when unchanged), skips sessions with pending optimistic updates - Optimistic UI with ref-counted pending guard (Map<string,number>): kill/merge/restore update local state immediately with rollback on failure - pr.state synced when SSE delivers status:"merged" - Session detail page: useSSE for instant status + polling for full data - computeStats in types.ts (client-safe); deduplicated from serialize.ts - CI: pnpm strict audit now distinguishes registry outages from vulnerabilities Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3b5facf to
8aa91ad
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| status: update.status, | ||
| activity: update.activity, | ||
| lastActivityAt: update.lastActivityAt, | ||
| }; |
There was a problem hiding this comment.
Session detail SSE misses pr.state sync on merge
Medium Severity
The session detail page's SSE handler patches status, activity, and lastActivityAt but doesn't sync pr.state when status becomes "merged". The Dashboard's applySSESnapshot correctly mirrors pr.state to "merged" in this case, but the session detail page omits this. SessionDetail relies on pr.state === "merged" to render the "Merged" badge and to suppress stale "Merge conflicts" warnings — so for up to 30 seconds (until the next poll), the detail page shows contradictory information: session status says "merged" while the PR card still appears open with possible false conflict warnings.


Summary
/api/eventson mount and patchesstatus/activity/lastActivityAtin real-time — no more page reloads needed when agent state changes externallyTest plan
🤖 Generated with Claude Code