Skip to content

fix(oref): show OREF history count in badge and stop swallowing fetch errors#648

Merged
koala73 merged 1 commit intomainfrom
fix/oref-sirens-badge-and-history
Mar 1, 2026
Merged

fix(oref): show OREF history count in badge and stop swallowing fetch errors#648
koala73 merged 1 commit intomainfrom
fix/oref-sirens-badge-and-history

Conversation

@koala73
Copy link
Owner

@koala73 koala73 commented Mar 1, 2026

Summary

  • Badge count now falls back to historyCount24h when no active sirens (was always 0)
  • History fetch errors are logged instead of silently swallowed via .catch(() => {})
  • Shows immediate history summary ("500 alerts in 24h") while full wave data loads

Context

Railway relay bootstraps 500+ OREF history records, but the panel badge showed 0 and no history section rendered. Root cause: setCount(this.alerts.length) only counted active alerts, and loadHistory() errors were silently eaten.

Test plan

  • Verify badge shows historyCount24h when no active sirens
  • Check console for [OrefSirensPanel] History fetch failed if history endpoint is down
  • Confirm history section shows "Loading history..." placeholder before waves load
  • Confirm full history waves replace placeholder once loaded

Badge always showed 0 when no active sirens, even with 500+ history
records from the relay. Three fixes:

- Badge count falls back to historyCount24h when no active alerts
- History fetch errors are now logged instead of silently swallowed
- Shows immediate history summary while full wave data loads
@vercel
Copy link

vercel bot commented Mar 1, 2026

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 9:37am
worldmonitor-finance Building Building Preview, Comment Mar 1, 2026 9:37am
worldmonitor-happy Building Building Preview, Comment Mar 1, 2026 9:37am
worldmonitor-startup Building Building Preview, Comment Mar 1, 2026 9:37am

Request Review

@chatgpt-codex-connector
Copy link

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

@koala73 koala73 changed the title fix(oref): show history count in badge and stop swallowing fetch errors fix(oref): show OREF history count in badge and stop swallowing fetch errors Mar 1, 2026
@koala73 koala73 merged commit 46315cf into main Mar 1, 2026
6 checks passed
koala73 added a commit that referenced this pull request Mar 1, 2026
…rs (#648)

Badge always showed 0 when no active sirens, even with 500+ history
records from the relay. Three fixes:

- Badge count falls back to historyCount24h when no active alerts
- History fetch errors are now logged instead of silently swallowed
- Shows immediate history summary while full wave data loads
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