Homeserver status banner from Uptime Kuma (#124) #255

Merged
jared merged 1 commits from server-status-banner into lotus 2026-09-29 12:29:00 -04:00
Owner

Implements #124, following the design approved on the issue (real-client screenshots are there).

The banner is driven by the Kuma status page https://isitup.lotusguild.org/status/matrix, created 2026-09-29. It has three groups:

  • Homeserver: Synapse.
  • Voice calls: LiveKit /rtc/validate, call tokens /sfu/get, and the call page, all checked on their public URLs.
  • Login: Authelia.

What it does

  • One strip at a time, in the existing banner slot. From highest priority:
    1. Server down: this client's connection is lost and Kuma confirms the server is down. It replaces "Connection Lost!".
    2. Server having problems.
    3. Maintenance in progress.
    4. Voice calls down, with a note above Join.
    5. Announcement (a Kuma incident).
    • Sign-in problems shows on the login screen only.
  • Blaming the user's connection: the app says "our status checks say the server is up, so it may be your internet connection" only when Kuma has checked the server since this client's connection dropped, and it passed. A stale "up" proves nothing, because Kuma needs about 90 s to notice an outage, so in that case the plain "Connection Lost!" stays.
  • What counts as down: any monitor in a group failing two checks in a row, either down then down, or Kuma's retry "pending" then down.
  • Fail-quiet: Kuma unreachable or returning garbage shows no banner.
  • Scope: only homeservers listed in config.json → statusPages; others never contact Kuma.
  • Polling: only while the app is visible; every 5 min, or every 60 s while something is wrong or the connection is lost, and at once when the connection drops.

Needs

LotusGuild/matrix PR (CSP connect-src + isitup.lotusguild.org). Until it's installed, the fetches are blocked and the banner stays silent.

Tests

  • Unit: 15 new, using the live page layout.
  • End-to-end: 6 new (e2e/server-status.spec.ts), with Kuma answered by fixtures:
    • calls-down strip, and dismiss surviving a reload;
    • other homeservers make no Kuma requests;
    • a Kuma 500 shows nothing;
    • connection lost + Kuma down → critical "server is down" and no "Connection Lost";
    • connection lost + fresh "up" → "may be your connection";
    • connection lost + stale "up" → plain "Connection Lost".
  • Full suites: unit 1,315 pass; Playwright 26 passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA

Implements **#124**, following the design approved on the issue (real-client screenshots are there). The banner is driven by the Kuma status page **https://isitup.lotusguild.org/status/matrix**, created 2026-09-29. It has three groups: - **Homeserver:** Synapse. - **Voice calls:** LiveKit `/rtc/validate`, call tokens `/sfu/get`, and the call page, all checked on their public URLs. - **Login:** Authelia. ## What it does - **One strip at a time**, in the existing banner slot. From highest priority: 1. **Server down:** this client's connection is lost *and* Kuma confirms the server is down. It replaces "Connection Lost!". 2. **Server having problems.** 3. **Maintenance in progress.** 4. **Voice calls down**, with a note above Join. 5. **Announcement** (a Kuma incident). - **Sign-in problems** shows on the login screen only. - **Blaming the user's connection:** the app says "our status checks say the server is up, so it may be your internet connection" **only when Kuma has checked the server since this client's connection dropped, and it passed**. A stale "up" proves nothing, because Kuma needs about 90 s to notice an outage, so in that case the plain "Connection Lost!" stays. - **What counts as down:** any monitor in a group failing **two checks in a row**, either down then down, or Kuma's retry "pending" then down. - **Fail-quiet:** Kuma unreachable or returning garbage shows **no banner**. - **Scope:** only homeservers listed in `config.json → statusPages`; others never contact Kuma. - **Polling:** only while the app is visible; every 5 min, or every 60 s while something is wrong or the connection is lost, and at once when the connection drops. ## Needs **LotusGuild/matrix PR** (CSP `connect-src` + `isitup.lotusguild.org`). Until it's installed, the fetches are blocked and the banner stays silent. ## Tests - **Unit:** 15 new, using the live page layout. - **End-to-end:** 6 new (`e2e/server-status.spec.ts`), with Kuma answered by fixtures: - calls-down strip, and dismiss surviving a reload; - other homeservers make **no** Kuma requests; - a Kuma 500 shows nothing; - connection lost + Kuma down → critical "server is down" and **no** "Connection Lost"; - connection lost + fresh "up" → "may be your connection"; - connection lost + stale "up" → plain "Connection Lost". - **Full suites:** unit 1,315 pass; Playwright 26 passed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
jared added 1 commit 2026-09-29 12:09:05 -04:00
feat: homeserver status banner from Uptime Kuma (#124)
CI / Build & Quality Checks (pull_request) Successful in 4m12s
CI / Trigger Desktop Build (pull_request) Skipped
CI / Docker image build & smoke test (pull_request) Skipped
CI / Secret scan (gitleaks) (pull_request) Successful in 10s
CI / Playwright smoke (e2e) (pull_request) Successful in 11m58s
6ae0087213
When the homeserver, voice calls or sign-in break, or maintenance is under
way, say so in the app — driven by the Kuma status page
(isitup.lotusguild.org/status/matrix), managed from Kuma's UI. The client
asks Kuma directly (not via our servers) so it still hears "the server is
down" when our servers can't tell it.

- config.json `statusPages`, keyed by homeserver: users of other servers
  never contact Kuma.
- utils/kumaStatus.ts (pure, unit-tested): parse Kuma 2.x's public JSON;
  a group is down when any monitor fails two checks in a row (down+down or
  pending+down); maintenance = windows under way; announcements = incidents.
  One strip at a time: server down (connection lost AND Kuma confirms) >
  server having problems > maintenance > calls down > announcement;
  sign-in problems on the login screen only.
- Wording about the user's own connection: "Connection lost … our status
  checks say the server is up, so it may be your internet connection" ONLY
  when Kuma checked the server after this client's connection dropped and
  it passed; a stale "up" (Kuma needs a minute or two to notice an outage)
  keeps the plain "Connection Lost!".
- useServerStatus: polls only while visible; 5 min, 60 s while something is
  wrong or the connection is lost, at once when it drops; backoff; any
  failure = no banner (Kuma being unreachable never looks like Matrix
  being down); GET only, no cookies.
- UI in the existing banner slot and style (ContainerColor/Line like the
  sync and clock banners); Details expands; dismiss for calls-down and
  announcements (an edited announcement comes back); calls-down note above
  Join; phone: one line + Details.

Needs the CSP connect-src to allow https://isitup.lotusguild.org (matrix
repo) before it can fetch in production; until then it fails quiet.

Tests: 15 unit tests (live page layout, two-check rule, any-monitor rule,
unknown/garbage, UTC beat times, stale-vs-fresh "up", priorities, login vs
client, maintenance, announcements + dismiss/edit); e2e (fixtures for Kuma):
calls-down strip + dismiss across reload, other homeservers make no
requests, Kuma 500 → nothing, lost connection + Kuma down → critical strip
instead of "Connection Lost", + fresh "up" → "may be your connection",
+ stale "up" → plain "Connection Lost". Unit 1315, Playwright 26 passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
jared merged commit 747400ea25 into lotus 2026-09-29 12:29:00 -04:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#255