Dashboard - #2
Conversation
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
… create pnpm lockfile
… with new components and styles
… status - Introduced a new component that checks the status of the backend API. - Displays a warning banner when the backend connection is lost. - Includes a retry button to manually check the connection. - The status check occurs every 20 seconds. - Updated the pnpm workspace state timestamp.
…management hook Co-authored-by: Copilot <copilot@github.com>
…from configuration; add theme toggle component Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 4 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 58c8c69. Configure here.
| return request<StoryResult>( | ||
| `/api/stories/${encodeURIComponent(name)}/trigger` | ||
| ); | ||
| } |
There was a problem hiding this comment.
API paths break in production static export
High Severity
All probe and story API functions use an /api/ prefix (e.g., /api/probes, /api/stories/...), but the Rust backend serves these at /probes/... and /stories/... (without the prefix). The Next.js dev rewrites strip the /api/ prefix in development, but with output: "export", production builds are purely static files with no server-side rewrites. Every probe/story API call will hit the wrong path in production, breaking the entire dashboard except config and restart.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 58c8c69. Configure here.
| <td className="max-w-[420px] truncate px-4 py-3 text-default-700">{errorMessage}</td> | ||
| <td className="px-4 py-3 text-default-500">1m ago</td> | ||
| <td className="px-4 py-3 text-default-500">3h ago</td> | ||
| <td className="px-4 py-3 font-semibold text-default-800">{Math.max(1, recentResults.length * 53)}</td> |
There was a problem hiding this comment.
Hardcoded placeholder data in Error Groups table
Medium Severity
The Error Groups table contains hardcoded mock values: "First seen" is always "1m ago", "Last seen" is always "3h ago", and the event count uses a synthetic formula Math.max(1, recentResults.length * 53). These don't reflect real data and appear to be placeholder values left from development.
Reviewed by Cursor Bugbot for commit 58c8c69. Configure here.
| } | ||
| } | ||
| const healthPct = | ||
| stats.total > 0 ? Math.round((stats.ok / stats.total) * 100) : 100; |
There was a problem hiding this comment.
Availability percentage decimal places always zero
Low Severity
healthPct is computed with Math.round(...) which returns an integer, then displayed with .toFixed(2). This always produces values like "100.00%" or "50.00%" — the two decimal places are always zero, making the precision meaningless. Either remove Math.round to preserve fractional precision, or drop .toFixed(2).
Reviewed by Cursor Bugbot for commit 58c8c69. Configure here.
| const [loading, setLoading] = useState(true); | ||
| const [createOpen, setCreateOpen] = useState(false); | ||
| const [editProbe, setEditProbe] = useState<Probe | null>(null); | ||
| const [resultsProbe, setResultsProbe] = useState<string | null>(null); |
There was a problem hiding this comment.
Results drawer can never open on monitors page
Low Severity
The resultsProbe state is initialized to null and only ever set back to null in the onClose handler. No code in the monitors page ever calls setResultsProbe with a probe name, so the ResultsDrawer component can never open. This is dead code — the state and the drawer component serve no purpose.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 58c8c69. Configure here.


Note
Medium Risk
Large dashboard refactor/addition with new pages, client-side YAML CRUD, and significant dependency/tooling changes (React 19, Tailwind/HeroUI, Next rewrites), which may introduce runtime/build and API-integration regressions. No backend/runtime monitoring logic is modified.
Overview
Overhauls the
/dashboardNext.js app into a multi-page UI with a persistentSidebar, toasts, theme toggle, and an initial backend-offline banner.Adds new pages for monitor management and drilldowns (list/create/edit/delete/trigger probes backed by editing
xbp.ymlvia/api/config), story list + detail + trigger, and event/result drilldowns with response redaction handling; the home page is reworked into a status/alerts overview with a sharedResultsDrawer.Updates dashboard tooling: switches styling to Tailwind + HeroUI, adds a centralized
lib/api.tswith configurable API base URL (localStorage/env) and improved HTML-error detection, adds dev rewrites to proxy API calls to the Rust backend on:3000, and updates scripts/deps (React 19, HeroUI, Tailwind/PostCSS, pnpm lockfile).Reviewed by Cursor Bugbot for commit 58c8c69. Bugbot is set up for automated code reviews on this repo. Configure here.