Skip to content

feat: TV wallboard mode, dynamic status-page sections, Slack /solidping commands, CORS allowlist - #288

Merged
fclairamb merged 165 commits into
mainfrom
batch/2026-08-29
Aug 31, 2026
Merged

fclairamb merged 165 commits into
mainfrom
batch/2026-08-29

Conversation

@fclairamb

@fclairamb fclairamb commented Aug 29, 2026 •

Copy link
Copy Markdown
Owner

Batch branch off v0.20.0, covering 24 specs, and absorbing PRs #285 and #289. Every spec was implemented, gated on its own scoped build/lint/test run, and then cleared by an independent completeness audit before being archived to specs/done/2026/08/. specs/todos/ is now empty.

#285 (Slack Marketplace readiness) was already an ancestor of this branch — its content landed here earlier, so merging it was a no-op. #289 contributed the CORS spec, which is implemented below. Both can be closed in favour of this PR.

Note on the changelog: the repo squash-merges with the PR title as the commit subject, so this whole branch lands as the single changelog line above. Per-spec detail lives here and in specs/done/2026/08/.

⚠️ Needs action outside this repo

  • The /saas/slack command table on www.solidping.io is now wrong. It still advertises the standalone /check and /comment commands and the setup/ack subcommands, none of which exist any more. That page lives in the separate solidping-website repo, so this PR cannot touch it. It needs a single /solidping entry documenting: check <url>, comment [#N] <text>, list, create <url>, config, incidents, help.

⚠️ Pulling this branch? Your dev database may silently miss columns

017_v0_21_0 is the single consolidated migration for the unreleased v0.21.0, and it was appended to twice during this batch — first the kiosk-token section, later the section-selector section. bun keys applied migrations on the numeric prefix alone, so any dev database that ran 017 between those two commits has it recorded as done and will never pick up the appended statements. The symptom is a 500 on status-page create: table status_page_sections has no column named selector.

migrationguard catches this and logs it on every boot (WARN in dev, fail in strict). To fix a database that is already in that state, either reset it, or apply the missing statements by hand and run solidping migrate repair. SQLite form:

alter table status_page_sections add column selector text;
alter table status_page_resources add column managed_by_selector boolean not null default false;
create index if not exists status_page_sections_selector_idx
  on status_page_sections (status_page_uid)
  where selector is not null and deleted_at is null;

The Postgres half is the same three statements with selector as jsonb and if not exists guards — take them from postgres/migrations/017_v0_21_0.up.sql.

Nothing deployed is affected — 016 is the last released migration.

⚠️ Behaviour changes worth a reviewer's attention

  • /check and /comment are retired as standalone Slack commands. Both are removed from the dev and prod manifests. Their dispatch arms are deliberately kept for one release, answering ephemerally with "this moved to /solidping check" — a workspace that installed the old manifest keeps its commands registered with Slack until it re-authorizes, so deleting the arms would strand those installs on Unknown command.
  • setup and ack were dropped from the manifest usage hint rather than implemented. The hint now names only subcommands that have handlers, and a test reads the real manifest files and asserts exactly that, so the two cannot drift apart again.
  • The organization section now defaults to Members, not Invitations, matching its own tab order.
  • bun's default: tag was dropped from every non-timestamp column. The tag made bun omit zero values from INSERTs, so an explicit 0/false/"" on create silently became the schema default. This is a repo-wide data-correctness change and the widest-blast-radius commit on the branch.
  • CI now starts the E2E server with self-registration enabled (SP_AUTH_REGISTRATION_EMAIL_PATTERN), required for the confirm-registration spec to run at all. Side effect: membership-requests.spec.ts no longer skips itself, so it executes in CI for the first time.

Features

Status pages

  • TV / wallboard mode (/{org}/{slug}/tv, /{org}/tv, /tv on a custom domain) — one non-scrolling viewport for a room at 4 m: ambient state carried by icon and word and colour, active incidents cycled rather than shrunk, "days since last incident", and a stale treatment that drops the board to grey rather than leaving a frozen green screen during an outage. Includes a page-level uptime aggregate and revocable kiosk tokens so a wallboard can render a non-public page unattended.
  • Dynamic section selectors — a section can carry a membership rule ({"all":true} or {"labels":{…}}) and an idempotent reconciler materializes real resource rows for it, flagged managed_by_selector, so every downstream reader keeps working unchanged. Selector ownership is enforced at the API boundary, provenance is hidden from the public payload, and the reconciler re-runs after check writes.
  • Badge and widget previews link to the status page, and — separately — the copyable
    badge snippets are now links too
    : [![...](badge)](page) and an <img> wrapped in an
    <a rel="noopener noreferrer">. A badge embedded on someone's README or footer was an inert
    image, which is the one thing a status badge must never be. Operator-controlled page names
    are now escaped for both the HTML alt attribute and the Markdown alt brackets.
  • A selector section whose matches are claimed elsewhere now says so. Selector sections
    dedupe page-wide — a check is claimed by the first section that matches it — so a later
    section could render completely empty and look exactly like a label-matching bug. A real user
    reported it as one. The editor now explains it ("All 2 matching checks are already shown in
    'All services'") with the remedy, via new admin-only payload fields that never reach the
    public payload.

Security and correctness

  • CORS * + credentials is spec-invalid, and it made /ingest unusable from any other
    origin.
    corsMiddleware hardcoded Access-Control-Allow-Origin: * together with
    Access-Control-Allow-Credentials: true — a pairing the Fetch standard forbids, so the
    credentials flag never took effect for anyone and every credentialed cross-origin caller was
    refused by the browser. Replaced with a config-driven allowlist
    (SP_CORS_ALLOWED_ORIGINS, defaulting to the app's own public origin) that echoes a matching
    Origin with Vary: Origin. Genuinely public, credential-free surfaces — status pages, the
    embed widget, the ingest proxy — keep * without credentials, since the domains that
    embed them can never be enumerated. Separately, the PostHog proxy forwarded upstream
    Access-Control-* headers on top of our own, so clients saw each header twice (which a
    browser rejects outright and curl cannot detect), and the proxy had no OPTIONS route, so
    preflight got a bare 405 with no CORS headers at all. Both fixed. Nothing was broken by this
    in production today — the dashboard is same-origin — but it blocked www from proxying its
    own analytics.

Onboarding and navigation

  • One-click onboarding defaults — a magic-wand action on the integrations, report-schedules and status-page-create pages creates the sensible default in one click, visible only while the corresponding Getting Started step is outstanding.
  • The onboarding checklist card is tinted and its step rows are clickable.
  • Organization switching from the command palette, plus the ambiguous "Settings" entry renamed to "Organization Settings" without touching the shared nav:settings key.
  • Quick-start check creation lands on the new check's page instead of a generic dashboard.
  • A magic-wand auto-create on the status pages list, matching the integrations wand: one
    click builds a page named after the org with every check attached (paging through the whole
    list, so an org with >100 checks is not silently under-attached) at the create form's own
    defaults, then lands on the new page. The Getting Started checklist CTA now targets the list
    rather than the blank form, so the wand is the first thing offered.

Slack, WhatsApp and email

  • Slack slash commands actually work. /solidping was registered in both manifests and documented publicly, but had no handler — every documented subcommand, /solidping help included, answered Unknown command. It is now routed through the existing mention parser and subcommand router, answering ephemerally, with list/create aliases. /solidping check ACKs immediately and completes via response_url instead of doing a DB write plus an outbound Slack call inside the 3-second budget.
  • Dark-mode email variants — a designed dark palette in the shared email stylesheet, with the preview served behind ?colorScheme=dark and a Light/Dark toggle in dash0.
  • WhatsApp read receipts are sent when an operator reads or replies to a support message.

Docs

  • The changelog is published at /docs/changelog, generated at build time from the root CHANGELOG.md — reference clutter stripped, dependency bumps filtered, scopes mapped to product-facing names. The transform is deliberately tolerant: anything it doesn't recognise passes through verbatim, so a malformed entry can never fail the docs build.

Fixes

Correctness (backend)

  • configEqual was type-blind, so a type-only config edit never reached check_jobs — the worker kept running the old config.
  • PATCH /checks skipped checker.Validate on the merged config, so an invalid partial update was accepted.
  • A cached rate-limit bucket kept stale capacity after an entitlements change, so a plan upgrade did not take effect until the bucket expired.
  • bun's default: tag swallowed zero values on create (see behaviour changes above).

Auth and registration

  • Confirming a registration instantly logged the user out. For a brand-new email matching no org, the confirmation response carried no session, so the frontend persisted the literal string "undefined" as a token, 401'd on the next call, and bounced to login with "session expired" — while the account had been created, so re-registering then failed with email-taken. The zero-org branch now mints a real session, and setSession refuses a falsy token.
  • /register 401-bounced because useFeatures ran on a public route.
  • OrgLayout's auto-switch-org guard raced an explicit switchOrg.

TV wallboard

  • A red board named no failing check. overallStatus is recomputed from live check data on every poll, so the board turns red the instant a probe fails, while activeIncidents are publications gated by autoPublishDelaySeconds (60 s) — and absent entirely when auto-publish is off. In that gap the board rendered a full-screen red System Outage whose only text was "N days since the last incident". It now names the failing checks, worst first, excluding those in a maintenance window; an active publication still wins the panel.
  • Affected services now show how long they have been failing — the public resource payload gained statusChangedAt from the check's existing status_changed_at. Check resources only: a group's status rolls up from a count map with no timestamps, so the field is omitted rather than guessed and the row renders without a duration.
  • The resolved strip says when, not just how long — "3h 0m ago · lasted 8m" instead of "resolved in 8m".

Notifications and UI

  • Slack ack/unack/comment/resolved/reopened thread replies now link the incident first, not the check.
  • Incident page comments rendered as plain text and blended into the Comments card.
  • The check detail page's docs icon sat mid-toolbar instead of top right; a second page had the same misplacement.

Verification

Backend build/lint/test, dash0 and status0 build/lint, unit suites, and — for every spec touching shared code — the full Playwright suite rather than just the spec's own file. That policy earned its keep: it caught a stale assertion left by the organization-tab change, a shared React Query cache key making freshly created entities invisible to the command palette, and three real API-shape bugs in new E2E tests. New user-facing strings are in all four locales with real translations, and a tv-locales guard test pins the TV keys so a new string cannot ship in English only.

The TV fixes were additionally checked with a positive control — reverting just the component and confirming the new assertions fail against the old code — so the added tests are known to test something.

Not included

specs/todos/ is empty as of this branch. Two untracked drafts sit in the working tree — specs/backlog/2026-08-30-08-magic-link-login.md and specs/todos/2026-08-30-09-status-pages-magic-wand-and-checklist-link.md — neither of which is committed here; they are follow-up material for the next batch.

fclairamb and others added 30 commits August 29, 2026 14:54
Prep for the Slack Marketplace submission. The submission itself is gated on
Slack's eligibility floor (10+ active workspaces and 10+ weekly active users),
which we are nowhere near, so this is the paperwork half only.

Manifests (prod + dev):
- The short description was the literal string "Solidping" — the app's own
  name, in the field Slack shows in search results and profile cards. Replaced
  with a real <=10-word description, and the long description rewritten to say
  what the app does in Slack.
- org_deploy_enabled true -> false. Org-ready deployment obliges the app to
  work correctly in Slack Connect channels with external-org members, a test
  matrix nobody has exercised. Re-enable deliberately, not by default.

App Home:
- Surface support, pricing and privacy links. Slack's guidelines require the
  App Home tab to carry support information and pricing; it carried neither.
- The dashboard button was hardcoded to https://solidping.io/dashboard, so a
  self-hosted instance sent its users to the hosted service. Now follows
  Server.BaseURL — read from svc.cfg, not h.cfg: DispatchEvent constructs
  &Handler{svc: svc} with a nil cfg, so h.cfg panics on every app_home_opened
  arriving that way, Socket Mode included. Regression test pins it.

Spec specs/todos/2026-08-29-02 (slash-command namespace), which records the
find that came out of this: /solidping is registered in both manifests with a
[setup|create|list|config|incidents|ack|help] usage hint, and documented on the
public landing page, but DispatchCommand has no case for it — only /check and
/comment. Every documented /solidping subcommand answers "Unknown command"
today, including /solidping help. The spec proposes routing it through the
mention parser that already implements that subcommand tree, and retiring
/check and /comment, whose collision-prone global names are themselves a
Marketplace finding.

Co-Authored-By: Claude Opus 5 <[email protected]>
The palette gains a "Switch organization" group listing the user's other
orgs (excluding the current one), searchable by name and slug, mirroring
AppSidebar's switcher. Selecting one switches then navigates to the new
org's dashboard, toasting on failure. Renders nothing for single-org users.

The palette's Settings item now reads "Organization Settings" via its own
i18n key, leaving the shared nav:settings key (used by the organization
section nav) untouched.
Adds coverage for the new "Switch organization" group (single-org users see
no group; multi-org users can find and switch to another org by name or
slug, landing on its dashboard) and asserts the renamed "Organization
Settings" item stays findable by typing "settings" alone.
… switchOrg

Discovered by the new command-palette org-switch E2E test, but not specific
to it: any switcher UI that does `await switchOrg(slug); navigate(...)`
(AppSidebar, the account/organizations page, and now CommandMenu) can race
OrgLayout's auto-switch-org guard. switchOrg's own internal `/auth/me`
await yields control after it has already updated `org` state but before
the caller's navigate() has changed the URL; OrgLayout, still mounted on
the stale URL, sees a mismatch and fires its own switchOrg() call for the
OLD org, reverting the session mid-flight. Three switch-org requests can
ping-pong and settle on the wrong org depending on which resolves last —
reproduced deterministically, not a flake.

Fix: track whether an explicit switchOrg() call is in flight (module-level
flag in AuthContext, since AuthProvider is a singleton) and skip the
guard's own switchOrg() while one is running. The guard naturally
re-evaluates once the explicit switch's navigate() catches the URL up.
…ot switch organization

Verified the existing implementation (f668e45, 2dd3221, 4e3a9a9) against
the spec: switch-organization group (name/slug search, excludes current org,
renders nothing for single-org users), switchOrg + dashboard navigation with
toast-on-failure, the Organization Settings rename (own i18n key in all four
locales, shared nav:settings key untouched), and the OrgLayout race guard.

QA gate run: tsc --noEmit clean, eslint on touched files shows only the
pre-existing 5 errors/5 warnings (unchanged code), make build-dash0 succeeds,
bun run lint at 42 pre-existing errors (baseline), bun run test:unit 1121/1121
passed, and the full dash0 Playwright suite (side-car on :4017,
SP_RUNMODE=test, --workers=1) ran 661 passed / 10 skipped (pre-existing
env-gated skips) in 18.2m with no failures.
Deterministic, tolerant transform from the root CHANGELOG.md shape into
docs-page-friendly release notes: demoted diff links with stable anchors,
collapsed PR/commit reference clutter, scope-slug -> product-name mapping,
and deps-bullet filtering (with a Maintenance-release fallback). Any
unrecognized shape passes through verbatim so it can never break the docs
build.
Adds scripts/gen-changelog.ts, wired into both `build` and `start`, so the
changelog page can never drift from what release-please last wrote. The
generated web/docs/docs/changelog.md is gitignored alongside the existing
/docs/api/* carve-out.

Also fixes a reference-clutter edge case the transform's own real-data
smoke test caught: release-please sometimes separates two ref groups with
a bare comma instead of putting both refs inside one group, which the
original regex didn't tile all the way to end-of-line and left a raw
commit-hash link behind.
Codifies what the release flow already does informally: entries are
user-facing prose, scopes come from the transform's SCOPE_LABELS table, and
the chore(release) PR pass is the moment to check the rendered
/docs/changelog page. Indexed from wiki/README.md, pointed to from
CLAUDE.md's docs-site bullet.
…matter

@docusaurus/mdx-loader only reads frontMatter.mdx.format to decide
CommonMark vs MDX compilation (see MDXFrontMatterSchema) — a flat
top-level format: md is silently ignored. Caught by make build-docs: the
real CHANGELOG.md already has a literal `"{emoji} {name}"` (line 613,
admin scope), which MDX evaluated as a JSX expression referencing two
undefined variables and crashed static generation for /docs/changelog.
Mirrors CHANGELOG.md's actual admin-scope bullet with unescaped
MDX-shaped braces outside a code span, which is what caught the
mdx-loader frontmatter bug in the previous commit.
/solidping was registered with Slack in both manifests but DispatchCommand
had no case for it, so every documented subcommand (including `/solidping
help`) answered "Unknown command". Reuse the existing mention parser and
router (handleMentionCommand) via a new ephemeral-answering adapter, and
retire the standalone /check and /comment commands to a "moved" notice
kept for backward compatibility with already-installed workspaces.
… drift

Cover the spec's testing checklist directly: empty/help/garbage/check/
comment/list/create/config/incidents subcommands, the legacy /check and
/comment moved-command notices, and a table-driven test that reads each
manifest's /solidping usage hint and asserts every named subcommand has a
dispatch case (solidpingKnownSubcommands) — the drift between the two was
the root cause of this whole spec.

Also drop /check and /comment from both manifests (fresh installs never
register them) and re-point user-facing usage text (commands.go, App Home,
wiki/slack/README.md) at /solidping.
gochecknoglobals on the shared subcommand map, a stray named return,
two lines over 120 chars, misspell (behaviour -> behavior), and
tagliatelle on the manifest test's snake_case JSON tags.
The audit caught a real gap: /solidping check performed a synchronous DB
write followed by a synchronous outbound chat.postMessage call to Slack's
API, both inside the request/response cycle — precisely the kind of thing
that blows Slack's 3-second ACK budget under load or a network hiccup, and
the spec's own claim that this was "already arranged" was wrong.

handleCheckCommand now validates synchronously (fast, local) and, once the
URL is accepted, returns an immediate ephemeral ACK while a detached
goroutine (context.WithoutCancel + a bounded timeout — the request context
would otherwise be canceled the moment the handler returns) performs the
DB write and reports the real outcome — success or failure, never a fake
"it worked" — to Slack's response_url (postResponseURL, response_url.go).
This also drops the old bot-token chat.postMessage call entirely: the
response_url follow-up (response_type "in_channel") is the one confirmation
mechanism now, removing an extra failure-prone outbound call.

incidents/checks list/config/comment need no equivalent treatment: since
solidping_command.go's router adapter already intercepts the app_mention
handlers' reply before they'd post via chat.postMessage (see the respond
field added earlier in this spec), those paths never make an outbound
Slack API call in the synchronous window at all — only a bounded local DB
read. /check and /comment's legacy moved-notice arms stay synchronous and
side-effect-free, unchanged.

Also parameterizes the shared help text's example prefix (@solidping vs
/solidping) by transport, so `/solidping help` no longer shows
mention-syntax examples in the first five seconds a reviewer sees it.

Covered by TestSolidpingCommand_CheckAsyncFollowUp (success + failure,
against a fake response_url server) and
TestSolidpingCommand_CheckWithNoResponseURLFallsBackSynchronously.
…d elsewhere renders empty with no explanation
…e claimed elsewhere renders empty with no explanation
Extend enrichSelectorCounts to report, per dynamic section, how many of
its matched checks are already displayed by an earlier section or a
manual row on the same page — and name the section holding the most of
them. Admin-only, best-effort, no change to reconciliation semantics.
…ewhere

Add SelectorClaimedElsewhereAlert next to the existing truncated notice
on a status-page selector section: fully-claimed sections get the full
explanation naming the claiming section, partially-claimed ones get a
lighter count-only hint. Wires the new selectorClaimedElsewhere /
selectorClaimedSectionName section fields, with locale keys in all four
supported languages.
Drop named returns on claimedElsewhereBySection (nonamedreturns) and
extract enrichSelectorCountsIfDynamic so GetSection/UpdateSection share
the load-state-then-enrich branch, bringing UpdateSection back under
the cyclomatic complexity cap.
…aimed elsewhere renders empty with no explanation
…imed elsewhere renders empty with no explanation
The invite page rendered the destructive "invalid or expired" card for
any failure from useInviteInfo, including a 429, a 5xx, or a network
error. Only a 404 (INVITATION_NOT_FOUND) or 410 (INVITATION_EXPIRED)
means the link is actually dead; anything else is transient and now
renders a distinct, retryable state instead of a dead end.
invitations.spec.ts asserted the inviteUrl shape but never opened the
link — the coverage that would have answered the original "invite link
invalid or expired" report in seconds instead of triggering an
investigation. Adds create -> open logged-out -> see the join card
(org name, role, masked email) -> accept as a new user -> land in the
org, plus the negative: a bogus token shows the invalid card.
The 2026-08-31 report of a fresh invitation link showing "invalid or
expired" was reporter error, not a product defect — both dialects
work. Documents the finding, the two durable fixes that came out of
chasing it (error-conflation split, E2E coverage), and what to check
before re-opening the same hunt.
The reporter confirmed the invitation flow works; the report was in error.
Dropping the spec rather than implementing its residual items.
The Markdown and HTML snippets copied from the status page badge card
pasted a bare image with no link, so a badge embedded on a customer's
site went nowhere when clicked. Both snippets now wrap the badge image
in an anchor to the public status page (absolute URL, same origin as
the badge URL), reusing the same page-path derivation as the existing
preview link. The HTML anchor carries target="_blank" and
rel="noopener noreferrer" since it is pasted onto other people's
pages. pageName is escaped for the HTML alt attribute and Markdown alt
text so a name containing a double quote or square bracket no longer
produces a broken snippet.

Pulled the pure snippet-builder into src/lib/status-page-badge-embed.ts
with unit tests pinning the exact snippet text, including the escaping
cases, and extended the appearance page E2E test to assert the full
linked snippet strings.
@fclairamb fclairamb changed the title feat: Slack /solidping commands, one-click onboarding defaults, and /docs/changelog feat: TV wallboard mode, dynamic status-page sections, Slack /solidping commands, CORS allowlist Aug 31, 2026
…igation race

Two CI-only E2E failures, both test bugs rather than product defects.

magic-wand: the status-pages LIST wand test asserted `isDefault === false`,
but the server promotes an org's FIRST status page to default regardless of
what the payload says (statuspages/service.go, "Check if this should be
default (first page or explicitly set)"). seedOrg builds a fresh org, so the
wand's page is that first page. The create form takes the same path and lands
on the same value, so `false` asserted a behaviour neither surface has —
the parity the test exists to pin is preserved by asserting `true`.

invitations: reading localStorage with a bare page.evaluate right after
waitForURL raced the app's continuing navigation and died with "Execution
context was destroyed". waitForURL resolves on the first match while org
resolution and the dashboard route are still settling. Now polled, so a
destroyed context is retried instead of failing.

Passed locally: both files compile (playwright --list) and lint clean.

Co-Authored-By: Claude Opus 5 <[email protected]>
@fclairamb
fclairamb merged commit b0e3192 into main Aug 31, 2026
12 checks passed
@fclairamb
fclairamb deleted the batch/2026-08-29 branch August 31, 2026 01:38
fclairamb added a commit that referenced this pull request Aug 31, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.21.0](v0.20.0...v0.21.0)
(2026-08-31)


### Features

* TV wallboard mode, dynamic status-page sections, Slack /solidping
commands, CORS allowlist
([#288](#288))
([b0e3192](b0e3192))


### Bug Fixes

* **deps:** update module filippo.io/age to v1.3.2
([#286](#286))
([316a448](316a448))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
This was referenced Sep 8, 2026
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