Scrum4Me/components
Madhura68 9e8f33b96e fix(m12): user can answer idea-questions — inline + bell support
Two gaps discovered during the first live grill-session of IDEA-002:
the agent posted a question, but the user had no UI to answer it.
1. Idea-questions only appeared on the Timeline-tab as read-only entries
2. Notifications-bell fetched + handled story-questions only

This fix:

**Inline answer-form in IdeaTimeline** (components/ideas/idea-timeline.tsx)
- Open questions now render an AnswerForm directly under the question text
- Multi-choice options become clickable buttons (one-click submit); free-text
  fallback via collapsed details/textarea
- Plain free-text questions render textarea + Verzend
- Calls existing answerQuestion server-action; toast + router.refresh on success

**Notifications-bell extended for idea-questions**
- stores/notifications-store.ts: NotificationQuestion → discriminated union
  (kind: 'story' | 'idea'); forYouCount treats idea-questions as always-for-you
  (idea is strictly user_id-only — only the owner sees them)
- components/notifications/notifications-bridge.tsx: parallel fetch of
  story-questions (productAccessFilter) + idea-questions (idea.user_id ===
  session.userId); merged + sorted by created_at
- components/notifications/notifications-sheet.tsx: renders idea_code/title
  for kind='idea'
- components/notifications/answer-modal.tsx: header + open-link branch on
  kind (idea → /ideas/[id]?tab=timeline; story → existing /sprint link)
- lib/realtime/use-notifications-realtime.ts: idea-question events also
  trigger close+reconnect on 'open' (loads fresh detail) and remove(id) on
  non-open — same pattern story-questions already use
- components/shared/notifications-bell.tsx: badge counts idea-questions as
  for-you regardless of assignee

**Security gap closed (actions/questions.ts answerQuestion)**
Before: accepted any answer if user has product-access.
After: idea-questions require idea.user_id === session.userId; story-
questions keep the existing productAccessFilter path. (Prisma 7 rejects
\`{ not: null }\` in WHERE; routing happens app-level after a single fetch.)

Tests: 546/546 still green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 13:05:39 +02:00
..
auth feat: ST-006-ST-008 auth pages, middleware, nav shell en dashboard 2026-04-24 11:18:42 +02:00
backlog Merge pull request #88 from madhura68/feat/a11y-tap-targets-aria 2026-05-04 14:09:13 +02:00
dashboard fix(a11y): tap targets ≥28px + aria-pressed on pbi-card (Lighthouse 86 → ≥95) 2026-05-04 14:03:37 +02:00
dialogs feat(product-dialog): conform aan dialog-pattern + entity-profile 2026-05-04 07:18:39 +02:00
entity-dialog M14: TaskDialog (create/edit) + story auto-promotion (#21) 2026-04-30 16:55:20 +02:00
ideas fix(m12): user can answer idea-questions — inline + bell support 2026-05-05 13:05:39 +02:00
mobile feat(ST-1136): mobile Settings-pagina + LogoutButton (T-325/T-326/T-327) 2026-05-04 10:12:19 +02:00
notifications fix(m12): user can answer idea-questions — inline + bell support 2026-05-05 13:05:39 +02:00
products feat(dashboard,nav): edit-knop op productlijst + zichtbare product-switch 2026-05-04 06:30:00 +02:00
settings feat(rate-limit): per-user mutation-rate-limiting (v1-readiness #3) 2026-05-04 13:48:59 +02:00
shared fix(m12): user can answer idea-questions — inline + bell support 2026-05-05 13:05:39 +02:00
solo fix(a11y): static accessibility findings (v1-readiness #4 — code-side) 2026-05-04 13:58:34 +02:00
split-pane feat(M14): 3-pane backlog — generic SplitPane, BacklogStore, SSE realtime, card-grid TaskPanel (#22) 2026-04-30 18:16:07 +02:00
sprint feat(sprint): edit-icoon op taak in Taken-kolom 2026-05-04 09:21:35 +02:00
todos ui: "→ Idee" promote button in TodoCard + PromoteIdeaDialog (M12 T-514) 2026-05-04 21:42:59 +02:00
ui M12 / ST-1109: PBI krijgt een status (Ready / Blocked / Done) (#16) 2026-04-29 17:52:34 +02:00
markdown.tsx M14: TaskDialog (create/edit) + story auto-promotion (#21) 2026-04-30 16:55:20 +02:00