feat(webui): Settings > Triage reads and saves the Triage route (#1873) #1994

Merged
jason.woltje merged 3 commits from triage-settings into refactor 2026-11-18 21:35:23 +00:00
3 Commits
Author SHA1 Message Date
jason.woltje 0ba50111f6 test(webui): the Triage drawer's no-Triage-request checks skip the static triage-settings.js script every page loads; it carries no data, and the Settings panel's own test shows a non-owner reads no route (#1873, lane triage-settings) 2026-11-18 15:06:03 -06:00
jason.woltje dab07f0ff5 fix(webui): Triage route review round: a save sends the revision its fields were read at, so a route saved elsewhere answers as stale instead of being written over, and an untouched page follows the store; a read follows the repo GET convention, so a LAN dev host with no Fetch Metadata reads the route while a write still needs one matching Origin and same-origin; a zone in another case is stored in its canonical spelling; focus lands on the saved line; the organization catalogues are read in parallel (#1873, lane triage-settings) 2026-11-18 14:40:22 -06:00
jason.woltje 561ff77e48 feat(webui): Settings > Triage reads and saves the Triage route (#1873, lane triage-settings)
GET and POST /api/triage/route, owner only behind the proxy-admin gate, with one
Origin and Sec-Fetch-Site same-origin on a write and Fetch Metadata on a read.
GET returns the stored route or says it is not set, plus the merged catalogue
choices (model keys, availability, compatible installed harnesses) with no
provider, upstream, module, key or path. POST takes model, harness, cap, time
zone and revision, checks the route with checkRoutes against the merged
catalogue (offered, available, compatible, installed), requires a known time
zone with no default, and writes through the store's writeRoute, so the lock,
the revision compare and the receipt are the store's. A stale revision answers
409 with the stored revision. updatedBy is the signed-in owner.

The Settings > Triage page shows only to the owner /api/config marks proxyAdmin.
Model and harness selects (the harness list is the chosen model's), a cap in
tokens, reset 00:00 read only, a time zone, Save. Not set before a first save;
a refusal is one line and keeps the fields; a stale save offers Reload route; a
second Save while one runs does nothing; one line says saving does not start
Triage. cli.mjs keeps route: null for the Triage host.
2026-11-18 14:40:21 -06:00