Repository navigation
fix(web): hide LLM health UI when monitoring is not enabled - #1173
Open
santoshkumarradha wants to merge 3 commits into
Open
santoshkumarradha wants to merge 3 commits into
santoshkumarradha wants to merge 3 commits into
Conversation
LLM health monitoring is opt-in (agentfield.llm_health). With it off, the
server answers {enabled:false} and the header pill read the missing
healthy field as false, so every default install showed "LLM Degraded".
The pill, its popover row and the dashboard card now render only when the
server reports monitoring as enabled.
The dashboard now draws the LLM card only when monitoring is enabled, so the default fixture says enabled: true, and a new case pins that the card is left out when it is not.
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.
Summary
LLM health monitoring is opt-in (
agentfield.llm_healthin the server config) and off by default. With it off,GET /api/ui/v1/llm/healthreturns{"enabled": false, "endpoints": []}with nohealthyfield.fetchLLMHealthparses that ashealthy: false, andHealthStripnever checksenabled, so every default install showed a red "LLM Degraded" pill in the header even though nothing was being measured.The LLM indicator now shows only once the server reports monitoring as enabled:
HealthStrip: the header pill, its tooltip, the compact popover's LLM row and the LLM part of the aria-label render only whenenabled === true.NewDashboardPage: the "LLM backend health" card is left out when monitoring is off, instead of showing "Disabled".With monitoring enabled, nothing changes: Healthy, Degraded and Down, the circuit-breaker card and the System issues banner all still render.
Type of change
Test plan
cd control-plane/web/client && npx vitest run src/test/components/HealthStrip.test.tsx src/test/components/AppLayout.test.tsx src/test/pages/NewDashboardPage.test.tsx src/test/components/dashboard/LLMHealthWidget.test.tsx(16/16 pass)npx tsc --noEmitcleanagentfield-serverwith the default config and opened/ui/dashboard. Before: header showsLLM Degradedand the dashboard shows a "Disabled" LLM card. After: neither appears.llm_health.enabled: truepointed at an unreachable endpoint. The header showsLLM Degraded, and the dashboard shows the System issues banner and the "Down" card with the circuit open, as before.New tests: the pill is absent when
enabled: false; the pill shows Degraded when enabled with one endpoint down; the dashboard card is absent when monitoring is off.🤖 Generated with Claude Code