In-App Notification Logic Verification & FEEDBACK_RESOLVED Propagation Fix

Sprint 66: In-App Notification Logic Verification & FEEDBACK_RESOLVED Propagation Fix

Decisions

D1: FEEDBACK_RESOLVED type 3-tier synchronization

  • Context: In Sprint 64, FEEDBACK_RESOLVED was added to the Identity entity but was not propagated to Gateway enum and Frontend type/icon, causing feedback resolution notifications to appear with type mismatch and only the default Bell icon.
  • Choice: Apply updates across Gateway enum, Frontend Notification type union, NotificationBell TYPE_ICON/TYPE_ROUTE, and NotificationToast TYPE_ICON
  • Alternatives: None
  • Code Paths: services/gateway/src/common/types/identity.types.ts, frontend/src/lib/api.ts, frontend/src/components/layout/NotificationBell.tsx, frontend/src/components/ui/NotificationToast.tsx

Patterns

P1: Propagation checklist when adding NotificationType enum

  • Where: Identity entity → Gateway types → Frontend api.ts → NotificationBell (TYPE_ICON, TYPE_ROUTE) → NotificationToast (TYPE_ICON)
  • When to Reuse: All 5 files must be updated whenever a new notification type is added

Gotchas

G1: Missed multi-layer propagation when adding enum

  • Symptom: Feedback resolution notification shows default Bell icon on frontend, FEEDBACK_RESOLVED route not specified
  • Root Cause: Enum was only added to Identity entity, missed Gateway/Frontend synchronization
  • Fix: Update all 5 files following P1 checklist. Must apply the same pattern for future new type additions.

G2: NotificationToast TYPE_ICON incomplete

  • Symptom: DEADLINE_REMINDER, MEMBER_JOINED, MEMBER_LEFT, STUDY_CLOSED (4 types) showing Bell fallback icon in NotificationToast
  • Root Cause: 9 icon types registered in NotificationBell but only 5 registered in NotificationToast (missed in initial implementation)
  • Fix: Add 5 missing types + FEEDBACK_RESOLVED to NotificationToast TYPE_ICON (total 10 types fully covered)

Metrics

  • Commits: 1, Files changed: 7