Skip to content

feat: announcements subsystem (admin + site banner)#1999

Merged
cdcore09 merged 9 commits into
cdcore09/site-redesignfrom
cdcore09/announcements-implementation
May 27, 2026
Merged

feat: announcements subsystem (admin + site banner)#1999
cdcore09 merged 9 commits into
cdcore09/site-redesignfrom
cdcore09/announcements-implementation

Conversation

@cdcore09
Copy link
Copy Markdown
Contributor

Summary

Plan 3 of 5 from the events / announcements / forms brainstorm. Lands the announcements admin + the public `` on top of the Plan 1 foundation (#1994) and Plan 2 events patterns (#1998).

Admin API

  • `POST/GET /admin/announcements` — create draft + list with filters (status/scope/host/q)
  • `GET/PATCH /admin/announcements/:id` — detail (with reviews/comments/audit) + patch gated by `canEditArtifact`
  • `POST /admin/announcements/:id/transitions` — wraps `applyTransition` (action set omits `cancel` — announcements have no cancel action, only archive)
  • `POST /admin/announcements/:id/comments` — comment endpoint using `sanitizeCommentBody`

Admin UI

  • `/admin/announcements` list with status filter + search
  • `/admin/announcements/new` compose form (title, body, link URL, expiresAt)
  • `/admin/announcements/:id` detail page with Identity / Content / Review / Audit tabs
  • Sidebar nav: new Announcements entry at slot 06 (Recognition, Settings, Audit shifted up)

Public UI

  • `` mounted in the public app shell above ``. Calls `GET /announcements/active-banner` (already shipped from Plan 1) and renders the banner when one is active. Dismissible per banner-id via localStorage.
  • Returns null today since no announcement has a `posted` `site_banner` channel yet — Plan 5 wires the broadcast flow that flips channels to `posted`.

Stats

  • 10 commits, atomic, conventional, zero AI attribution
  • 18 new vitest tests on top of 216 → 234 total pass
  • Full repo typecheck clean

Test plan

  • CI green (Cloudflare Pages preview deploys; CircleCI legacy may error — expected)
  • Manual: super_admin creates an announcement, submits, second super_admin approves twice — announcement publishes
  • Manual: until Plan 5 ships, the banner does not appear (active-banner returns null) — visit `/` and confirm no banner renders
  • Manual: announcement with `expiresAt` in the past auto-transitions to `expired` via the Plan 1 `effectiveStatus` read-time logic

Plan + spec

Deferred to subsequent plans

  • Broadcast tab on announcement detail — Plan 5 (makes banners actually appear via channel approval)
  • Attached form section — Plan 4
  • Public `/announcements` index page — spec §7.4 defers indefinitely

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying us-rse-admin with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8a6334f
Status: ✅  Deploy successful!
Preview URL: https://a060ab6b.us-rse-admin.pages.dev
Branch Preview URL: https://cdcore09-announcements-imple.us-rse-admin.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying usrse-github-io with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8a6334f
Status: ✅  Deploy successful!
Preview URL: https://f6ae3127.usrse-github-io.pages.dev
Branch Preview URL: https://cdcore09-announcements-imple.usrse-github-io.pages.dev

View logs

@cdcore09 cdcore09 merged commit 976bbc8 into cdcore09/site-redesign May 27, 2026
2 of 3 checks passed
@cdcore09 cdcore09 deleted the cdcore09/announcements-implementation branch May 27, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant