Repository navigation
feat: TV wallboard mode, dynamic status-page sections, Slack /solidping commands, CORS allowlist - #288
Merged
Conversation
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.
…t switch organization
…k sensible defaults (magic wand)
…one-click sensible defaults (magic wand)
…ions in magic-wand.spec.ts
…click sensible defaults (magic wand)
…lick sensible defaults (magic wand)
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.
…face it at /docs/changelog
…ace it at /docs/changelog
/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.
…embed links, and magic-link backlog draft
…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.
…rtial-overlap and manual-row cases
…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.
This was referenced 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]>
Merged
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
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 tospecs/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.
/saas/slackcommand table onwww.solidping.iois now wrong. It still advertises the standalone/checkand/commentcommands and thesetup/acksubcommands, none of which exist any more. That page lives in the separatesolidping-websiterepo, so this PR cannot touch it. It needs a single/solidpingentry documenting:check <url>,comment [#N] <text>,list,create <url>,config,incidents,help.017_v0_21_0is 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 ran017between 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.migrationguardcatches 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 runsolidping migrate repair. SQLite form:The Postgres half is the same three statements with
selectorasjsonbandif not existsguards — take them frompostgres/migrations/017_v0_21_0.up.sql.Nothing deployed is affected —
016is the last released migration./checkand/commentare 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 onUnknown command.setupandackwere 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.bun'sdefault:tag was dropped from every non-timestamp column. The tag made bun omit zero values from INSERTs, so an explicit0/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.SP_AUTH_REGISTRATION_EMAIL_PATTERN), required for the confirm-registration spec to run at all. Side effect:membership-requests.spec.tsno longer skips itself, so it executes in CI for the first time.Features
Status pages
/{org}/{slug}/tv,/{org}/tv,/tvon 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.{"all":true}or{"labels":{…}}) and an idempotent reconciler materializes real resource rows for it, flaggedmanaged_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 snippets are now links too:
[](page)and an<img>wrapped in an<a rel="noopener noreferrer">. A badge embedded on someone's README or footer was an inertimage, which is the one thing a status badge must never be. Operator-controlled page names
are now escaped for both the HTML
altattribute and the Markdown alt brackets.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
*+ credentials is spec-invalid, and it made/ingestunusable from any otherorigin.
corsMiddlewarehardcodedAccess-Control-Allow-Origin: *together withAccess-Control-Allow-Credentials: true— a pairing the Fetch standard forbids, so thecredentials 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 matchingOriginwithVary: Origin. Genuinely public, credential-free surfaces — status pages, theembed widget, the ingest proxy — keep
*without credentials, since the domains thatembed 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 abrowser rejects outright and curl cannot detect), and the proxy had no
OPTIONSroute, sopreflight got a bare
405with no CORS headers at all. Both fixed. Nothing was broken by thisin production today — the dashboard is same-origin — but it blocked
wwwfrom proxying itsown analytics.
Onboarding and navigation
nav:settingskey.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
/solidpingwas registered in both manifests and documented publicly, but had no handler — every documented subcommand,/solidping helpincluded, answeredUnknown command. It is now routed through the existing mention parser and subcommand router, answering ephemerally, withlist/createaliases./solidping checkACKs immediately and completes viaresponse_urlinstead of doing a DB write plus an outbound Slack call inside the 3-second budget.?colorScheme=darkand a Light/Dark toggle in dash0.Docs
/docs/changelog, generated at build time from the rootCHANGELOG.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)
configEqualwas type-blind, so a type-only config edit never reachedcheck_jobs— the worker kept running the old config.PATCH /checksskippedchecker.Validateon the merged config, so an invalid partial update was accepted.bun'sdefault:tag swallowed zero values on create (see behaviour changes above).Auth and registration
"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, andsetSessionrefuses a falsy token./register401-bounced becauseuseFeaturesran on a public route.OrgLayout's auto-switch-org guard raced an explicitswitchOrg.TV wallboard
overallStatusis recomputed from live check data on every poll, so the board turns red the instant a probe fails, whileactiveIncidentsare publications gated byautoPublishDelaySeconds(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.statusChangedAtfrom the check's existingstatus_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.Notifications and UI
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-localesguard 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.mdandspecs/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.