Skip to content

fix(web): hide LLM health UI when monitoring is not enabled - #1173

Open
santoshkumarradha wants to merge 3 commits into
mainfrom
fix/llm-pill-hidden-when-unmonitored
Open

santoshkumarradha wants to merge 3 commits into
mainfrom
fix/llm-pill-hidden-when-unmonitored

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

Summary

LLM health monitoring is opt-in (agentfield.llm_health in the server config) and off by default. With it off, GET /api/ui/v1/llm/health returns {"enabled": false, "endpoints": []} with no healthy field. fetchLLMHealth parses that as healthy: false, and HealthStrip never checks enabled, 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 when enabled === 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

  • Bug fix

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 --noEmit clean
  • Manual: ran agentfield-server with the default config and opened /ui/dashboard. Before: header shows LLM Degraded and the dashboard shows a "Disabled" LLM card. After: neither appears.
  • Manual: ran with llm_health.enabled: true pointed at an unreachable endpoint. The header shows LLM 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

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.
@santoshkumarradha
santoshkumarradha requested review from a team and AbirAbbas as code owners November 9, 2026 14:51
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.
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

📊 Coverage gate

Thresholds from .coverage-gate.toml: per-surface ≥ 84%, aggregate ≥ 85%, max per-surface regression ≤ 1.0 pp, max aggregate regression ≤ 0.50 pp.

Surface Current Baseline Δ
control-plane 88.10% 87.40% ↑ +0.70 pp 🟡
sdk-go 93.30% 92.00% ↑ +1.30 pp 🟢
sdk-python 94.77% 93.73% ↑ +1.04 pp 🟢
sdk-typescript 92.44% 90.42% ↑ +2.02 pp 🟢
web-ui 84.91% 84.79% ↑ +0.12 pp 🟡
aggregate 86.09% 85.75% ↑ +0.34 pp 🟡

✅ Gate passed

No surface regressed past the allowed threshold and the aggregate stayed above the floor.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

📐 Patch coverage gate

Threshold: 80% on lines this PR touches vs origin/main (from .coverage-gate.toml:thresholds.min_patch).

Surface Touched lines Patch coverage Status
control-plane 0 — ➖ no changes
sdk-go 0 — ➖ no changes
sdk-python 0 — ➖ no changes
sdk-typescript 0 — ➖ no changes
web-ui 4 100.00% ✅

✅ Patch gate passed

Every surface whose lines were touched by this PR has patch coverage at or above the threshold.

This branch has not been deployed

No deployments
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