feat: broadcast announcements to guards (AP-043) - #562
feat: broadcast announcements to guards (AP-043)#562navyamidha95339-arch wants to merge 2 commits into
Conversation
|
Nice work on this feature. I reviewed all three changed files and validated the main announcement flow against the current Admin Panel code. The core implementation is correct for the current mock-only scope. The page is connected through the sidebar and protected Admin routes, the title and message validation works, all three audience options are available, the selected audience is shown before sending, and the confirmed mock send is recorded in persistent history. It also correctly explains that no live backend delivery is connected yet. I found two points that should be addressed before the final review:
A small focused test covering the confirmation audience and completed mock-send flow would also help prevent these behaviours from regressing. Apart from those points, the structure and mock workflow look good. Once they are addressed, I believe this will be ready for Krisha’s final review. |
…irm text (AP-043 review feedback) - Replaced custom overlay with the shared Modal component for consistent focus trap, Escape handling, and focus restoration - Confirmation text now includes the selected audience label - Added Announcements.test.jsx covering confirmation-audience display and the completed mock-send-to-history flow

Summary
Adds a Compose Announcement feature for admins to draft and mock-send broadcasts to guard audience segments, with a persisted send history.
Checklist
✅ Compose UI + audience (title, message body, audience dropdown: All Guards / Active Guards Only / Pending Verification)
✅ Confirm before send — explicit confirmation modal restating the title and audience before sending
✅ Mock send + history — localStorage-persisted, survives page refresh
✅ Audience clarity — live "This will be sent to: X" hint on the compose form, repeated in the confirm dialog
⬜ Wire endpoint — explicitly out of scope per ticket ("later"); noted in the UI copy that delivery isn't live yet
Evidence
Screenshots attached: composing an announcement, the confirm-before-send dialog, and the resulting history entry.
Note: Built using the reusable Button/Card/FormField components from AP-016 for visual consistency.


