Repository navigation
feat(ui): developer Home shows what is broken, where, and why - #1175
Open
santoshkumarradha wants to merge 3 commits into
Open
santoshkumarradha wants to merge 3 commits into
santoshkumarradha wants to merge 3 commits into
Conversation
The dashboard summary counted the rows of a list capped at 10,000 and the enhanced dashboard sampled 50,000, so both stopped counting there. Counts now come from COUNT queries over the requested range, and the enhanced view says when its detail panels were drawn from a sample. Agent status came from a live probe that reported "offline" for agents whose recorded health was active and lifecycle ready. It now follows the recorded heartbeat and lifecycle. Incidents were picked from the sampled rows regardless of the time range; they are now the newest failures inside the range. GET /api/ui/v1/dashboard/home?window=1h|6h|24h|7d returns, from indexed queries over existing tables: totals and a bucketed series, a seven-day baseline, failures grouped by the failing endpoint and a normalized message, caller-to-target call edges with failed and held counts, per-endpoint calls, failure rate, p50/p95, callers and direct versus trigger entry, pending approvals, and the entry points that ran through any agent whose heartbeats stopped. Spend, webhooks, triggers and the event forwarder appear only when they are in use. Tested on SQLite and Postgres. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
Home now reads /dashboard/home and shows, top to bottom: a status line, alert banners from fixed rules (an agent that stopped heartbeating with the entry points that ran through it, a failure rate well above usual, trigger dead letters, an open LLM circuit or a full concurrency limiter when those are configured), figures against their usual level, a call map with failing edges in red and held edges in amber, problems grouped by cause, an endpoints table, what is waiting on people, triggers/webhooks/forwarder when in use, and recent runs. An install with no agents shows only a "Connect your first agent" panel. Execution events refresh Home at most once every five seconds. The header no longer reports LLM health as degraded when LLM health monitoring is not configured. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
Contributor
📊 Coverage gateThresholds from
✅ Gate passedNo surface regressed past the allowed threshold and the aggregate stayed above the floor. |
Contributor
📐 Patch coverage gateThreshold: 80% on lines this PR touches vs
✅ Patch gate passedEvery surface whose lines were touched by this PR has patch coverage at or above the threshold. |
This branch has not been deployed
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.
Why. Users told us Home didn't say when an agent had gone down. Counts stopped at 10,000. Failures were listed per run, not by cause. Nothing showed what was waiting on a person.
Summary
Home now answers three questions: what is broken, where it is, and why. Every number comes from a query over tables the control plane already records. A card for a feature that isn't in use is left out, and an unknown value shows as
—.Alert rules. All thresholds are fixed and printed under each banner:
Live refresh. Home rides the existing execution SSE stream. Invalidation is coalesced to at most one refetch every 5 s: the first event refreshes immediately and a burst folds into one trailing refresh. Polling covers agents going silent, which emits no execution event.
Header fix. The header stopped showing "LLM Degraded" when LLM health monitoring isn't configured. The endpoint returns
enabled: false, healthy: falsein that case, so the header used to contradict Home.Data fixes
Each fix has a test that fails on
main:mainmain→ branch)COUNTover the dayTestDashboardSummaryCountIsNotCapped(10000 → 50010)COUNTs;detail_sampledflags sampled panelsTestEnhancedDashboardCountsAreNotCapped(50000 → 50010)TestDashboardAgentStatusFollowsRecordedHeartbeat(Running 0 → 1),TestRecordedAgentStatusTestEnhancedDashboardIncidentsAreTheNewestInRange(0 → 10)Left out, because the data isn't recorded
503 node_unavailablebefore an execution exists. Home can name the entry points that ran through a stopped agent, but it cannot count the refused calls.execution_usagerows exist.Evidence
Before:
main's Home, on the same database withorder-orchestratorstopped. It shows "10000 runs today" (the real count was 18,000+) and nothing about the stopped agent.After: one agent stopped (dark). The mesh ran for about 45 minutes, then the
order-orchestratorprocess was killed by PID. The banner names the five entry points whose runs reached it. The problems table also shows the child calls that timed out when it died.After: one agent stopped (light).
After: healthy. The agent was restarted. The problems listed are real failures still inside the 1 h window.
After: fresh install.
"usual —" in the screenshots is honest: the mesh was younger than the window, so there is no baseline yet.
Tests
go test -tags sqlite_fts5 -count=1passes on:./internal/storage/./internal/handlers/..../internal/server/..../internal/services/..../pkg/types/pgvector/pgvector:pg17,POSTGRES_TEST_URL), as/sqliteand/postgressubtests:TestQueryDeveloperHomeTestQueryDeveloperHomeEmptyInstallTestCountsAndRecentFailuresFollowTheRangego build ./...andgo veton the touched packages are clean.npx vitest run: all files pass. New:homeModel.test.ts(16),NewDashboardPage.test.tsx(10), the coalescing test inuseSSEHooks.test.tsx, and the not-configured LLM test inHealthStrip.test.tsx.npx tsc --noEmit -p tsconfig.app.json: clean.eslint: clean on touched files.npm run build: passes.Timing at 250,000 executions (seeded locally, measured against a running server):
mainSQLitemainPostgres/dashboard/summary/dashboard/enhanced/dashboard/home1h (cold / refresh)/dashboard/home24h (cold / refresh)/dashboard/home7d/dashboard/enhancedis somewhat slower because it now issues exactCOUNTs beside the sample. On the live mesh (~19k calls/hour),/dashboard/home?window=1hanswers in about 60 ms.Merge Danger
Door:
/dashboardroute (NewDashboardPage) is rewritten.GET /api/ui/v1/dashboard/homeis new./dashboard/summaryand/dashboard/enhancedchange how they count, and how they derive agent status and incidents.StorageProvider.Blast Radius: Moderate.
StorageProvideroutside this repo must add the five methods. The in-tree mocks are updated./dashboard/summaryand/dashboard/enhancednow return larger counts than before. Those are the true counts.components/dashboard/stay, because their tests still import them.