fabro/apps/fabro-web/app/components
Bryan Helmkamp 09fe367004
feat(web): add "Test models" sweep button on settings/models (#410)
## Summary

`fabro model test` (CLI) probes every configured model with a cheap "Say
OK" prompt and prints a results table. Until now, the equivalent on
`/settings/models` was "open a terminal." This PR adds a single **Test
models** button in the section header that runs the same sweep against
the visible rows and renders per-row results inline. Wire format is the
existing `POST /api/v1/models/{id}/test` — no backend changes.

## Behavior

- One button beside the provider filter + search. Tests *whatever the
table currently shows* (filter + search applied at click time).
- Concurrency cap of 4 to mirror the CLI's `--jobs 4` default.
- Rows render `Queued` → `Testing…` → `Ok` (mint check) or red X +
truncated error (full message on hover via `title`).
- After each sweep, a small `N ok · M failed` chip appears next to the
button (mint when clean, coral on failures).
- Re-clicking starts a fresh sweep over the current view.

## Out of scope (deliberately)

- **No deep-test toggle** — page calls basic mode only; `fabro model
test --deep` still covers that case from the CLI.
- **No per-row Test button** — the page-level sweep replaces it.
- No cancellation, no result persistence across navigation/refresh, no
toast — the inline state *is* the feedback.

## Files

- `apps/fabro-web/app/routes/settings-models.tsx` — `RowState`/`Sweep`
types, `runSweep` worker pool, header button + summary chip, new "Test"
column, `TestStatusCell` component.
- `apps/fabro-web/app/components/state.tsx` — `Spinner` is now exported
(was previously private).

## Test plan

- Click "Test models" with several configured providers → rows flip in
waves of 4; summary lands as `N ok · 0 failed`.
- Revoke a provider's API key, click again → that provider's rows end in
red X with the upstream error in the cell (full text on hover).
- Apply a provider filter, click → only filtered rows test.
- DevTools Network panel → at most 4 in-flight `/models/<id>/test`
requests at any time.

---

[![Compound Engineering
v2.60.0](https://img.shields.io/badge/Compound_Engineering-v2.60.0-6366f1)](https://github.com/EveryInc/compound-engineering-plugin)
🤖 Generated with Claude Opus 4.7 (1M context, extended thinking) via
[Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 22:42:16 -04:00
..
chats refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
runs-list refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
stage-renderers refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
auth-layout.tsx refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
collapsible-file.tsx refactor(web): drop light mode, go dark-only 2026-04-20 09:27:08 -04:00
editable-run-title.test.tsx feat(web): inline-edit run titles in the run header 2026-05-09 11:54:41 -04:00
editable-run-title.tsx refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
event-debug-helpers.tsx refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
event-debug.tsx refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
graph-toolbar-constants.ts refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
graph-toolbar.tsx refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
hover-card-style.ts refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
icons.tsx feat(runs): link stored pull requests 2026-05-08 13:17:08 -07:00
inline-markdown.test.tsx feat(web): render inline Markdown in run titles 2026-05-08 18:30:51 -07:00
inline-markdown.tsx refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
interview-dock.test.tsx refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
interview-dock.tsx refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
interview-label.ts refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
pull-request-chip.test.tsx feat(pr): support GitHub pull request associations (#270) 2026-05-16 12:47:27 -04:00
pull-request-chip.tsx feat(pr): support GitHub pull request associations (#270) 2026-05-16 12:47:27 -04:00
run-summary-panel.test.tsx refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
run-summary-panel.tsx refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
run-waterfall.tsx refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
settings-panel.tsx refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
size-chip.tsx feat(web): add sortable Size column to runs list 2026-05-25 14:07:17 -04:00
stage-context.tsx feat(web): add Context tab to the stage detail view (#340) 2026-05-21 20:19:55 -04:00
stage-insights-sidebar.test.tsx refactor: rationalize server secret scopes (vault-only for optional int… (#401) 2026-05-25 17:26:01 -04:00
stage-insights-sidebar.tsx refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
stage-popover-summary.ts refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
stage-popover.test.tsx refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
stage-popover.tsx refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
stage-sidebar.test.tsx Surface reasoning_effort + speed in stage badge end-to-end (#363) 2026-05-23 13:14:55 -04:00
stage-sidebar.tsx refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
state.tsx feat(web): add "Test models" sweep button on settings/models (#410) 2026-05-25 22:42:16 -04:00
steer-bar.tsx refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
terminal-view-helpers.ts refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
terminal-view.test.ts refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
terminal-view.tsx refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
toast.test.tsx refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
toast.tsx refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00
ui.tsx refactor(web): improve React Doctor score (#405) 2026-05-25 22:41:37 -04:00