Repository navigation
feat(ui): type while GAIA works, see context fill, retry with another model - #5241
kovtcharov-amd merged 26 commits into
Conversation
… model You couldn't send a message while a reply ran, the chat only said older turns were gone after they were cut, and comparing two local models meant retyping the question and losing the first answer. - Messages typed mid-turn go to the running reply, which reads them at its next step. When it can't take them, they wait in a visible queue and go out in order once the reply ends. Stop puts them back in the composer. - A context meter beside the model chip shows how full the window is, split into system prompt, tools, documents and conversation. Before older turns leave the model's view, a note names them by their question. Nothing is summarised or compacted. - "Retry with…" on the latest answer asks another local model from the same evidence (tools are not run again) and shows both answers with time and speed. Keeping one continues the chat from it. Refs amd#5224, amd#5227
The chat now prompts "Add to this request, or queue the next one" while a reply runs, so the source check looks for all three placeholders.
Messages sent back to back went into the running reply, and a model that ends its turn without addressing them left them unanswered (amd#5248). Each message typed during a reply now waits in the queue and runs as its own turn, in order. "Add to this reply" on a queued message still hands it to the running turn when the user wants that.
…returns A named constant compiles against both the current and the extended getActiveRuns type, so merge order no longer matters for these files.
…oud models Each turn recorded its model as stats.model for the speed list, but a kept "Retry with..." answer (amd#5241) uses that same key to name the model it was kept from, so in a merged build every answer footer claimed a retry. The speed sample is now stats.measured_model, which no other code reads. Settings > Advanced's Model server panel showed a cloud chat model as its raw routing id (fireworks.deepseek-v4p1-flash); it now shows the name, with the id in the tooltip.
Once turns record their model (amd#5244), the footer's "kept from Retry with…" label would show on every answer. A kept retry now carries retried: true and the footer keys on that.
…retry tests After each reply ChatView refetches messages, and it polls the count every 3 s. The mocks answered with an empty or fixed list, so on a slow machine a refresh replaced the messages the test was checking. The mocks now return what the chat already shows, which makes a refresh a no-op.
|
Verdict: Approve with suggestions This PR adds three things to the Agent UI. Messages typed during a reply now queue up and run as their own turns. A meter shows how full the model's context is. Retry with… puts a second local model's answer next to the first so you can keep either. The design is careful: follow-ups are only saved once the agent has actually taken them, untaken ones come back to the queue, and retries never rerun tools. Tests cover each new backend piece. Two things are worth fixing:
Real-world evidenceN/A: no evidence bundle was produced for this run. The PR's test plan describes manual checks in a running app (three back-to-back messages answered in order, a follow-up added to a running reply, the meter moving from empty to 46% after a 65 KB attachment, the comparison working against stubbed endpoints), but no screenshots are embedded. Retry with… against a real second model is still unchecked. For the Agent UI surface, this verdict rests on static review plus the author's described checks. 🔍 Technical details🟡 Retry holds 🟡 Direct Lemonade HTTP calls ( 🟡 Agent UI evidence (once, per rubric) 🟢 Follow-up rows break text-only history replay ( 🟢 Strengths
|
…d#5316) Before: a message the backend never started spun forever; a connection that went half-open (tunnel, laptop sleep, phone) or was cut (Wi-Fi switch, proxy reset, restart) froze the answer or ended in "send your message again", which then hit a 409 because the run was still alive; and a busy server ended in a raw `HTTP 429: {"detail": ...}`. After: the send is bounded and says it is waiting, a silent or cut stream reconnects on its own and shows "Reconnecting (attempt n of 3)", prompts the user already answered stay answered across a reconnect, an answer lost to a restart says so, and every one of these errors is a plain sentence with a next step. Lands after v0.25.0. Reproduced by `src/services/__tests__/api.streamReliability.test.ts` and `src/components/__tests__/ChatView.streamReliability.test.tsx`: the API cases fail on main with the exact symptoms (no error after 30 s of silence, no end to an unanswered send, a cut stream reported as a generic network error, the 429 as a plain string), and pass here. ## Test plan - [x] `npx vitest run` in `src/gaia/apps/webui`: 896 passed; `npx tsc --noEmit` clean - [x] `api.streamReliability.test.ts` (19) and `ChatView.streamReliability.test.tsx` (15): silent and cut streams re-attach with 0/3/10 s waits (about 13 s, to span a backend restart), Stop cancels a pending reconnect and closes a stopped turn locally, a replayed prompt keeps its answer, a prompt the run moved past is dismissed, the waiting notice clears when the backend answers, a 404 on re-attach loads the saved answer - [x] Live, Vite :5319 against a fake backend with injected faults: a stream gone silent mid-answer was cut at 30.0 s and re-attached, and the whole answer appeared; a 429 read "GAIA is busy with another chat..."; a send never answered showed "Waiting for GAIA to start this answer…" at 3 s and a plain error at 90.0 s; a run lost to a "restart" read "The answer to your last message was lost..." <details> <summary>🔍 Technical details</summary> - `consumeSSEResponse` races each read against a 30 s timer; the backend's padded keepalive every 5 s resets it for the whole turn. A `status` with `phase: "queued"` (amd#5242's turn queue, which sends nothing until the position changes) raises the limit to 10 min. A read that fails mid-stream becomes `StreamDroppedError`; an attach that cannot connect does too. A send that cannot connect stays a connection error, since nothing may be running. - Silence or a cut after `done`, or after an `agent_error` that is not `recoverable`, ends the reader without reporting anything. - `/chat/send` waits up to 90 s for headers (main's chat semaphore holds a send 60 s before its 429); `/chat/attach` up to 30 s. `StreamTimeoutError` carries which endpoint timed out. - Replayed `permission_request`s whose `confirm_id` is already known are skipped; `tool_start`/`tool_end`/`tool_result` and answer text dismiss prompts still open, since the agent only gets past a prompt once it is answered. Status events are excluded because keepalive statuses arrive during a prompt wait. - After a stop, the server can sit in `producer.join` without keepalives; the client now closes such a turn locally instead of reconnecting. The backend side is with the UI-backend reliability session. - Merge notes: trivial conflicts with amd#5241, amd#5242 and amd#5275 in ChatView.tsx, and with amd#5242 in `attachToRun` (both add the same 404 branch). </details>
Before: two Agent UI chats on different models swapped models on every turn, and starting a turn unloaded models that other apps sharing Lemonade were answering with. When GAIA couldn't get the model (lease timeout, not enough memory, server not answering), it showed a warning and answered anyway, so Lemonade loaded the model itself and skipped the free-memory check. Settings → Load and the auto-title went straight to Lemonade with no lease or lock, so either could evict a model mid-answer, and a title could load a second model. After: GAIA only ever unloads models it loaded itself, and only to make room. A turn that can't get its model fails and says why. Titles run on the side slot and never load anything. Load asks before interrupting a chat that's answering. - **Shared server, shared rules.** Settings → Load, the post-download auto-load and titles take the same lease and lock a chat turn does, in the same order. - **Stop is honoured before a load.** A turn stopped while waiting for the model slot or another chat's load ends there: no load, no query. The wait for another chat's load is shown. - **A restart still knows GAIA's own models.** Chat models already on GAIA's own Lemonade at startup count as its own, so they can be unloaded to make room; on a server you run, nothing is. Reproduced by `tests/unit/chat/ui/test_model_slot_discipline.py`; each case fails on main and passes here, including a whole turn stopped during the pre-flight. Overlaps amd#5241 and amd#5275 (both edit `_chat_helpers.py`; different functions). Builds on the amd#4772 discussion without fixing amd#4772 itself: the title still uses the model it's given, but it can no longer load it. **Merging with amd#5328:** whichever of the two lands second also carries, as agreed with that PR's author: - `except LeaseWaitCancelled` (quiet) in `_preflight_load`, ahead of its catch-all; - the chat title's wait for the model wrapped in `lease_wait_limit(30)`, with the 504 logged at info and the title skipped that turn, plus a test that it gives up. - keep this PR's own raises of `InsufficientMemoryError` and `ModelInUseError` ahead of that clause. **Merging with amd#5337:** the two PRs conflict in one hunk of `_chat_helpers.py` next to `model_load_lock`. Both sides only add code there, so keep both. I ran a trial merge of the two locally: the UI suite and amd#5337's non-streamed timeout test passed 8 times out of 8. That test was racy with amd#5336's stop check, and amd#5337 now fixes it. ## Test plan - [x] `pytest tests/unit/chat/ui tests/unit/test_chat_preflight.py tests/unit/test_model_server_info.py tests/unit/test_users_lemonade_untouched.py tests/unit/test_ui_warmup.py tests/unit/test_broker_wiring.py`: all pass - [x] `npx vitest run` in `src/gaia/apps/webui`: all pass, new `api.loadModel.test.ts` - [x] `python util/lint.py --black --isort --pylint --flake8` - [ ] Live: two chats on two models that both fit, and confirm neither is unloaded between turns <details> <summary>🔍 Technical details</summary> - `_maybe_load_expected_model` no longer unloads other resident chat models. On `InsufficientMemoryError` it unloads only models in `_models_loaded_here` (pre-flight and Settings loads record there, with names normalized), says so in a status event, and loads once more. Otherwise it raises. - Exceptions now raised instead of a warning status: `BrokerUnavailableError` (with the model and what to check), `InsufficientMemoryError` (unchanged text), and `RuntimeError` for anything else, including a non-200 `/health`. The streaming and non-streamed paths both show the reason. The non-streamed path used to substitute "make sure Lemonade is running" for every unclassified error. - `_maybe_load_expected_model` wraps `_preflight_load`: any exception raised while the turn's Stop flag or its own cancel event is set is read as the Stop. That covers turns that pass those in, which the streamed turn does. A non-streamed turn's Stop reaches the wait only through amd#5328's `interactive_turn(cancel=...)`, so there only the `except LeaseWaitCancelled` clause above keeps it quiet. amd#5328's `test_stop_during_a_queued_preflight_stays_quiet_on_the_non_streaming_path` guards that. - A failed Settings or post-download load shows in `/api/system/status` `probe_warnings` until a load succeeds. - `model_load_lock` is taken with `_take_model_load_lock` (polls, shows status, returns on Stop) after the lease. `_load_through_the_slot` in `routers/system.py` uses the same lease-then-lock order. - Title: `LemonadeClient.chat_completions` under one background-priority `model_lease` spanning the residency check and the call; `id_slot=SIDE_SLOT` when the model has two slots; `auto_download=False`. - Ownership: the UI keeps a record of the models it loaded (`<GAIA home>/ui/loaded_models.json`, written whole under a lock): pre-flight and Settings loads, and any load its own agents make (a `LemonadeClient` load listener). Models Lemonade no longer has loaded drop out of it. A same-name copy at too small a window is reloaded only if the UI loaded it or it is an auto-load (Lemonade's 4096 default or the supervisor's profile window); otherwise `ModelInUseError` says another app has it. - `/api/system/load-model` gains `force`. Without it the endpoint returns 409 while any run is active. `loadModelAskingFirst` turns that into a `confirm()` in Settings. The API schema and types are regenerated. - Updated tests that pinned the old behaviour: unload-before-load (amd#1382's double-load case is now covered by the free-memory check), swallowed pre-flight failures, and raw-HTTP titles. - Not changed here: the retry-on-error path that re-runs the whole query is amd#5338. - LLM-affecting? Error surfacing only; prompts and tools are unchanged. Categories to watch on the next RC: `rag_quality`, `gaia_core`. </details> --------- Co-authored-by: Kalin Ovtcharov <[email protected]>
amd#5266) **Held until after v0.25.0.** During a long turn the Agent UI gave little sign it was working, and its motion was 84 hand-picked timings that reduced motion only partly stopped. Now one live status line carries a subtle sweep while the model works. Plan steps tick over, the side rail slides in, and queued messages ease into place. Every timing comes from a small set of tokens, reduced motion stops all of it (including the status typewriter and smooth scrolling), and an idle window runs no animation at all. - **Expect a merge-order conflict with the checklist, rail and queue PRs (amd#5245, amd#5246, amd#5241, amd#5242).** Their motion lives in `motion.css` and keys on their class names, so their files are untouched. Whichever lands second must reconcile two things. The new lint fails on amd#5242's literal `sb-dot-pulse 1.4s ease-in-out`, which becomes `var(--duration-pulse) var(--ease-in-out)`. And a class renamed there would quietly switch this motion off, so recheck the `motion.css` selectors once each of those PRs merges. - **Small visible changes from the token move:** spinners now share one 0.9 s turn (were 0.7–1 s), the typing cursor blinks at 1 s (was 0.6 s), and the old 300–400 ms panel timings share 320 ms. **Live status line, before and after, from real local turns** (main vs this branch, same backend and prompt; reduced motion emulated in the page):  - Before: only the cursor blinks, and with reduced motion on the label still types itself out. - After: a slow highlight sweeps the label while the model works. With reduced motion on, the label appears whole, has no sweep, and `document.getAnimations()` reports nothing running. - The GIF is stitched from frames captured about 0.3 s apart, so the sweep looks steppier than it does live. <details> <summary>🔍 Technical details</summary> - Tokens: `--duration-fast|--duration|--duration-slow|--duration-spin|--duration-blink|--duration-pulse|--duration-shimmer`, `--ease|--ease-in-out|--ease-linear|--ease-step`, `--stagger`, `--toast-hold`. - The shimmer is an alpha `mask-image` sweep, not a gradient fill (the design language bans those). Its dim stop is 80%, which keeps the 11 px label above AA in both themes. - The global reduced-motion rule keeps 0.01 ms rather than `none`, so `forwards` fills and toast holds still land. It now also forces `scroll-behavior: auto`. JS motion reads `prefersReducedMotion()` from `utils/motion.ts`. - `motion.test.ts` rejects literal times, raw easings, `var()` fallbacks and non-motion variables in any `animation*`/`transition*` declaration. It also requires every loop to sit on a live-state selector. - Queue-place changes animate only on remount. Adding `key={place}` on amd#5242's `.sb-row-queue` span makes each change replay. - With amd#5245 merged there are two live lines (`Thinking… · 24s` in the bubble, `Waiting on the model · 8s` in the summary). Only the bubble line shimmers. Folding the two into one is a product follow-up. </details> ## Test plan - [ ] `cd src/gaia/apps/webui && npx vitest run`: 857 pass, including `styles/__tests__/motion.test.ts` and `MessageBubble.liveMotion.test.tsx` - [ ] `npx tsc --noEmit` is clean - [ ] Run a multi-step turn in the Agent UI and send a second message while it works. Check that the status line sweeps, the queued row drops in, the rail slides in, and once the turn ends `document.getAnimations().filter(a => a.playState === 'running')` is empty. - [ ] Turn on reduced motion in the OS (or emulate it in DevTools) and repeat. The label appears whole with no sweep, spinners stand still, and the rail and queue appear without movement. Verified locally on main merged with amd#5245, amd#5246 and amd#5241 (backend :4309, Vite :5309, real local turns), with reduced motion emulated in the page.
The line under an answer showed developer stats ("1012ms TTFT · 68 → 510
tokens · 38.1 tok/s"), and permission prompts named internal tools
("Always allow `write_file on prompt-test.txt` in this chat", "ran
'write_file' without asking"). Now the footer reads "Answered in 40 s on
your GPU · first word in 1 s" (or "via Fireworks AI" for a cloud turn),
with the exact numbers one click away. Prompts read "Allow writing
file?" and "Always allow writing prompt-test.txt in this chat", and the
full-access notice says what ran: "Full access is on, so GAIA didn't ask
first. Writing file: prompt-test.txt".
Part of amd#5260. The suggestion-card item (cards wrapping 3 + 1) is
already fixed in amd#5240, which lays the cards out as a 2-column grid, so
this PR leaves it alone. On merges: this PR and amd#5241 both edit the
stats row under an answer, so expect a small conflict there. It also
touches the permission-request handling in the chat view next to code
that amd#5241, amd#5242, amd#5244 and amd#5245 change. It lands after v0.25.0.
## Screenshots
Footer (expanded by a click) and permission card, before → after:
| | Before | After |
|---|---|---|
| Light |

|

|
| Dark |

|

|
Footer before the click:

## Test plan
- [x] `npx vitest run`: 860 passed. `npx tsc --noEmit` is clean
- [x] `pytest` on the Agent UI, permission, stdio, shell-prompt and
agent suites plus the flagship package tests: 6798 passed. The 3
failures are tool-count checks in `hub/agents/gaia` (87 tools found vs
95 declared). Optional dependencies are missing from the local venv, and
this PR doesn't touch tool registration
- [x] `python util/lint.py --black --isort --pylint` passes
- [x] Checked in the running app, in light and dark, before and after
(screenshots above). The footer shows plain words and expands on click,
and the permission card shows no tool ids
- [ ] Reviewer: run a turn on a local model and check that the footer
names the right device. Then run one on a cloud model and check that it
says "via …"
<details>
<summary>🔍 Technical details</summary>
- Each turn's stats gain `place`, set by `_turn_place`. For a cloud
model it is the provider's name. For a local model it is the `device`
that Lemonade's `/health` reports for that model. Older messages have no
`place`, so their footer makes no claim about where they ran. The cloud
provider is resolved from the model before any Lemonade call, so a cloud
turn names it even with Lemonade stopped.
- `permission_request` gains `tool_label` (from `tool_phrase`, built on
`derive_narration`) and `always_label` (from `grant_phrase`, which uses
the same `_VERB_FORMS`). `always_scope` is unchanged because
`agent_ui_control` matches it exactly. Shell scopes get no label because
they are already the command itself.
- `GrantScope` gains an optional `subject` (the file or skill), so the
label can be worded without parsing it.
- The MCP `turn_view` footer still returns the raw numbers. Only its
docstring and the guide line about it changed.
</details>
|
Verdict: Approve with suggestions This PR does three things in the Agent UI. Messages typed while GAIA is answering now wait in a visible queue and run in order, or can be added to the reply that is running. A meter shows how full the model's context is. And Retry with… puts a second local model's answer beside the first. I found no correctness bugs. The queue hand-off can't lose a message: one lock means a message is either taken by the running reply or handed back to the chat. The retry refuses to run while any chat is answering, and it holds the model slot for the whole retry. Two things to close before merge:
Real-world evidenceN/A: no evidence bundle was produced for this run, so the Agent UI pixels and the real second-model retry are deferred to the strix-halo lane. This verdict rests on static review alone. Everything the PR says it tested in the running app is the author's own report; this run didn't reproduce any of it. 🔍 Technical details🟡 Important
🟢 Minor
Strengths
|
|
Verdict: Request changes This PR adds three things to the Agent UI. You can type while GAIA is answering, and the message waits in a queue and goes out as its own turn. A meter shows how full the model's context is. Retry with… answers the latest question on a second local model so you can compare the two. The backend is careful: retries reuse the turn's recorded evidence instead of running tools again, they are refused while any chat is answering, and every failure gives the user a reason. Two bugs can silently lose or break what the user typed, and both need fixing before merge:
Real-world evidenceN/A: no evidence bundle was produced for this run. The verdict rests on static review. The PR's test plan reports manual checks against a running app (three messages sent back to back, the meter reaching 46% with an attached file, the comparison view working with the retry endpoints stubbed). It has no screenshots, though, and Retry with… has not run against a real second model yet. 🔍 Technical details🟡 Queue is dropped on session change ( 🟡 Follow-ups bypass 🟡 Agent UI change without screenshot evidence in the PR description 🟢 🟢 A paused turn doesn't block a retry ( Strengths
|
…adable A follow-up handed to the running turn reached the agent with the browser's upload link instead of the file's path, so the agent couldn't open the file. The inbox now gives the agent the resolved path, while the chat still records and matches the text as the user sent it.
# Conflicts: # src/gaia/agents/base/history.py # src/gaia/apps/webui/src/components/ChatView.tsx
…chat's turn ends
Messages queued while GAIA answered were dropped without a word when the
user opened another chat, and a message added to the running reply was lost
if that reply ended while the user was elsewhere. The queue now lives in the
chat store, keyed by chat, and is saved across reloads.
- An open chat sends its queue through its own view; any other chat's queue is
sent in the background when a poll reports its turn over. One send per chat
at a time, so a turn end and a manual send can't both send a message.
- A chat that missed its reply's end asks the new GET /api/chat/followup/{id}
what that turn read and what it returned, so nothing is resent or dropped.
- A send that fails stays in the queue as "Not sent" with the reason and
"Send again", and holds back the messages after it so order is kept. A send
the server hasn't answered is no longer aborted when the user leaves.
- A message typed while others wait joins the end of the line.
- Deleting a chat deletes its queue; the delete button says how many first,
and the chat list shows how many are waiting.
|
Verdict: Approve with suggestions This lets you type while GAIA is still answering. The new message waits in a visible queue and is sent when the reply ends, even if you've switched to another chat. It also adds a meter showing how full the model's context is, and a Retry with… button that gets a second local model's answer to the same question and shows the two side by side. I didn't find any correctness bugs. The queue never drops a message without telling you: anything it can't confirm shows as Not sent. Retry doesn't run tools again, and it won't start while any chat is answering. Still needed before merge:
Real-world evidenceN/A: no evidence bundle was produced for this run. The Agent UI screens (queue, context meter, comparison panel) need a live run on the strix-halo lane. This verdict rests on reading the code and on the author's own test notes; I didn't run anything. 🔍 Technical detailsIssues found 🟡 No Agent UI screenshots for a UI-facing change (PR description) 🟢 A pending retry outlives its deleted chat ( (plus 🟢 Keeping a retried answer drops the original footer fields ( 🟢 Stop can't cancel a Retry with… ( Strengths
|
…ops its open comparison Keeping a "Retry with..." answer replaced the message's stats outright, so its footer lost the step count and where the turn ran. The retry's numbers now go over the original's instead. Deleting a chat also forgets its open comparison, which otherwise sat in memory until restart.
# Conflicts: # src/gaia/apps/webui/src/components/ChatView.tsx # src/gaia/apps/webui/src/services/api.ts # src/gaia/apps/webui/src/types/api.gen.ts # src/gaia/apps/webui/src/types/api.schemas.json
|
Checked in the real Agent UI with two real local models: messages queued mid-answer stay with their chat across a chat switch and are sent in order after the reply ends, even with another chat open; the context meter shows and moves; and Retry with… put a real Qwen3.5-4B answer beside the Gemma-4 one. The Electron framework CI job had two real failures (ChatView over the 100 KB component limit, and a stale sidebar label test). Both are fixed in 🔍 Technical detailsRun: PR head Before (main): text typed while an answer streams just sits in the composer and is never sent; after switching chats and back it is gone (chat ends with 2 messages). No meter, no Retry with….
After (this PR):
Transcript of the first chat from
|
…ebar ARIA test The Electron framework job failed on two checks: ChatView.tsx had grown past the 100 KB per-component limit, and a source-text test still expected the old delete-button label that the unsent-messages wording replaced. - Move the Retry with... comparison state and handlers into useAnswerComparison, and the context meter's fetch/reset into useContextUsage. Behaviour is unchanged. - Match the sidebar test to the new "Confirm delete <title> and its N unsent messages" label.
|
🟡 Keeping a "Retry with…" answer still drops the step count and "where it ran" from the footer until the chat is reloaded. The server now keeps them, but the Agent UI rebuilds the message's stats from a fixed list of fields and leaves those two out. Use the stats the server sends back as they are. 🔍 Technical details
You'd also need to widen the |
|
Verdict: Approve with suggestions This PR adds three Agent UI features. A message typed while GAIA is answering now waits in a queue instead of being refused. A context meter shows how full the model's window is and which old turns are about to drop out. Retry with… puts a second local model's answer next to the first so you can keep either one. The work is careful: queued messages stay with their chat across switches and reloads, a retry never reruns tools or evicts another chat's model, and every path has tests. One edge case should be fixed before merge. If a turn is stopped or fails after it has already read a message added mid-reply, that chat's memory can lose the original question. The added message gets saved on its own, and when the stopped turn's full record is missing, the saved history pairs the answer with the added message instead. Later turns, and any Retry with… on that answer, then work from the wrong question. Real-world evidenceN/A: the evidence stage produced no bundle for this run. The PR's test plan reports runs against the live app (three back-to-back messages answered in order, a mid-reply message picked up, the meter rising on attach, the queue surviving a chat switch). It also links screenshots of Retry with… against a real second model (Qwen3.5-4B next to Gemma-4-E4B) in a PR comment. I didn't re-run any of it, so this verdict is a static review plus the author's reported results. 🔍 Technical details🟡 A stopped turn can drop its original question from history ( 🟢 🟢 Retry holds the global turn slot for up to ~15 min ( Strengths
|
… a kept retry keeps steps and place A turn stopped after taking a message added mid-reply saves no model messages, so history replay fell back to text and paired the answer with the added message, dropping the original question from later turns and from Retry with.... Consecutive user rows before an unrecorded answer are now joined into that turn's question. Keeping a retried answer also rebuilt the bubble's stats from a fixed field list, so the step count and "where it ran" disappeared until a reload. The stats the server returns are now applied as sent.
|
Verdict: Approve with suggestions This PR lets you type while GAIA is answering: the message waits in a queue that stays with its chat and goes out when that chat's reply ends. It also adds a meter showing how full the model's context is, and a Retry with… button that puts a second local model's answer beside the first so you can keep either. The backend side holds up: a retry takes the shared model slot so it can't unload a model another chat is using, follow-up messages can't be lost between delivery and the end of a turn, and deleting a chat clears its open comparison and follow-up record. Nothing blocks the merge. Three small points are below.
Real-world evidenceN/A: no evidence bundle was produced for this run. The PR description lists checks against the running app (three back-to-back messages answered in order, the queue surviving a chat switch, the meter moving to 46% after attaching a 65 KB file). It also links before/after screenshots and a real two-model Retry with… run (Qwen3.5-4B next to Gemma-4-E4B) in a PR comment. I couldn't run the Agent UI or the new Python tests on this runner (pytest isn't installed), so for those surfaces the verdict rests on static review plus the author's evidence. 🔍 Technical detailsIssues found 🟢 A retry holds the model slot with no way to cancel it ( 🟢 An unanswered question now gets merged into the next one ( 🟢 The local-only check misses discovered cloud models ( Strengths
|













Local turns take minutes, but the Agent UI refused any message sent while a reply ran, said nothing about how full a 32K–64K context was until it had already dropped older turns, and comparing two local models meant retyping the question and losing the first answer. Now a message typed mid-turn waits in a visible queue and runs as its own turn, in order (or, on request, is added to the running reply), a context meter shows what fills the window and names the turns about to leave view, and Retry with… puts a second local model's answer next to the first, with time and speed, so you can keep either. Lands after v0.25.0.
Closes #5224
Closes #5227
Closes #5248
Test plan
npx vitest run(1340 passed, incl. three back-to-back messages) andnpx tsc --noEmitinsrc/gaia/apps/webuiqueueDispatch.test.ts,ChatView.queueAcrossChats.test.tsx): switch away mid-turn then the turn ends; switch away and back before it ends; back and forth repeatedly; two chats each with a queue; an added-to-reply message read or returned while nobody watched; a send failing after the user left; reload; chat deleted mid-send; order kept behind a failed message; turn end racing a poll sends oncepython -m pytest tests/unit/chat tests/unit/agentspasses (new:test_followups.py,test_answer_retry.py,test_context_usage.py). The fulltests/unitrun's remaining failures are in untouched files and come from this dev box's live Lemonade/daemonpython util/lint.py --allpassesnpx jestintests/electron(847 passed)context_retention,rag_quality,gaia_rag(history replay was refactored, behaviour unchanged)