fix(admin-ui): retry model load once on transient RPC failure (#153) #155
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_aibroker!155
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/admin-ui-model-load-retry"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #153.
What
When the admin UI's initial
loadChatModels()call fails (e.g. transient JSON-RPC blip while the admin process is starting up), the chat model input was pinned atLoading models...forever — thecatchblock only logged toconsole.errorwith no placeholder update, no retry, and no recovery.This change makes the catch block:
Failed to load models — retrying…immediately on first failure.Failed to load models — refresh page(terminal).Search model...as before — no behavioural change on the happy path.Diff
+12 / -3incrates/hero_aibroker_admin/templates/fragments/chat_pane.html. Only thecatchblock + function signature change; success path untouched.Verification (headless browser)
Forced
window.rpcto throw for both attempts and snapshotted the input placeholder + rpc-call counter at fixed offsets:Failed to load models — retrying…Failed to load models — retrying…Failed to load models — retrying…Failed to load models — refresh pageFailed to load models — refresh pageRestored
window.rpcand calledloadChatModels()again; happy path producedvalue=claude-haiku,placeholder=Search model..., 34 models loaded. No regression.Acceptance criteria
Failed to load models — retrying…and schedules a retry after 2 s.Search model...via the existing success path.Failed to load models — refresh pageand stops retrying.