Skip to content

Add the DevPulse frontend (auth, org/service/incident CRUD, AI triage/postmortem, dashboard) - #2

Merged
ApparentlyTejas merged 30 commits into
mainfrom
frontend-impl
Nov 22, 2026
Merged

ApparentlyTejas merged 30 commits into
mainfrom
frontend-impl

Conversation

@ApparentlyTejas

Copy link
Copy Markdown
Owner

Summary

  • Full React + TypeScript SPA for DevPulse: auth, org/service CRUD, org members, alert rules/events, metrics, incidents with status workflow, AI triage history and postmortem generation, and a dashboard.
  • Backend: one small addition (status/severity query-param filters on the incidents list endpoint) needed by the frontend's incident list.
  • Built task-by-task against docs/superpowers/plans/2026-11-21-frontend-implementation-plan.md, each task individually implemented and reviewed, followed by a whole-branch review and one fix wave addressing cross-cutting gaps (navigation, logout, org-selection persistence, retry policy, stale-404/pagination consistency).

Test plan

  • cd frontend && npm test — 132/132 passing
  • npx tsc -b clean
  • npm run lint clean (only pre-existing fast-refresh warnings)
  • Backend suite unaffected by the one incidents-filter change (existing backend tests cover it)
  • Manual click-through in a browser against a running backend (not done in this session)

ApparentlyTejas and others added 30 commits November 21, 2026 20:34
The edit form always seeds status as "unknown" because the list-row
Service type doesn't carry the real current status, and the update
mutation sent values.status unconditionally. That silently reset a
healthy/degraded/down service back to "unknown" whenever any other
field was edited without touching Status.

Only send status when the user actually changed it (via react-hook-form's
dirtyFields), mirroring the existing "send only if touched" treatment of
description/repository_url.
offset was page-local state keyed only to page clicks, not to
selectedOrgId. Switching orgs while on page 2+ re-queried the new org
with the stale offset, which could show an empty table with a nonzero
total and a confusing "Showing 21-20 of 5" footer.

Reset offset to 0 as soon as the selected org changes, derived during
render rather than in an effect so the stale-offset query is never
issued.
Verified against backend/app/modules/services/service.py's
update_service: it treats an omitted field and an explicit null
identically (if description is not None: ...), so there's no payload
this form can send that means "clear this field". Fixing that needs a
backend change, which is out of scope for this plan -- noting it as an
accepted limitation rather than attempting a frontend workaround.
Open incident count sums all non-resolved incident statuses (open,
investigating, identified, monitoring), not just the literal "open"
status, since the dashboard's open-incident metric is meant to track
outstanding work, not one specific status value.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
AppLayout now links to Dashboard/Services/Incidents/Members with
accent-orange active-state styling, and has a logout button that calls
useAuth().logout() and clears the QueryClient so a fresh in-tab login
doesn't inherit the previous user's cached data.

org-context now surfaces a load failure as a distinct `error` state
instead of silently looking like "zero orgs" (which risked a duplicate
org create on retry), with a retry() the caller can trigger; AppLayout
renders a dedicated error-with-retry view for it. selectedOrgId is also
persisted to localStorage and restored on load (falling back to orgs[0]
if the persisted id is gone), so reloading a URL scoped to a non-first
org no longer breaks.

MembersPage already read its org from context rather than its :id route
param, so the route is now parameterless (/members) to remove the
misleading second source of truth, matching every other org-scoped page.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ServiceDetailPage's tab styling targeted data-[selected], which Base UI's
Tabs.Tab never sets (it sets data-active); switched to data-[active] with
the spec's accent-orange indicator color.

Update mutations in ServicesListPage, IncidentsListPage, and
AlertRulesTab now invalidate onSettled instead of onSuccess, matching
the delete mutations: a 404 on edit (someone else already deleted the
row) now drops that row from the list as soon as the failed save
settles, not only after a later successful edit. ServiceDetailPage's
delete onError now refetches/invalidates like IncidentDetailPage's
equivalent already did, so a 404 on delete shows the not-found state
instead of continuing to display a service that no longer exists.

ServicesListPage and IncidentsListPage now step `offset` back a page
when a query returns `items: []` with `total > 0` at offset > 0 (e.g.
deleting the only remaining row on page 2+), instead of rendering an
empty table under a footer claiming a page that doesn't exist.
AlertEventsTab and MetricsTab switched their emptiness check from
`items.length === 0` to `total === 0`, matching the convention the list
pages already use.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ADME

The default QueryClient used TanStack's default retry policy (3 retries
with backoff, ~7s total), so a 404 showed "Loading..." for several
seconds before the real not-found state appeared, and no test exercised
this because every test file builds its own client with retry: false.
The production client now only retries 5xx/network errors, up to twice;
App.test.tsx adds a test against the real exported client to keep prod
and test config from silently diverging again.

The root README still described the frontend as scaffolded with no
real screens wired to the API, which is no longer true: updated it to
reflect that auth, orgs, services, incidents, alerts, metrics, AI
triage/postmortems, and members are all built.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ApparentlyTejas
ApparentlyTejas merged commit ca6e413 into main Nov 22, 2026
2 of 3 checks passed
@ApparentlyTejas
ApparentlyTejas deleted the frontend-impl branch November 22, 2026 15:14
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