Repository navigation
feat(ui): session panel — environment, outputs and changes per chat - #5326
Conversation
|
Verdict: Approve with suggestions The fixes are sound. The main one matters: before this PR, every Retry with… crashed with a generic server error because it waited on a lock that no longer exists. It now takes its turn in the queue like a normal chat. The friendly model names, the hint for slow local models, the new-chat cards that come back on their own, New chat focusing the message box, and the wider resize edge all look correct and come with tests. Two things to fix before merge:
Real-world evidenceN/A: no evidence bundle was produced for this run, and the changes are Agent UI rendering, which is deferred to the strix-halo lane. This verdict rests on static review alone. The server fix is covered by unit tests that now use the real turn queue instead of a stand-in, but no live retry was run. 🔍 Technical detailsReviewed the commits after 🟡 Test plan contradicts the 409 path
🟡 Missing Agent UI evidence Per the rubric, a change to an Agent UI surface needs a Playwright run against 🟢 Retry slot is released while the worker thread may still be running ( If the client disconnects during 🟢 New-chat retry polls for as long as the error is up ( A permanent Strengths
|
A chat's folders and internet switch are now enforced by the agent itself, not just shown: a removed folder is refused by every file and shell tool (even under full access, inside a wider grant, or as the shell's starting folder) and is never offered as an approval, and internet-off refuses web, browser, connector and online shell calls before they can ask. - PathValidator.withhold_path / release_path / withheld_root - Agent.internet_off checked in _policy_refusal via agents/base/offline.py
The undo store can now answer for a whole chat: every file it changed, from before its first turn to after its last, with line totals, and put all of them back at once. Undo all is all or nothing like undoing one turn: copies are checked first, a file changed outside GAIA is a conflict unless forced, and a failure part-way restores every file. restore_turn's apply/rollback is factored into _Step/_apply, shared by both.
Endpoints behind the session panel's Environment, Outputs and Changes: - environment: folders the chat may touch (add/remove) and its internet switch, stored per chat, applied before every turn and to a running agent at once; relayed sidecar agents are reported as not enforced - outputs: everything a chat produced (files, exports, images, indexed documents, memories, schedules), newest first, tied to its turn and marked undone after Undo; turn summaries now record non-file outputs - changes: whole-chat totals and diff, Undo all, and git Commit / Create PR that run only with confirmed=true, stage only the chat's files (literal pathspecs), never force-push, and refuse a PR while internet is off - tunnel status names the device behind the latest authenticated request
…ads it in _policy_refusal)
Each chat gets a docked, resizable session panel that keeps the facts that build trust in view: this answer's sources, where the chat runs and what it may touch, what fills the context, what it produced, and what it changed. - One panel, not two: the per-answer side rail becomes its first section, so the transcript loses one column, not two - Resizable (drag or keyboard) with remembered width, collapsible panel and sections with remembered state, overlay below 1100 px - Reads on open, expand and turn end only; nothing polls, and a closed panel or collapsed section reads nothing - Environment mirrors the composer's permission mode and drives phone access through the app's existing flow; internet-off shows in the composer - Built on the existing tokens and components so the redesign can restyle it
The menu and the comparison headings showed Gemma-4-E4B-it-GGUF where the model chip says Gemma 4 E4B. (cherry picked from commit a0ba8684567dd091d728cec58827d5c6454a525e)
It said "Loading Gemma-4-E4B-it-GGUF on your GPU" beside a chip reading Gemma 4 E4B. (cherry picked from commit 99575036aaf58bd1dc6e634fba78ba00ca4206f8)
Friendly names were known only after opening the model chip or Settings, so the rail, warm-up line and Retry with… comparison showed raw ids on a fresh load. (cherry picked from commit 12e7c66a8badb4942f307ff5b12ae2a4f84d2aaa)
ChatView.queue: each answer refetches history 300 ms later and the mock history is empty, so a slow run wiped the turns before they were checked. MemoryDashboard: the knowledge mock now forgets a deleted item, so a refresh can't bring it back mid-test. (cherry picked from commit 24791b64cfc5a1a758600f3714e5b379bff1d331)
Ctrl+Shift+O from the new-chat screen left focus wherever it was, e.g. in chat search. (cherry picked from commit 32bcc086d703f4f7fac436fafcbec9f28b8d3d77)
A slow local prompt said a hosted model would be retried, which never happens on this PC. (cherry picked from commit 62c607277d3c664470665be81fd90c7daec9e606)
The rail said Gemma-4-E4B-it-GGUF while the model chip said Gemma 4 E4B. (cherry picked from commit 4f627e23613c1045d610bf6b366dc6b3f153e3de)
displayModelName reads the store without subscribing, so a view rendered before the names loaded kept the raw id; those views now subscribe through useModelNames. (cherry picked from commit 5b2afa05e0dc9fd3af02569355608b6e6e2f3e7f)
…nt starts On a cold start the cards said "GAIA's assistant didn't start" and stayed that way until Try again was clicked. While that reason is showing, the screen now asks again every 15 s, keeping the reason up until there is an answer. (cherry picked from commit cdde89229e68be78791e2a03da1ce2056c20f11e)
It advanced the clock before React had started the retry interval, and its leftover mock answers then failed the next test. (cherry picked from commit ab35fece0380aafbe88b70af785ba97646bcbc71)
The handle was a 6px strip with no cue until hovered. It is now 8px wide with a thin accent line on hover and keyboard focus.
… files Turning the internet off for a chat now checks every command on a shell line on its own, and treats a destination as this PC only when it is localhost exactly or a loopback IP (127.0.0.0/8, ::1). Hosts are parsed whole, so look-alike names, userinfo, numeric IP forms and proxy or resolver options no longer count as local. Only a plain curl, wget or Invoke-WebRequest whose every destination is this PC is let through; a connector tool or an online command is refused even if a local URL rides along in its arguments. Commit from the session panel no longer fails when the chat touched a gitignored file: those files are left out of what is staged, listed as "ignored" by the API, and named in the commit dialog. A tracked file that matches an ignore pattern is still committed.
Keeps ChatView under the 100 KB component budget with room to spare.
…ontacted site With the chat's internet off, a refused search showed "Couldn't get live data" and a refused page fetch listed its host under the websites GAIA contacted, though nothing left the PC. Calls that never ran (refused before running, or denied by the user) now count toward neither.
…host pages fetchable The web tools refuse private addresses on their own, so the guide's 'pages served from this PC stay reachable' overpromised.
56d3371 to
77fb123
Compare
|
The session panel works end to end in the real Agent UI with a local model: it shows a turn's file edits, their diff, a scoped commit and Undo all, and it enforces internet-off. 🔍 Technical details
|
|
Verdict: Approve with suggestions This PR gives each chat a session panel. It shows where the chat runs, which folders it can use, an internet switch, what it produced, and what it changed, with Undo all and a confirmed git Commit or PR. The enforcement is real: removed folders and internet-off are checked on every tool call before any approval prompt. That covers shell commands that name a removed folder even in Full access, which I traced through the code. I found nothing that blocks merge. Two small things worth fixing:
Real-world evidenceN/A: no evidence bundle was produced for this run. The PR says Agent UI screenshots (edit, Review changes, Commit, Undo all, internet-off) are in a separate evidence comment, which I didn't relay here. My verdict rests on static review of the backend and docs. The shell probe I tried couldn't run because this runner has no GAIA dependencies installed. 🔍 Technical detailsIssues 🟢 Guide overstates internet-off (docs/guides/agent-ui.mdx, "Internet" bullet). 🟢 Commit ignores removed subfolders inside the repo ( 🟢 Eval note: Strengths
|
A removed folder inside the repository still had its changed files staged and listed in the drafted message; only a repository root inside a removed folder was refused. The guide also now says internet-off reads what a command names, so a script that connects on its own can still go online.
|
Verdict: Approve with suggestions This PR gives every chat a session panel showing its sources, the folders it may use, an internet switch, everything it produced, and every file it changed, with Undo all and a confirmed git Commit/PR. Removed folders and internet-off are enforced in the agent before any approval prompt. The enforcement is careful: removed folders win over every grant including full access, the offline check accepts only true loopback addresses, and the commit path stages only the chat's own files with literal pathspecs. The docs honestly say a script that connects by itself can still go online. One thing to fix before or soon after merge:
Real-world evidenceN/A: this run produced no evidence bundle. The PR description says Agent UI screenshots and the internet-off run are in a separate evidence comment, which I couldn't see from here. The verdict rests on static review, plus a local check that confirmed the empty-repo failure. 🔍 Technical details🟡 The existing 🟢 Release doesn't restore narrower grants ( 🟢 Internet-off refusals land in the per-turn denied-effects ledger ( Strengths
|
In a folder that was just `git init`-ed, reading the branch failed and the panel's git section returned a server error, so the chat's first files could not be committed from it. The branch now reads through `symbolic-ref`, which names it before the first commit and still reports a detached HEAD as HEAD.
|
Fixed: Changes now works in a folder that was just 🔍 Technical details
|
…leted (amd#5443) Undo all left empty folders behind when a chat created a file inside new folders and later deleted it. Across the whole chat that file counts as unchanged, so Undo all skipped it, along with the folders made for it. Undo all now removes those folders as well. It keeps any folder that holds other files and names it, the same way undoing one turn does. This was the remaining low-severity finding from the bot review of amd#5283. Its other findings landed with amd#5326. ## Test plan - [x] `pytest tests/unit/agents/test_session_snapshots.py tests/unit/agents/test_file_snapshots.py tests/unit/chat/ui/test_changes_router.py`: 79 passed. Both new tests fail without the fix. - [x] `python util/lint.py --black --isort --pylint --flake8` is clean. --------- Co-authored-by: Kalin Ovtcharov <[email protected]>







Before, a chat didn't show where it ran, what it could touch, or what it changed on disk, and its folder and internet settings weren't enforced. Now each chat has a session panel with this answer's sources, where the chat runs, the folders it may use, an internet switch, everything it produced, and every file it changed, plus a whole-chat diff, Undo all, and a git Commit or PR that runs only after you confirm. Removed folders and internet-off are enforced by the agent itself, before any approval prompt. Only true loopback addresses count as "this PC", and a commit never stages files git ignores.
It also carries fixes found testing the merged UI: Retry with… lists friendly model names, names update once they load, local models get their own still-waiting hint, New chat focuses the message box and its task cards come back on their own, the panel's resize edge is easier to grab, and a web call that internet-off refused no longer shows as a failed lookup or as a site GAIA contacted.
This PR now replaces #5283 (closed). It was rebuilt on main so it carries only what isn't merged yet.
Test plan
npx tsc --noEmit,npx vitest run(1465 passed) andnpm run buildinsrc/gaia/apps/webuinpx jestintests/electron: all pass on Linux line endings; ChatView is 101.6 KB of the 102.4 KB limitpytest tests/unit/agents tests/unit/chat/uiplus the security and shell suites; the only failures also fail on main on this machine (a background thread trying to start the daemon, andtest_step_timing)python util/lint.py --black --isort🔍 Technical details
origin/mainby cherry-picking the feat(ui): session panel — environment, outputs and changes #5283 commits and this PR's own fixes. Commits already on main via feat(ui): context and performance panel (what fills the window, where the time goes) #5275 or fix: Agent UI and agent bugs found in an end-to-end UI test #5311 were dropped (the Retry with… turn-queue fix, the live-line tool label,visibleInterval). API types were regenerated withexport_openapi+gen:api-typesand match the merged files.PathValidator.validate_readkeeps main's missing-file-instead-of-prompt flow and checks removed folders first. Main's deepest-first removal of created folders moved into the new shared_applyused by Undo and Undo all.ContextPanelwas split intoContextDetails(shown in the panel) and the standalone sheet, starting from feat(ui): context and performance panel (what fills the window, where the time goes) #5275's final per-section error handling.useJumpToMessagemoves jump-to-turn out of ChatView to keep it under the size budget.turn_summary._ranskips calls whose result says they never ran (executed: Falseorstatus: denied) when it counts sites and live-data failures. The guide no longer says localhost pages stay fetchable offline, because the web tools refuse private addresses on their own.