Commit Graph
3 Commits
Author SHA1 Message Date
Alessandro 091c3677a5 Retry pending setup prompts after chat preset changes
Emit the existing model-setup-changed signal after successful preset selection or override clearing. The setup gate checks its original chat and retries the retained prompt automatically, preserving new composer drafts and ignoring failed saves.

Validation: 67 focused gate, selector, model-config, and DOM tests passed; the 11 gate tests passed again after final cleanup. Live Docker WebUI checks verified automatic retry after selecting a ready preset and clearing an unconfigured override, with the draft and original chat target preserved.
2026-10-13 23:33:55 +02:00
Alessandro 86fcaedf7c Preserve pending setup prompts and message action order
Keep pending model setup prompts and session recovery until dispatch or queue
insertion is accepted. Defer retries during another send, resolve readiness
and preset editing for the pending chat, and preserve new composer drafts.
Prevent retries from entering another selected chat's queue.

Preserve Detail, Copy, Speak order when actions are inserted or replaced,
without remounting unchanged controls. Add behavioral and browser regressions,
including preset-switch draft persistence, and update the WebUI contracts.

Validation: 84 focused tests passed; git diff --check passed.
2026-10-13 21:52:11 +02:00
linkliti c9c41c6477 fix(webui): keep gate dispatch from double-reading cleared pending
Two concurrent dispatch attempts could both pass the dispatching guard during the canSendToModel network gap; the first cleared pending while the second then read the null store value and surfaced "Cannot read properties of null (reading message)" through the advanced-configuration error toast. Capture pending and raise the latch before the await, and re-verify pending identity after it so stale attempts bail out.

Validation: pytest tests/test_model_gate_dispatch_race.py tests/test_webui_send_pause_responsiveness_static.py tests/test_webui_message_queue_static.py (8 passed), node --check webui/components/chat/model-gate-store.js
2026-10-13 18:06:47 +03:00