Skip to content

feat(oref): Hebrew→English location translations + breaking news integration - #661

Merged
koala73 merged 1 commit into
mainfrom
feat/oref-location-translations
Mar 1, 2026
Merged

koala73 merged 1 commit into
mainfrom
feat/oref-location-translations

Conversation

@koala73

@koala73 koala73 commented Mar 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add static Hebrew→English location map (1,478 entries) generated from eladnava/pikud-haoref-api cities.json
  • Lazy-load location translations in oref-alerts.ts with deduplicated in-flight promise and retry on failure
  • Wire oref siren alerts into the breaking news banner system with stable dedupe key and global cooldown bypass

Details

Part 1 — Location translations: Oref alerts display "Rocket and missile fire" (translated) but all location names stay in Hebrew. The existing STATIC_TRANSLATIONS map only covers ~25 alert type phrases. This PR adds translateLocation() backed by a 1,478-entry map (cities + zones), chained after staticTranslate() in applyTranslations(). The AI fallback still runs for edge cases.

Part 2 — Breaking news integration: Active oref siren alerts now dispatch a breaking news banner with threatLevel: 'critical' and origin: 'oref_siren'. Headline format: "Rocket and missile fire — Ashkelon, Tel Aviv, Haifa +15 areas". Bypasses global cooldown (real rocket alerts must never be suppressed by unrelated news) while still deduping per-event.

Test plan

  • npx tsc --noEmit — 0 errors
  • node --test tests/oref-locations.test.mjs tests/oref-breaking.test.mjs — 21/21 pass
  • node --test tests/edge-functions.test.mjs — 30/30 pass
  • Visual: With active oref alerts, locations show English names
  • Visual: Breaking news banner appears for active siren alerts

…ens into breaking news banner

- Generate static location map from eladnava/pikud-haoref-api cities.json (1,478 entries)
- Lazy-load translations in oref-alerts.ts with retry on failure
- Add dispatchOrefBreakingAlert() with stable dedupe key and global cooldown bypass
- Wire oref siren alerts into breaking news banner on initial fetch and polling updates
@vercel

vercel Bot commented Mar 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
worldmonitor Building Building Preview, Comment Mar 1, 2026 11:59am
worldmonitor-finance Building Building Preview, Comment Mar 1, 2026 11:59am
worldmonitor-happy Building Building Preview, Comment Mar 1, 2026 11:59am
worldmonitor-startup Building Building Preview, Comment Mar 1, 2026 11:59am

Request Review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@koala73
koala73 merged commit c22fe2b into main Mar 1, 2026
2 of 6 checks passed
koala73 added a commit that referenced this pull request Mar 1, 2026
…ens into breaking news banner (#661)

- Generate static location map from eladnava/pikud-haoref-api cities.json (1,478 entries)
- Lazy-load translations in oref-alerts.ts with retry on failure
- Add dispatchOrefBreakingAlert() with stable dedupe key and global cooldown bypass
- Wire oref siren alerts into breaking news banner on initial fetch and polling updates
matthewvecchione1-ops pushed a commit to matthewvecchione1-ops/worldmonitor that referenced this pull request Mar 4, 2026
…ens into breaking news banner (koala73#661)

- Generate static location map from eladnava/pikud-haoref-api cities.json (1,478 entries)
- Lazy-load translations in oref-alerts.ts with retry on failure
- Add dispatchOrefBreakingAlert() with stable dedupe key and global cooldown bypass
- Wire oref siren alerts into breaking news banner on initial fetch and polling updates
@koala73
koala73 deleted the feat/oref-location-translations branch March 4, 2026 19:40

This branch was successfully deployed

4 active deployments
Preview – worldmonitor-startup — 9f061bd2 Deployed Mar 1, 2026 by vercel[bot]
Preview – worldmonitor-finance — 9f061bd2 Deployed Mar 1, 2026 by vercel[bot]
Preview – worldmonitor — 9f061bd2 Deployed Mar 1, 2026 by vercel[bot]
Preview – worldmonitor-happy — 9f061bd2 Deployed Mar 1, 2026 by vercel[bot]
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