fix(web): populate model select boxes from the configured catalog #106

Merged
salmaelsoly merged 2 commits from integration_fix_model_select_boxes into integration 2026-06-11 09:56:17 +00:00
Member

Summary

The model select boxes in the web UI suggested models from a hardcoded six-entry list, so they went stale whenever the operator changed the models: catalog in shrimp.yml. The backend now exposes the actually-configured catalog and the UI populates its model suggestions from it.
image

Closes #105

Changes

  • crates/hero_shrimp_server/src/rpc/methods/admin.rs: config.get now emits a models array (alias, tier, ctx, caps) from hero_shrimp_runtime::global_catalog(), sorted alphabetically; empty when no catalog is loaded.
  • crates/hero_shrimp_server/src/rpc/jsonrpc/tests/chunk_2.rs: new test config_get_includes_model_catalog.
  • crates/hero_shrimp_web/ui/src/store.ts: new shared configuredModels signal populated in loadConfig(); refreshed at boot and after every settings save.
  • crates/hero_shrimp_web/ui/src/components/SettingsModal.tsx: per-phase model datalist populated from the configured catalog; the old hardcoded list kept only as FALLBACK_MODELS.
  • crates/hero_shrimp_web/ui/src/components/CrewPage.tsx: hire-modal Model field gains the same configured-model suggestions via a crew-known-models datalist.
  • crates/hero_shrimp_web/static/: rebuilt UI bundle (app.D5h1qBfB.js).

Free-text provider/model[@backend] entry remains valid everywhere; inputs stay datalist-backed combo boxes.

Test Results

cargo test -p hero_shrimp_server: 308 total, 305 passed, 0 failed, 3 ignored (pre-existing ignored doc-tests).

## Summary The model select boxes in the web UI suggested models from a hardcoded six-entry list, so they went stale whenever the operator changed the `models:` catalog in `shrimp.yml`. The backend now exposes the actually-configured catalog and the UI populates its model suggestions from it. ![image](/attachments/c210adc2-223c-4fa0-9221-6fbefa7815cf) ## Related Issue Closes https://forge.ourworld.tf/lhumina_code/hero_shrimp/issues/105 ## Changes - `crates/hero_shrimp_server/src/rpc/methods/admin.rs`: `config.get` now emits a `models` array (`alias`, `tier`, `ctx`, `caps`) from `hero_shrimp_runtime::global_catalog()`, sorted alphabetically; empty when no catalog is loaded. - `crates/hero_shrimp_server/src/rpc/jsonrpc/tests/chunk_2.rs`: new test `config_get_includes_model_catalog`. - `crates/hero_shrimp_web/ui/src/store.ts`: new shared `configuredModels` signal populated in `loadConfig()`; refreshed at boot and after every settings save. - `crates/hero_shrimp_web/ui/src/components/SettingsModal.tsx`: per-phase model datalist populated from the configured catalog; the old hardcoded list kept only as `FALLBACK_MODELS`. - `crates/hero_shrimp_web/ui/src/components/CrewPage.tsx`: hire-modal Model field gains the same configured-model suggestions via a `crew-known-models` datalist. - `crates/hero_shrimp_web/static/`: rebuilt UI bundle (`app.D5h1qBfB.js`). Free-text `provider/model[@backend]` entry remains valid everywhere; inputs stay datalist-backed combo boxes. ## Test Results `cargo test -p hero_shrimp_server`: 308 total, 305 passed, 0 failed, 3 ignored (pre-existing ignored doc-tests).
config.get now exposes a models array (alias, tier, ctx, caps) from the
global model catalog. The Settings modal per-phase model datalist and
the Crew hire-modal Model field are populated from it, with the old
hardcoded list kept only as a fallback. Free-text entry stays allowed.

#105
salmaelsoly force-pushed integration_fix_model_select_boxes from a022f916a8 to a9da576b1a
All checks were successful
Verify / verify (push) Successful in 13m19s
Verify / verify (pull_request) Successful in 29m55s
2026-06-11 09:23:02 +00:00
Compare
salmaelsoly merged commit d9ea8113fc into integration 2026-06-11 09:56:17 +00:00
salmaelsoly deleted branch integration_fix_model_select_boxes 2026-06-11 09:56:32 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_shrimp!106
No description provided.