Repository navigation
Add the DevPulse frontend (auth, org/service/incident CRUD, AI triage/postmortem, dashboard) - #2
Merged
Merged
Conversation
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>
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.
Summary
Test plan
cd frontend && npm test— 132/132 passingnpx tsc -bcleannpm run lintclean (only pre-existing fast-refresh warnings)