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.
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.
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