Commit Graph

12 Commits (a21be253cb82ea7a1dbb092776f52865a135a2d2)

Author SHA1 Message Date
Konrad Fröhlich 0615093400
fix(status): /incidents showed 'no incidents' while 14 were recorded (+ mobile header, multi-region prep) (#10)
* fix(incidents): /incidents never received the incident data (P0 false statement)

/incidents got pageProps = [monitors] (2910 B) while / got
[compactedStateStr, monitors] (13119 B). The page therefore rendered only
the hand-written `maintenances` array from uptime.config.ts and, that being
empty, printed "No incidents in this month" — next to a 99.95 % uptime
figure computed from the very outages it was hiding.

Measured against the live state of 2026-07-30 16:45 UTC: 14 recorded
incidents in 2026-07 (8x api_health, 6x mcp), one of them still OPEN
(mcp, "Expected codes: [200,401,405,406], Got: 400"). The page showed zero.

Both halves are fixed, because only fixing the data path would turn the
next load failure back into a silent false statement:

- getServerSideProps now reads `state` from the store, like pages/index.tsx
  does, and the page derives incidents from it (util/incidents.ts).
  Exposure is unchanged: compactedStateStr is already public on /, and the
  monitor list stays limited to id+name (see 377a596).
- NoIncidents gained a `noData` variant, so "we could not look" (no monitor
  state at all) no longer renders as "there were no incidents".

Details of the derivation:
- reads the compacted columns directly instead of uncompact(), which would
  also decode the much larger latency series this page never renders;
- counts an incident for a month when it OVERLAPS it, so an outage across a
  month boundary or a still-open one cannot vanish from the current month;
- skips the worker's zero-length 'dummy' seed record (worker/src/index.ts:51),
  which stores the monitoring start time and is not an outage;
- keeps history of monitors that were removed from the config, under their
  raw id — silently dropping records is the failure being fixed here.

scripts/check-incidents-datapath.ts reproduces the red/green against a real
captured state:
  npx tsx scripts/check-incidents-datapath.ts live-state.json 2026-07
  -> incidents rendered: 14   (structurally 0 before this change)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(header): mobile nav overflowed the 56px header and the 360px viewport

Measured on the live page with Chromium:
  390px  nav group Rect -4.5 .. 60.5 (65px tall) against header 0 .. 56
         -> "Incidents" clipped top and bottom
  360px  document scrollWidth 371 vs clientWidth 360 -> 11px page overflow

One cause for both. The mobile nav renders `link.highlight ||
link.link.startsWith('/')`, which includes the 150px "openshopgraph.org"
entry — whose href is byte-identical to the href of the wordmark on the left
(verified in the DOM: brand href === link href). Wordmark plus two links does
not fit at 360-390px, so the Group wrapped to two 30px rows plus a 5px gap =
65px of content in a header with a *fixed* 56px height, which cannot contain
it and therefore clips it.

- Header.tsx drops nav links that point where the wordmark already points.
  The link is not lost; it is the wordmark.
- Header.module.css uses min-height instead of height on .header/.inner, so
  the next long label makes the header grow instead of silently cutting its
  content off. The Group keeps its default wrapping on purpose: contained
  vertical growth beats horizontal page overflow.

Re-measured on the live DOM with exactly this combination applied:
  360px  overflow 0px, nav 13 .. 43 inside header 0 .. 57
  390px  overflow 0px, nav 13 .. 43 inside header 0 .. 57

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* chore(config): prepare multi-region checks, deliberately left disabled

Requested as "prepare, do not roll out", so this commit adds no active
monitor: only a documented, commented-out block in uptime.config.ts.

Correcting the finding while preparing it: the single vantage point is real,
but it is not Frankfurt. Decoded from the live state of 2026-07-30, all 435
latency samples (145 per monitor, the 12h window) carry loc "LHR" — London.
No monitor sets `checkProxy`, so checks run in whichever colo the cron worker
happens to be scheduled in.

Also correcting the shape of the work: `checkProxy` is one value per monitor,
not a list (worker/src/monitor.ts:361-400). Multiple regions therefore mean
one monitor entry per region — still configuration, but it multiplies the
checks per minute and adds a row to the public page for each region, which is
why this is an owner decision rather than a switch to flip.

The block records the two transports ('worker://<DurableObjectLocationHint>'
and 'globalping://') and the one trap worth knowing before enabling: without
`checkProxyFallback: true` a failing probe is stored as up:false with
"Unknown check proxy error", i.e. a probe outage gets published as a service
outage.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Test User <test@example.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 00:29:27 +02:00
Konrad Fröhlich a863b01da4
style: prominent uptime %, substantial one-tone day bars, OSG favicon (#3)
Owner design feedback (reference: status.claude.com):
- Per-monitor uptime % now prominent: Martian Mono, tabular-nums, 15px
  (.osg-uptime); UptimeFlare already computes/shows the number, so this
  is styling only — no config flag exists or is needed.
- Day-history bars 20px -> 32px tall, radius 3px (solid, uniform row).
- ONE healthy tone: util/color.ts is now binary (ok / down / no-data)
  via CSS vars --osg-ok/--osg-down/--osg-nodata mapped to the main
  site's --ok token (light #1f7a4d / dark #4caf82). Removed all
  yellow/orange/light-green gradations, incl. MonitorList partial-down
  orange. Only the (unused) scheduled-maintenance triangle keeps its
  distinct maintenance color.
- Favicon: ship the exact SVG openshopgraph.org serves (/favicon.svg),
  set pageConfig.favicon, delete UptimeFlare default favicon.png.

Verified: npx @cloudflare/next-on-pages build; page chunk contains
osg-uptime / height:"32px" / var(--osg-ok); no old hue literals remain;
CSS bundle defines --osg-ok for both schemes.

Co-authored-by: Test User <test@example.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 00:16:28 +02:00
Bennet Gallein ef8ab25f44
feat(i18n): add german language (#194)
* feat(i18n): add german language

* fix: change lang

* fix: adjust
2026-02-17 09:50:42 +08:00
Nans-ssss 5a69f52653
Add french translation (#190) 2026-02-15 23:38:39 +08:00
lyc8503 c4cfcc841f Merge branch 'main' of https://github.com/lyc8503/UptimeFlare 2026-01-03 23:31:57 +08:00
lyc8503 e050065a3c [WIP] workers works! (lol) pages+migration todo 2025-12-31 22:19:29 +08:00
Yuan Chiu 3b5cc68d4a
feat: add Traditional Chinese zh-TW (#169)
* feat: add zh-TW

* fix: zh-TW 用語修正
2025-12-31 19:25:28 +08:00
lyc8503 e9d8a1c842 Add Chinese translation (Thank you copilot, and I swear I reviewed the code carefully) 2025-12-23 23:22:33 +08:00
lyc8503 e757e1b970 Global ping as check proxy support (#147)
* WIP: http

* improve error handling

* tcp monitoring looks good

* fix globalping bugs and improve logs

* add globalping param

* looks good, add real call to globalping, todo fallback

* stupid JS, forgot bind this

* feat: add globalping city

* run prettier

* fix no magic

* fix missing country in TCP

* update config template
2025-10-29 22:18:39 +08:00
lyc8503 499bdf5a88 bar percent finish & responsive ui 2023-11-06 22:54:55 +08:00
lyc8503 eba65bd654 format code 2023-11-06 00:38:30 +08:00
lyc8503 aef4dedabe iata added, todo fix location 2023-10-23 01:50:25 +08:00