Scrum4Me/app/api
Madhura68 bec4c05e80 fix(m12): bell loses idea-questions on SSE reconnect
The notifications-realtime hook (PR #92) does close+connect on every
idea-question 'open' event, but the SSE state-event-handler in
/api/realtime/notifications only re-fetched story-questions. Result:
each reconnect wiped idea-questions from the bell within ~500ms, even
though the bridge had loaded them on initial page-render.

Symptom: clicking an idea-question in the bell sometimes hit a
\"question gone\" race because the close+connect after the live event
emptied them out.

Fix: SSE initial-state now does a Promise.all on
- story-questions (productAccessFilter, existing path)
- idea-questions (idea.user_id === session.userId, M12 strict-private)
and sends merged + sorted state with discriminated \`kind\` field.

This mirrors the bridge's own initial fetch (PR #92), so a bridge-mount
and an SSE-reconnect now produce identical state.

Tests: 546/546 still green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 13:14:48 +02:00
..
auth/pair M12 / ST-1110: Demo gebruiker read-only (#17) 2026-04-29 18:44:14 +02:00
cron M13: Veilige Claude-agent-workflow (Scrum4Me-side) (#26) 2026-05-01 13:42:18 +02:00
debug fix(privacy): NODE_ENV-guard 4 debug-routes (before-launch privacy review) 2026-05-04 14:16:49 +02:00
health Todo description, entity codes, REST API extensions and Claude Code hardening (ST-509/511/512/513) (#2) 2026-04-26 23:40:54 +02:00
ideas api: REST endpoints for ideas (M12 T-500) 2026-05-04 19:55:49 +02:00
products Todo description, entity codes, REST API extensions and Claude Code hardening (ST-509/511/512/513) (#2) 2026-04-26 23:40:54 +02:00
profile/avatar feat(rate-limit): per-user mutation-rate-limiting (v1-readiness #3) 2026-05-04 13:48:59 +02:00
realtime fix(m12): bell loses idea-questions on SSE reconnect 2026-05-05 13:14:48 +02:00
sprints/[id]/tasks Todo description, entity codes, REST API extensions and Claude Code hardening (ST-509/511/512/513) (#2) 2026-04-26 23:40:54 +02:00
stories/[id] feat(rate-limit): per-user mutation-rate-limiting (v1-readiness #3) 2026-05-04 13:48:59 +02:00
tasks/[id] Verify-gate uitbreiden: DIVERGENT/PARTIAL vereist agent-acknowledgement (#53) 2026-05-02 17:45:19 +02:00
todos Todo description, entity codes, REST API extensions and Claude Code hardening (ST-509/511/512/513) (#2) 2026-04-26 23:40:54 +02:00
users/[id]/avatar feat(ST-351): add UserAvatar component and /api/users/[id]/avatar route 2026-04-26 16:15:56 +02:00