Skip to content

feat: show active AMBER Alerts first - #4

Merged
vpetersson merged 1 commit into
masterfrom
feat/amber-alerts
Oct 21, 2026
Merged

vpetersson merged 1 commit into
masterfrom
feat/amber-alerts

Conversation

@vpetersson-bot

Copy link
Copy Markdown
Collaborator

What

The board now shows active AMBER Alerts first. Each load asks NCMEC for active alerts (JSONDataServlet?action=amberAlert&missState=XX, empty for nationwide). If there are any, it shows a child from one at random:

  • The masthead flag reads AMBER Alert and the date row reads Alert issued.
  • The photo and age come from the alert's detail record (action=amberDetail).
  • The QR code links to the alert poster at /poster/AMBER/{amberId}/{personId}.

With no active alert (the usual case), or if the check fails, the app behaves exactly as before and shows a random open case.

Why

Until now the app only drew from NCMEC's open-case search. AMBER Alerts cover the most urgent abductions, and NCMEC publishes active ones at missingkids.org/gethelpnow/amber. Children still missing after an AMBER Alert are already in the open-case search under their regular case numbers, so this change only adds the live alerts.

How it's verified

  • bun test (43 pass), bun run typecheck, bun run lint and bun run build are clean.
  • The endpoint answers CORS from missing-children.srly.io and returns {"alertCount":0,"persons":[]} when nothing is active, as it does today.
  • There's no live alert to test against, so the field names follow NCMEC's own AMBER widget on missingkids.org. It accepts amberId/caseNumber, fullName or first/last name, missingFrom or city/state, and alertDate, plus personId. The parser accepts every variant, and a record it can't read is skipped, so the worst case is today's behavior.
  • Records naming an abductor or companion are dropped, so only the child is ever shown as "Have you seen this child?".
  • I checked the rendering with a mocked alert (fictional data) at 1920×1080 and 800×480. The card fits, and the flag, date label and poster link switch over as expected.

🤖 Generated with Claude Code

Each load now checks NCMEC's active AMBER Alerts (action=amberAlert,
scoped to the configured state). While one is active, the board shows
the child from it, flagged "AMBER Alert" with the alert date, and pulls
the photo and age from the alert's detail record. With no alerts, or if
the check fails, the app falls back to a random open case as before.

Records naming an abductor or companion are dropped so only the child
is ever shown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vpetersson-bot
vpetersson-bot requested a balanced review from Copilot October 21, 2026 12:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error: Your billing is not configured or you have Copilot licenses from multiple standalone organizations or enterprises. To use premium requests, select a billing entity via the GitHub site, under Settings > Copilot > Features.

@vpetersson
vpetersson merged commit 52066ff into master Oct 21, 2026
1 check passed
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.

3 participants