Skip to content

chore: Slack Marketplace readiness (manifest, App Home, command spec) - #285

Closed
fclairamb wants to merge 1 commit into
mainfrom
chore/slack-marketplace-readiness
Closed

fclairamb wants to merge 1 commit into
mainfrom
chore/slack-marketplace-readiness

Conversation

@fclairamb

Copy link
Copy Markdown
Owner

Prep for a Slack Marketplace submission. Assessed against Slack's current requirements (fetched 2026-08-29) and against live prod.

Submission itself is gated on adoption, not paperwork: Slack requires 10+ active workspaces and 10+ weekly active users before an app is eligible. Prod registration opened 2026-08-27, so we are nowhere near. This PR is the half that can be done now.

Manifests (prod + dev)

  • Short description was the literal string "Solidping" — the app's own name, in the field Slack shows in search results and profile cards. Slack wants ≤10 words describing the app. Replaced, and the long description rewritten to say what the app actually does in Slack.
  • org_deploy_enabled: true → false. Org-ready deployment obliges the app to work correctly in Slack Connect channels where external-org members interact with it — a test matrix nobody has exercised. Removes a class of review findings; re-enable deliberately when Enterprise Grid is a real bet.

App Home

Slack's guidelines require the App Home tab to surface support information and pricing. It carried neither — buildAppHomeView returned a static welcome view and discarded both its arguments.

  • Added a help/pricing/support/privacy block.
  • Fixed a latent self-hosting bug in the same function: the "View Dashboard" button was hardcoded to https://solidping.io/dashboard, so a self-hosted instance sent its own users to the hosted service. Now follows Server.BaseURL.
  • That fix needed care: DispatchEvent builds &Handler{svc: svc} with a nil cfg (events.go:29, with a comment asserting cfg is unreachable from the dispatch chain), and app_home_opened routes through it. Reading h.cfg there panics on every App Home open via that path, Socket Mode included. Config is read from h.svc.cfg instead, and TestBuildAppHomeView_OnDispatchEventHandler pins the invariant by building the handler exactly the way DispatchEvent does.

The find: /solidping has no handler

Both manifests register /solidping with the usage hint [setup|create|list|config|incidents|ack|help], and https://www.solidping.io/saas/slack documents eight /solidping subcommands.

DispatchCommand (commands.go:31-42) has cases for /check and /comment and nothing else — grep -rn '"/solidping"' server/ returns zero hits.

So every documented /solidping subcommand answers Unknown command: /solidping today, including /solidping help, which Slack's guidelines specifically require to return usage. It is advertised on the public landing page and it is the first thing a reviewer will type.

Written up as specs/todos/2026-08-29-02-slack-slash-command-namespace.md, which proposes:

  • Route /solidping through ParseMentionText + handleMentionCommand — that subcommand tree already exists and is wired only to app_mention.
  • Reconcile the advertised subcommand set with the implemented one, in one direction or the other. Do not ship a usage hint naming a subcommand with no handler — that mismatch is how this happened.
  • Retire /check and /comment, whose collision-prone global names are themselves a Marketplace finding (Slack asks for namespaced command names; any workspace already defining /check hits a conflict at install). Keep the old arms for one release answering "this moved", since existing installs keep their registered commands until they re-authorize.
  • The spec is explicit that losing /check https://example.com has a real cost — it is the landing page's headline affordance — and flags it as a product call rather than deciding it.

App Home deliberately advertises @SolidPing help, not /solidping help, until that spec lands; TestBuildAppHomeView_DoesNotAdvertiseSlashSolidping enforces it.

Verification

gofmt clean, go vet clean, go test ./internal/integrations/slack/... passes. No Slack app configuration was changed — these manifests are the source of record, and applying them to app A0A606Q2M9A is a separate console action.

Not in this PR

  • The landing page still claims App Home shows "your active incidents at a glance"; the view is static, so that bullet needs softening in solidping-website (or the feature needs building — teamID is already passed in and discarded).
  • Listing screenshots (1600×1000, ≤2MB, app-in-Slack) do not exist anywhere yet.
  • Accepting the Slack Marketplace Agreement and the security questionnaire — Florent's, not the agent's.

🤖 Generated with Claude Code

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]>
@fclairamb fclairamb changed the title Slack Marketplace readiness: manifest, App Home, and the /solidping command spec chore: Slack Marketplace readiness (manifest, App Home, command spec) Aug 29, 2026
@fclairamb

Copy link
Copy Markdown
Owner Author

Superseded by #288 — this branch was already merged into batch/2026-08-29 (its tip is an ancestor, so re-merging was a no-op) and its spec is archived at specs/done/2026/08/2026-08-29-02-slack-slash-command-namespace.md. Closing in favour of #288.

@fclairamb fclairamb closed this Aug 31, 2026
fclairamb added a commit that referenced this pull request Aug 31, 2026
…ng commands, CORS allowlist (#288)

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:

```sql
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.

---------

Co-authored-by: Claude Opus 5 <[email protected]>
@fclairamb
fclairamb deleted the chore/slack-marketplace-readiness branch October 26, 2026 06:47
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