Skip to content

feat: add pubsub section to the health page - #31788

Merged
spikecurtis merged 1 commit into
spike/gru-100-pubsub-health-reportfrom
spike/gru-100-pubsub-health-ui
Nov 13, 2026
Merged

spikecurtis merged 1 commit into
spike/gru-100-pubsub-health-reportfrom
spike/gru-100-pubsub-health-ui

Conversation

@spikecurtis

@spikecurtis spikecurtis commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #31621.

Adds a Pubsub section to the deployment health page (/health/pubsub). It shows:

  • the pubsub severity dot and the mute-warnings button,
  • the report error, if one is set,
  • each warning, with a link to its docs (EPS01, EPS02),
  • the backend in use (postgres or nats).

The section is added to the health sidebar. Storybook stories cover the default, warning (NATS), and error states.

Plan and decisions
  • The page follows the same pattern as DatabasePage: it reads the report from the outlet context and renders warnings as dismissible Alerts with HealthMessageDocsLink.
  • Warning keys use code-message instead of code. The NATS backend can report the same code (EPS01) once for each publish and subscribe connection, so a key on code alone could repeat.
  • The page shows pubsub.error as an error Alert, because the server sets error when the report cannot be produced.
  • If the backend is empty, the page shows "Unknown".
  • The sidebar entry comes from the existing sections map in HealthLayout, so the severity dot and the dismissed state work the same way as in other sections.
  • Stories: Pubsub (default MockHealth), WithWarnings (NATS with EPS02 and two EPS01 warnings), WithError.

Generated by Coder Agents on behalf of @spikecurtis.

@spikecurtis
spikecurtis added this pull request to stack #31622 November 5, 2026 15:32
@linear-code

linear-code Bot commented Nov 5, 2026

Copy link
Copy Markdown

GRU-100

@spikecurtis
spikecurtis force-pushed the spike/gru-100-pubsub-health-ui branch from 65f846c to c9e83fe Compare November 12, 2026 13:09
@spikecurtis
spikecurtis marked this pull request as ready for review November 12, 2026 13:31
@spikecurtis spikecurtis changed the title feat(site): add pubsub section to the health page feat: add pubsub section to the health page Nov 12, 2026
@spikecurtis
spikecurtis requested a review from cstyan November 12, 2026 13:32
bpmct added a commit that referenced this pull request Nov 12, 2026
…the wait (#32097)

The doc-check chat keeps running in Coder after the job stops waiting at
40 minutes, and it posts its own comment when it is done. When the local
model is busy, reviews run past the wait and the check goes red even
though nothing failed. 33 of 46 doc-check runs today ended red this way,
including on #32088, #31788, #31621 and #31620.

## Changes

- `continue-on-error` on the agents-chat-action step.
- New step that ends with a notice when the wait timed out and the chat
is still `running` or `pending`, and fails the job for every other
error.

Generated by Coder Agents on behalf of @bpmct.

@cstyan cstyan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, I think I understand the typescript code + chain of PRs enough to say this will work. I'm not very familiar with the go -> ts types generation though.

A couple questions, but none are blocking:

  1. I think none of the docs/swagger changes are needed here in this PR? make gen is failing in earlier parts of the stack so shouldn't those changes be there?
  2. I think the PR description about the ordering of the sub pages is incorrect? technically we did put pubsub in after database in the list, but AFAICT we sort the visible sections
  3. Do we want to do any mapping of go backend name to something nicer? currently we'd just print postgres, nats, memory. Should those be Postgres/PostgeSQL, In-memory`, etc.?

@coderagents

coderagents Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Documentation Check

Both findings below are about docs/admin/monitoring/health-check.md, which is not part of this PR's own diff (that page's Pubsub section was added by the stacked base branch, PR #31621). GitHub won't anchor inline comments to a file the PR doesn't touch, so both are reported here instead, per this skill's rule that such findings go in the summary.

Blocking

  • docs/admin/monitoring/health-check.md (open) - Line 333, "This section appears in the [JSON response]...", is now misleading. This PR adds a dashboard page for Pubsub at /health/pubsub (sidebar entry in HealthLayout.tsx:50, routed in router.tsx:821), but the docs still tell the reader Pubsub is JSON-only, unlike every sibling section (Access URL, Database, DERP, Websocket, Workspace Proxy, Provisioner Daemons), which are introduced purely as dashboard sections. Drop or rephrase the sentence so Pubsub reads like its peers. (Newcomer)

Suggestions

  • docs/admin/monitoring/health-check.md line 332: the dashboard's new Backend field (PubsubPage.tsx:56) can show "Unknown" when the backend can't be determined, but the docs only name nats and postgres. Non-blocking: "Unknown" only appears alongside the report's error alert, so the reader isn't left guessing, but naming the state would help. Suggested addition: "If the backend can't be determined, the Backend field in the dashboard shows "Unknown"." (Newcomer)
Findings for agents
- id: learner-1
  persona: learner
  class: missing
  blocking: true
  file: docs/admin/monitoring/health-check.md
  line: 333
  quote: "This section appears in the [JSON response](../../reference/api/debug.md#debug-info-deployment-health)."
  evidence:
    - site/src/router.tsx:821
    - site/src/pages/HealthPage/HealthLayout.tsx:50
    - site/src/pages/HealthPage/PubsubPage.tsx:17-63
  rule: null
  problem: The sentence tells the reader Pubsub is JSON-only; this PR adds a dashboard page for it, unlike every sibling section's plain dashboard introduction.
  fix: Drop or rephrase the sentence so Pubsub is introduced like its peer sections.
  verified: true
- id: learner-2
  persona: learner
  class: suggestion
  blocking: false
  file: docs/admin/monitoring/health-check.md
  line: 332
  quote: "The health check reports which pubsub backend the Coder replica uses, either `nats` for the embedded NATS server or `postgres` for PostgreSQL, and whether that backend is connected."
  evidence:
    - site/src/pages/HealthPage/PubsubPage.tsx:54-57
  rule: null
  problem: The Backend field can show "Unknown" (empty backend), a state the docs don't name.
  fix: Add a sentence naming the "Unknown" state.
  verified: true

Automated review via Coder Agents. Reply to a finding's thread with the reason if the finding is wrong.

@spikecurtis
spikecurtis force-pushed the spike/gru-100-pubsub-health-ui branch from 86b885c to fb16d48 Compare November 13, 2026 15:43
@spikecurtis
spikecurtis temporarily deployed to docs-preview November 13, 2026 15:46 — with GitHub Actions Inactive
Shows the pubsub backend, any error, and each warning with a docs link,
and lets admins mute the section like the others.
@spikecurtis
spikecurtis force-pushed the spike/gru-100-pubsub-health-ui branch from fb16d48 to 9cd74ca Compare November 13, 2026 15:53
@spikecurtis

Copy link
Copy Markdown
Collaborator Author

Approving, I think I understand the typescript code + chain of PRs enough to say this will work. I'm not very familiar with the go -> ts types generation though.

A couple questions, but none are blocking:

1. I think none of the docs/swagger changes are needed here in this PR? `make gen` is failing in earlier parts of the stack so shouldn't those changes be there?

Yeah, fixed below in the stack.

2. I think the PR description about the ordering of the sub pages is incorrect? technically we did put pubsub in after database in the list, but AFAICT we sort the visible sections

Dropped it from the description.

3. Do we want to do any mapping of go backend name to something nicer? currently we'd just print `postgres`, `nats`, `memory. Should those be `Postgres`/`PostgeSQL`, `In-memory`, etc.?

Personally, I don't mind showing "debug" looking stuff in the health check page. Zero of our Coder operators are going to see "postgres" as having a different meaning than "PostgreSQL".

@spikecurtis
spikecurtis merged commit 25e7789 into main Nov 13, 2026
30 of 31 checks passed
@spikecurtis
spikecurtis deleted the spike/gru-100-pubsub-health-ui branch November 13, 2026 16:20
@spikecurtis
spikecurtis temporarily deployed to docs-preview November 13, 2026 16:20 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
docs-preview — 9cd74ca6 Deployed Nov 13, 2026 by spikecurtis via cleanup #41
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.

2 participants