feat(ai-settings): rebind endpoint status dot to configured x enabled #19

Merged
Ghost merged 2 commits from feat/ai-endpoint-status-dot-config-enabled into develop 2026-06-20 17:22:23 +03:00

Problem

The header dot on each AI endpoint card (Chat / LLM, Embeddings, Voice / STT) used to reflect the last 'Test endpoint' probe result (green/red/gray). That was misleading: a configured-and-enabled endpoint showed GRAY until someone manually clicked 'Test endpoint'.

Change

The dot now reads as the endpoint's health at a glance, derived synchronously from the live form values + the workspace feature toggle — never from a network probe.

Four-state model (resolveCardStatus):

  • ready (green) — configured AND enabled
  • configured (yellow) — configured but the feature toggle is OFF
  • off (gray) — not configured (nothing to enable)
  • warning (orange) — enabled but not configured (a real misconfiguration: the feature is on but will not work; surfaced instead of hidden under gray)

'configured' = model field non-empty AND a base URL available (own OR inherited from chat for embeddings/STT). The API key is optional — local servers (Ollama, speaches) work without one. Source of truth is the live form.values so the dot reacts as the admin types; persistent feature toggles drive the enabled axis.

The 'Test endpoint' probe result stays as text under the button — it just no longer paints the dot.

A Tooltip with a human-readable label wraps the dot so the state is not color-only (colorblind-friendly).

Verification

  • pnpm --filter client test — 62/62 pass (4 new tests for resolveCardStatus, incl. the misconfig (false,true)→"warning" branch).
  • tsc --noEmit on client — clean.
  • pnpm --filter client lintpre-existing infrastructure failure (broken @tanstack/eslint-plugin-query in node_modules, fails at config-load on a clean tree too); unrelated to this change.

Out of scope

Keyboard a11y of the tooltip (the dot <Box> has no tabIndex) — the color state is also signalled by the adjacent Switch, and the backlog asked only for a tooltip; left as a possible follow-up.

## Problem The header dot on each AI endpoint card (Chat / LLM, Embeddings, Voice / STT) used to reflect the last 'Test endpoint' probe result (green/red/gray). That was misleading: a configured-and-enabled endpoint showed GRAY until someone manually clicked 'Test endpoint'. ## Change The dot now reads as the endpoint's health at a glance, derived **synchronously** from the live form values + the workspace feature toggle — never from a network probe. Four-state model (`resolveCardStatus`): - `ready` (green) — configured AND enabled - `configured` (yellow) — configured but the feature toggle is OFF - `off` (gray) — not configured (nothing to enable) - `warning` (orange) — **enabled but not configured** (a real misconfiguration: the feature is on but will not work; surfaced instead of hidden under gray) **'configured'** = model field non-empty AND a base URL available (own OR inherited from chat for embeddings/STT). The API key is optional — local servers (Ollama, speaches) work without one. Source of truth is the live `form.values` so the dot reacts as the admin types; persistent feature toggles drive the enabled axis. The 'Test endpoint' probe result stays as text under the button — it just no longer paints the dot. A `Tooltip` with a human-readable label wraps the dot so the state is not color-only (colorblind-friendly). ## Verification - `pnpm --filter client test` — 62/62 pass (4 new tests for `resolveCardStatus`, incl. the misconfig `(false,true)→"warning"` branch). - `tsc --noEmit` on client — clean. - `pnpm --filter client lint` — **pre-existing** infrastructure failure (broken `@tanstack/eslint-plugin-query` in node_modules, fails at config-load on a clean tree too); unrelated to this change. ## Out of scope Keyboard a11y of the tooltip (the dot `<Box>` has no `tabIndex`) — the color state is also signalled by the adjacent `Switch`, and the backlog asked only for a tooltip; left as a possible follow-up.
Ghost added 1 commit 2026-06-20 13:48:42 +03:00
The header dot on each AI endpoint card (Chat / LLM, Embeddings, Voice /
STT) used to reflect the last 'Test endpoint' probe result - green/red/
gray. That was misleading: a configured-and-enabled endpoint showed GRAY
until someone manually clicked 'Test endpoint'. The dot now reads as the
endpoint's health at a glance, derived synchronously from the live form
values + the workspace feature toggle - never from a network probe.

Four-state model (resolveCardStatus):
  ready      (green)  - configured AND enabled
  configured (yellow) - configured but the feature toggle is OFF
  off        (gray)   - not configured (nothing to enable)
  warning    (orange) - enabled but not configured (a real misconfig:
                        the feature is on but will not work; surfaced
                        instead of hidden under gray)

'configured' = model field non-empty AND a base URL available (own OR
inherited from chat for embeddings/STT). The API key is optional - local
servers (Ollama, speaches) work without one. Source of truth is the live
form.values so the dot reacts as the admin types; the persistent feature
toggles drive the enabled axis. The 'Test endpoint' probe result stays
as text under the button - it just no longer paints the dot.

A Tooltip with a human-readable label wraps the dot so the state is not
color-only (colorblind-friendly). resolveCardStatus is exported and
covered by a Vitest spec (4 cases, including the misconfig branch).
vvzvlad added 1 commit 2026-06-20 17:22:14 +03:00
The configured x enabled status dot is implemented and merged via this
branch, so the backlog plan is no longer needed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Ghost merged commit 151bd7a0e0 into develop 2026-06-20 17:22:23 +03:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vvzvlad/gitmost#19