Commit Graph

55 Commits (2f3f30116cd31504f8f5ea6dde0433ea2086c379)

Author SHA1 Message Date
Konrad Fröhlich a21be253cb
feat(status): second check region (enam) for the website + visible check location (#15)
All 456 of 456 latency samples in the live state come from LHR — a single
run-length entry per monitor, no second value. One vantage point cannot tell
"the service is down" from "the route from this one colo is down".

Adds exactly one second-region monitor (website_enam, worker://enam) with
checkProxyFallback: true, and makes the measured check location visible on
the page instead of hiding it in a hover-only chart tooltip.

checkProxyFallback is mandatory, not cosmetic: without it monitor.ts:397-400
records a failure of the PROBE as up:false / "Unknown check proxy error", so
a probe outage would be published as a service outage.

Co-authored-by: Test User <test@example.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 01:00:21 +02:00
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 fe947b4782
feat(status): claude.com-style banner header, less top whitespace (#9)
Owner 2026-07-13 (status.claude.com reference): the small centred check-icon
left a large empty band above it and read weaker than claude.com's
full-width status banner. Replace icon+giant-title with a horizontal
coloured banner (green ok / red down / amber partial), reduce container top
margin xl->md. next build green.

Co-authored-by: Test User <test@example.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 20:51:30 +02:00
Konrad Fröhlich bb990ed80c
feat(bars): claude.com-style fixed 30-day window + legend row (#8)
Owner direction (status.claude.com reference): fixed 30-day window, bars
share full row width (flex), legend '30 days ago — {uptime}% uptime —
Today' with per-window uptime computed from the same day loop; locale
keys for en/de/fr/zh-CN/zh-TW. Replaces the variable start-based window
(two prior iterations read as broken/empty). next build green.

Co-authored-by: Test User <test@example.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 17:24:34 +02:00
Konrad Fröhlich 450048cb87
fix(bars): NaN guard — zero-incident monitors rendered no bars at all (#7)
montiorStartTime comes from incident[0]; monitors with a clean history
have none, the day-count bound became NaN and the loop never ran (owner
screenshot 17:17, bars vanished). Finite-check with 30-slot fallback.

Co-authored-by: Test User <test@example.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 17:19:13 +02:00
Konrad Fröhlich fa024650d8
fix(bars): skip pre-monitoring no-data days — young pages fill right-to-left (#6)
Owner mobile screenshot 2026-07-13: 90-day window with ~2 days of history
rendered ~88 grey no-data bars + 2 green — read as broken, not new. The
day loop now starts at max(29, days since monitor start) instead of a
fixed 89, so leading no-data days before monitoring began are skipped
(min 30 slots keeps the row substantial). next build green.

Co-authored-by: Test User <test@example.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 17:08:29 +02:00
Konrad Fröhlich 8806a272e8
style(bars): taller & thinner day bars (32px->42px) — land PR#4 on main (#5)
PR#4 ("taller & thinner day bars") merged 22:31 but targeted the wrong base
(feat/status-design-feedback, already merged to main at 22:15) instead of
main, so its commit never reached main and uptimeflare deployed PR#3's 32px
bars. This re-applies the 4-line DetailBar change onto main so the owner's
"Tagesbalken könnten höher sein" ask goes live: height 32->42px, width
7->6px, side margins 1->1.5px (tall-thin claude.com proportion).

Co-authored-by: Test User <test@example.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 01:23:16 +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
Konrad Fröhlich 25b57fbeda
style: match status page to openshopgraph.org design language (#2)
Re-theme the UptimeFlare fork's chrome (surfaces, borders, type, header
wordmark, footer line) to the openshopgraph.org design tokens, sourced
from openshopgraph-frontend-v2 src/styles/site-tokens.css. Monitor set,
check logic and page title/links config are untouched.

- Copy the site's self-hosted Cabinet Grotesk / Switzer / Martian Mono
  woff2 faces (~124 KB) into public/fonts and remap Mantine's CSS
  variables (--mantine-font-family[-headings/-monospace]) to the same
  stacks; drop the next/font/google Inter import (font-CDN-free, same
  rule as the main site's CSP).
- Remap Mantine surface/text/border variables per color scheme
  (--mantine-color-body/text/white/dark-6/dark-4/anchor/dimmed,
  --mantine-primary-color-filled) to --paper/--ink/--card/--hair from
  site-tokens.css; keeps following prefers-color-scheme via Mantine's
  existing defaultColorScheme="auto" script, matching the main site's
  light/dark behavior. Semantic monitor-state colors (green/red icons)
  are left alone on purpose.
- Bump --mantine-radius-{sm,md,lg} to the main site's softer values.
- Replace the generic UptimeFlare <Image> logo in Header.tsx with the
  OSG two-dot wordmark (same glyph as BaseLayout.astro's .top-brand
  mark), linking to https://openshopgraph.org.
- Set pageConfig.customFooter to a one-line footer matching the main
  site's "Verified data, not ads." tone instead of the stock UptimeFlare
  attribution line.

Co-authored-by: Test User <test@example.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 20:44:14 +02:00
lyc8503 da4bfb888d fix: incorrect status icons and counters caused by undefined !== null 2026-01-05 22:35:18 +08:00
lyc8503 e050065a3c [WIP] workers works! (lol) pages+migration todo 2025-12-31 22:19:29 +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 1e0f68721b feat: option to change logo, update docs pic 2025-11-08 12:21:44 +08:00
lyc8503 8aceb68ccc fix: mobile logo style 2025-11-07 02:00:15 +08:00
lyc8503 c2fc0ae8ec feat: set custom footer via config file 2025-11-07 00:01:58 +08:00
lyc8503 14daf3cab1 feat: new logo! finally here. 2025-11-06 23:44:16 +08:00
lyc8503 ee2d23f151 feat: add default UA 2025-11-06 01:02:29 +08:00
lyc8503 78f9f1ee34 fix: page crash when wrong id configured 2025-11-05 01:22:10 +08:00
Nick Pease 03445b59fc
feat: slight style improvements (#153)
- Title case hide + show
- Correct plurality for "maintenance"
2025-11-02 13:57:24 +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
Mack f88e286b9c
Upcoming and active maintenance (#142)
* Updated with intial commit
- MaintenanceAlert.tsx now handles upcoming and active maintenance alerts.
- OverallStatus.tsx updated to include collapsible sections for ongoing and upcoming maintenance alerts.

* Updated MaintenanceAlert layout for better responsiveness

* Revert the uptime.config.ts

* fix: Added type definitions for active and upcoming maintenances

* Update components/MaintenanceAlert.tsx

Co-authored-by: Bennet Gallein <me@bennetgallein.de>

* Update: added `pageConfig.maintenances.upcomingColor` to control upcoming maintenance alert colors.

* Feature: Added a config option for the favicon.

* keep original styles

* remove collapse

* add back a different collapse for upcoming events

* css grid to align date text

* tiny css changes and cleanup

---------

Co-authored-by: Bennet Gallein <me@bennetgallein.de>
Co-authored-by: lyc8503 <me@lyc8503.net>
2025-09-27 21:30:13 +08:00
lyc8503 65408d4962 fix: incident header margin, run prettier 2025-09-21 15:28:59 +08:00
Bennet Gallein 41257c6ae9
feat: incident history (#113)
* feat: add incident history link to links in header

* fix: lower margin-bottom on header to have not that much wasted space

* chore: move footer to own component

* feat: add NoIncidents component

* feat: add incidents history page

* fix: add sorting by date

* fix: fix sorting

* feat: hash linking to individual incidents

* fix: always truthy title

* feat: remove hash

* feat: some link improvements

* feat: improve styles for alert, support mobile devices

* fix: remove unused vars, larger margin

---------

Co-authored-by: lyc8503 <me@lyc8503.net>
2025-09-21 15:18:20 +08:00
lyc8503 790f79d966 feat #115: keep group state on refresh 2025-05-31 21:46:21 +08:00
Bennet Gallein a6c8eb6e12
maintenance mode (#101)
* feat: move types

* feat: add maintenance alert

* feat: move to config/base class to have fallback values on missing exports

* fix: wrong import for types

* Revert "fix: wrong import for types"

This reverts commit ca2b2e3a68.

* Revert "feat: move to config/base class to have fallback values on missing exports"

This reverts commit 9932ea2590.

* fix: imports

* chore: formatting

* fix: handle filtering for global status

* fix: pass props

* fix: ignore active maintenances when sending notifications

* fix: mark as warning when monitor is in maintenance

* fix: title width & warning icon

* fix: remove accordeons again

* alert config/style changes, worker code improve

* update example config

* update example config

* set monitors to be optional

---------

Co-authored-by: lyc8503 <me@lyc8503.net>
2025-05-01 01:09:53 +08:00
lyc8503 4bcf4173ea misc: run prettier 2025-04-19 21:50:43 +08:00
lyc8503 8c818017c1 feat: grouping 2025-03-26 00:33:24 +08:00
lyc8503 074fabfe05 Merge branch 'main' of https://github.com/lyc8503/UptimeFlare 2025-03-25 17:41:44 +08:00
lyc8503 d1857502bb feat: option to hide latency chart 2025-03-25 17:41:32 +08:00
lyc8503 31cb82c747
fix: ts compile error missing key 2025-03-25 17:11:39 +08:00
lyc8503 dabccd83f6 feat: display incident reason 2025-03-25 16:39:05 +08:00
lyc8503 79ea2fba2c fix #54: show date in popup and add touchscreen support 2024-08-21 11:08:01 +08:00
lyc8503 5b6fbdd68a
fix #58: take hyperlink underline back 2024-08-20 17:23:19 +08:00
lyc8503 62ba220fe9 add auto refresh 2024-07-01 00:57:01 +08:00
lyc8503 8102258e3b add logging, use external link 2024-03-18 17:01:58 +08:00
lyc8503 904e0bc49b ts type and ui bug fixes 2024-03-18 16:21:28 +08:00
Eric Wang 0c6556eda9 feat: add notify telegram & bark, and some minor fixes 2024-03-18 00:06:31 +08:00
lyc8503 9bdeec90f2 better callbacks, fix config leak 2023-12-09 14:59:59 +08:00
lyc8503 110a6b548d fix: compilation error when not setting highlight 2023-11-22 16:00:04 +08:00
lyc8503 22ed19e1b2 feat: tooltip for monitor 2023-11-20 02:12:49 +08:00
lyc8503 9436bf2eb6 fix: show today's status bar 2023-11-19 01:03:37 +08:00
lyc8503 499bdf5a88 bar percent finish & responsive ui 2023-11-06 22:54:55 +08:00
lyc8503 87611700c3 format code and no semi 2023-11-06 00:51:41 +08:00
lyc8503 eba65bd654 format code 2023-11-06 00:38:30 +08:00
lyc8503 6157bc0879 add tcp timeout, fix worker stuck 2023-10-28 16:02:22 +08:00
lyc8503 4817fef547 header responsive update, fix worker tcp read 2023-10-28 01:38:21 +08:00
lyc8503 7e694fd9b7 add advanced checks 2023-10-23 15:29:27 +08:00
lyc8503 aef4dedabe iata added, todo fix location 2023-10-23 01:50:25 +08:00
lyc8503 1d431a649f disable ssr & dark mode & bar 2023-10-23 00:54:26 +08:00
lyc8503 59c9ebf82b chart move to component & uptime bar 2023-10-22 19:13:49 +08:00