Skip to content

feat(ui): session panel — environment, outputs and changes - #5283

Closed
kovtcharov wants to merge 44 commits into
amd:mainfrom
kovtcharov:claude/ui-session-panel-92c639
Closed

kovtcharov wants to merge 44 commits into
amd:mainfrom
kovtcharov:claude/ui-session-panel-92c639

Conversation

@kovtcharov

@kovtcharov kovtcharov commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Contains #5239–#5246 and #5275, which are still open (their branches live on a fork, so this PR targets main; #5238 has merged). Review the session-panel commits, from feat(agent): enforce removed folders… through the two test: commits; the rest is those PRs plus a merge of main. Merge those PRs first, and this PR's diff shrinks to its own work.

Before this change, the facts that tell you a chat is doing the right thing were scattered: the model location in a status pill, folder access nowhere, each answer's files in its own rail. Each chat now has one docked session panel with five sections: This answer, Environment, Context & performance, Outputs and Changes. Its controls are enforced by the agent, not just displayed:

  • A removed folder is refused by every file and shell tool, including under full access and when the shell started in that folder.

  • Internet off stops web, browser, connector and online shell calls before they can ask for approval.

  • Undo all restores every file the chat touched, byte for byte.

  • Commit and Create PR run only after you confirm a drafted message that you can edit.

  • One panel, not two. The per-answer side rail (feat(ui): side rail with each answer's sources, files and data flow #5246) becomes the panel's first section, "This answer". Two docked panes at 1440 px (288 + ~320 px beside the 260 px sidebar) would leave about 570 px for a 760 px reading column. The context meter's Details now opens the panel's Context section.

  • Read only when it matters. The panel reads when it opens, when a section expands, and when a reply ends. Nothing polls. A closed panel or collapsed section reads nothing.

  • Built on today's tokens and components. The redesign (feat(ui): Agent UI visual design uplift via Claude Design #1001) can restyle it through tokens without restructuring it.

  • Known limits. These are shown in the UI rather than hidden:

    • Agents that run as their own process (email, a Hub binary install) aren't held to the folder and internet settings, and the panel says so.
    • Document text indexed before its folder was removed stays searchable.
    • Phone access wasn't started live, because doing so opens a public tunnel.
  • No eval needed. Default prompts, tools and history are untouched. The new refusals fire only after the user removes a folder or turns the internet off. Categories to watch on the next RC: none expected.

Outputs and Changes

More screenshots (dark, light, phone)
Whole-chat review
Context section
Folder removed, internet off, composer notice
The model's real turn: both refused
Git: Create PR blocked with a reason
Commit dialog, message edited
Undo all confirmation
Light: Environment
Light: Outputs after Undo all
Light: Go to turn
Phone width: overlay

Test plan

  • After merging main: npx vitest run: 1,161 passed (one queue test from feat(ui): chat list shows what needs you, chats queue for the GPU, notification settings #5242 is timing-sensitive and failed once under heavy machine load; it passed 15 times in a row on a quiet machine). Before the merge: 1,150 passed, including 53 new panel tests covering every section and state. tsc --noEmit is clean.
  • After merging main, all of tests/unit: 24,089 passed. The 45 failures and 18 errors are environmental or pre-existing: the same tests fail on plain main on this machine (golden prompts, cloud-model mocks, wheel builds, a real ASR server), plus two that pass when run alone. Before the merge, pytest tests/unit/chat/ui tests/unit/agents plus the security tests: 5,479 passed. Lint with black, isort, pylint and flake8 is clean.
  • Adversarial tests:
    • A removed folder is refused by read_file, write_file, edit_file and the shell (bare dir/type in a removed starting folder, and an explicit working_directory), even under full access.
    • Internet off refuses search_web, the browser, MCP tools, curl, git push, git -C repo pull, pip, npm, npx and uvx, while local commands and localhost pages still run.
    • Undo all restores created, edited and deleted files exactly, across overlapping turns. It changes nothing on a conflict, a damaged copy, or a write that fails part-way.
    • Commit and PR never run without confirmation. A file named note[s].md commits only itself, never notes.md or secret.env.
  • Live run in the app: backend on :4316, Vite on :5316, a temporary GAIA_HOME, the resident Gemma-4-E4B with no model loads, and only /api/setup/check stubbed.
    • Three real turns edited and created files, indexed notes.md and wrote summary.csv. Changes showed 4 files, +12 −2, which matches git diff --numstat.
    • Removing the project folder and turning internet off made the model's read_file and search_web calls refuse with plain messages. Adding the folder back through the picker worked.
    • A real commit went through with the edited message and exactly the chat's 4 files.
    • After Undo all, calc.py and notes.md are byte-identical to before the chat, and the created files are gone.
    • Checked in light and dark, at 375 px, and after a reload: section state is remembered and Outputs come back intact.
  • Reviewer: open a chat that edits files, then try Environment → Remove on its folder, Internet off, and Changes → Undo all.

Closes #5276, closes #5277, closes #5278, closes #5279.

kovtcharov and others added 30 commits October 16, 2026 15:12
A failed page read showed the user a URL like
"https://[email protected]:443/...", which reads as a phishing
link. The IP-pinning adapter rewrote the request URL to that form to steer
the connection and never put it back, so HTTPError text, response.url and
cookie domain matching all saw it.

The adapter now restores the original URL on the request and response once
the transport returns (or raises). The pinned IP is still what gets dialed
and the real hostname is still the TLS SNI; tests assert both alongside the
404, redirect and download error text.
Conversation History rows showed the first 8 characters of the session ID.
They now show the chat's sidebar title, keeping the short ID only for chats
the sidebar no longer has, and the conversation detail gets an Open chat
button.

Closes amd#5188
Tool results containing a URL showed "http⧉s://..." with a folder icon,
and clicking it tried to open "s://..." as a local folder. The drive-path
pattern had no left boundary, so the "s:/" inside "https://" matched.
A drive letter now has to follow a non-word, non-slash character.
Once an edit was approved there was no way back. GAIA now saves a copy of
every file before an agent tool writes, edits, creates or deletes it, per
session and turn under <GAIA_HOME>/snapshots. A turn that changed files
offers "Review changes" (a diff from the saved copies) and "Undo this
turn", which restores every file exactly or changes nothing and says why.
Undo survives a restart. Shell lines outside the read-only tier,
run_python, execute_python_file, install_cli and non-read-only MCP tools
mark the turn "undo may be incomplete" instead of claiming coverage.

- file_snapshots: realpath-keyed capture, end-state checksums, all-or-
  nothing restore with on-disk rollback, time and size retention that
  never drops a running turn
- list / diff / undo endpoints and /api/settings/undo, usable by the TUI
- Agent UI turn footer, review dialog (DiffCard gains badge and note),
  Settings > Privacy > Undo history
- undo_retention_days / undo_max_mb config keys

Closes amd#5225
A new user saw only a text box, and first-run setup described the wrong
thing: after "Use mine" it still listed a server install, promised
"about 6 GB" while pulling a 23 GB model, and never named the chat model.

Setup now checks the PC (device, memory, disk), names the chat model and
the real download before it starts using gaia init's own model choice,
lets the user pick a smaller model, follows "Use mine", and ends on first
tasks. A new chat greets the user, shows the working folder, offers up to
four tasks from installed skills and what is set up, and says which model
is loading on which device. The warm-up no longer loads a model before
first-run setup has picked one.

Closes amd#5182. Part of amd#597, amd#5181, amd#470, amd#471.
… 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
…tification settings

Chats waiting on a permission or a question now move to a "Needs you" group at the top of the list, every row carries a running / waiting / done / failed dot with unread and pin, and eval and scheduled runs sit behind a filter. A second chat sent during a turn now waits visibly ("Waiting for the GPU — 1st in line") and runs after, instead of blocking silently and failing with 429 after 60 s. Alerts arrive with the notification panel closed, can be set per event, and the desktop app stays awake while a chat works.

- Backend: a FIFO turn queue replaces the hidden one-slot semaphore. Streamed turns wait inside their detached run and announce their place; Stop withdraws a waiting turn. /api/chat/active reports queued chats and chats paused on the user. Sessions gain pinned, unread, last_run_status and kind, with pin and mark-read endpoints.
- Agent UI: Needs you / Pinned groups, status dots, unread, pin, eval/scheduled filter; Settings > Notifications with banner / badge / off per event, sound, taskbar flash, keep-awake and a battery floor.
- Desktop app: Electron notifications are subscribed once at app level with cleanup (amd#4813), OS banners open their chat, the taskbar flashes when unfocused, the tray badge counts chats that need you, and a powerSaveBlocker holds off idle sleep during a turn.

Closes amd#5221
Closes amd#5226
Closes amd#4813
…ge with it

Memory was storing document and tool content as facts about the user (a
weather chat filled it with weather trivia), forgotten facts came back when
old chats were consolidated, and a running extraction made the next message
wait behind it. Extraction now keeps only what the user says about
themselves, forgetting is recorded so old conversations don't teach it
again, and a new turn stops a running extraction, which reruns when idle.

The memory page opens on "What GAIA knows about you", with an Edit and a
Forget button on each item, plus Undo and Add; stats, confidence and
sources move to an Advanced tab. Also fixes the page's stale views after
profile saves, silent goal failures, keyboard access, and stats that showed
zeros or success where operations failed.

Closes amd#5027, amd#5022, amd#4730, amd#4824, amd#4814, amd#4815.
The Agent UI's model picker offered a CPU/GPU/NPU switch no model can
honour, went silently dead during a reply, named Gemma on PCs whose
default is another model, and showed raw GGUF ids. Each local model now
shows where it runs (Lemonade's report once loaded, its recipe's target
before, with a warning when they differ), only models this PC can run are
offered, a pick made mid-reply applies to the next message, and the chip
names the model a new chat starts on.

Settings > Model adds friendly names, a fits-this-PC badge, download size,
speed measured here, a "Not available on this PC" section, and a context
size choice up to the largest window that fits. The size is saved per
model in config.json and used on every load; one that stops fitting is
refused at load. The sidebar's "Local · model" pill opens a live status
popover with Restart.

Closes amd#5214, amd#5209, amd#5213, amd#4823.
While GAIA worked, the Agent UI showed raw tool cards: internal tool names,
argument dumps, 9-11 px monospace text, the same failed call repeated as
separate cards, and the plan as a numbered list with no sign of which step
was running.

- The plan is one checklist marked done, running, failed, stopped or not
  started, updated live as the agent re-sends it; a replan gets its own.
- Each call is one plain line from derive_narration(), now sent on
  tool_start, tool_args and plan events and saved with the turn. Long paths
  and URLs show the part that differs.
- Identical calls merge into one row marked xN; a failure's reason shows on
  its row; the raw tool name, arguments and output are one click deeper.
- A live line with a timer says which tool is running or that GAIA is
  waiting on the model. The "Model is processing" heartbeat no longer fires
  under a running tool and counts from the last event, not the turn start.
- List arguments read "owner, task, due" instead of splitting into rows.
- No text in the activity view is below 12 px.

Closes amd#5220, amd#5190.
Nothing in a conversation showed whether a turn stayed on this PC, which pages
or document passages an answer drew on, or where the files it wrote went. A
collapsible rail beside the latest answer now shows that, built from the
turn's tool calls and the location of the model that actually answered.

- Sources: pages read (search hits when it only searched) and document
  passages named by the attached file, not the upload copy's ID (amd#5183).
- Files created or changed, with Open and Show in folder (amd#5185). Open uses a
  new launch mode on /api/files/open, limited to documents, data and images.
- This turn: This PC or the named cloud provider, whether documents stayed
  local, sites the web tools contacted, and cost (list-price estimate for
  Fireworks models). An unknown location reads "Not reported", never local.
- "Couldn't get live data" when every web lookup failed.
- The summary rides the done event and is saved per message, so it survives a
  reload; a summary that cannot be built is shown as an error, not dropped.
- Hidden until a turn has a summary; folds into a button below ~1,100 px.

Refs amd#5222, amd#890.
…nced

The source-text check still asserted Advanced's old 4K-32K presets, which
this branch replaced with a size chosen in Settings > Model up to what
fits.
The Electron source-pin test matched the exact <NewChat onSend={startChat} />
JSX; App now also passes the setup draft text and the setup-check flag.
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.
…lands first

The test raced on slow runners: with no turn in flight the job could start
before the forget, and stored the fact (failed on macOS CI).
test_cli_config reloads gaia.config, so a class imported at module load
is a different object from the one load() raises, and pytest.raises
missed it on CI's Linux and macOS runs.
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.
…plain steps

After a turn, the model's reasoning could sit open above the answer as a
tall monospace block quoting GAIA's internal rules, and the expanded step
list opened on a filter bar and leftover progress notes.

- Reasoning sits behind a one-line "Reasoning · N words" toggle. It is open
  only while it streams and folds once the agent moves on or the turn ends.
- Its text is sans, 13 px, in text-secondary on the recessed background
  (6.0:1 light, AA in dark), with a test pinning both themes.
- A finished turn drops progress notes ("Sending to model...").
- The filter sits after the steps and appears only from six call rows.

Closes amd#5252.
…one idle-friendly active-runs poll

A chat waiting for approval lost its prompt and Stop button when you left it for another chat that was still streaming, or reloaded, so it could not be answered and every chat queued behind it waited forever. Re-attaching now follows state instead of firing once: whenever the server reports the chat running and this view isn't streaming it, the view re-attaches and the replay brings the prompt back. A replayed prompt no longer adds a second copy to the bell, and a run that finishes between the poll and the attach closes cleanly instead of showing an error.

The sidebar now loads every chat by paging through /api/sessions, so chats past the first 50 come back and the hidden-runs count covers them all. /api/chat/active is polled from one shared poller: every second while a chat runs, backing off to every 15 s when idle, and waking at once when a turn starts or the window regains focus.

Closes amd#5247
Closes amd#5254
Closes amd#5256
While a new turn ran, the rail kept the previous answer's sources and data
flow under "This answer", and files an Undo removed stayed listed with Open.
Now a running turn shows as in progress, and the rail re-checks the files it
lists (on show, on focus, every few seconds) through a new
POST /api/files/status: a deleted file shows as no longer on disk with no
actions, and one changed since the turn says so.

The ChatView rail test gives every unmocked API call a pending promise, so
views that add calls don't break it.

Refs amd#5255.
With "Use mine", the status popover's Restart force-reloaded the model on
the user's own Lemonade, and could start that server, though setup says
GAIA never unloads their models. Restart now asks first and explains what
it interrupts, and never starts a server GAIA doesn't run; a context-size
change saves without reloading there.

Before the first chat the chip said GAIA couldn't tell where chats run.
The active-model view now carries the backend's answer for a new chat,
so the chip says Local as soon as setup finishes. The popover's free
memory no longer exceeds the pool setup reports: used plus free adds up.

Also from amd#5260: downloaded models say "on disk", user-registered model
ids read cleanly ("Qwen38 27B"), and the Settings nav focus follows the
tab you pick, so only one looks selected.

Fixes amd#5253
…emonade

A fresh install showed the chat screen for 8-10 s before swapping in setup;
a busy Lemonade looked absent, so setup planned a second server; and an
agent that couldn't start dumped a 900-character error on the new chat.

- Until the setup check answers, a never-set-up PC sees "Starting GAIA…";
  a PC set up before still goes straight to chat.
- Detection gives a busy server 10 s to answer, and a server that accepts
  the connection but never answers is reported as "couldn't check" with a
  Check again button instead of "not found".
- No suggestions when the agent can't start: one plain sentence, Try again,
  and the full error behind Details; the folder chip still shows.
- Setup says "You chose X" for a model the user picked, and four cards sit
  in a 2x2 grid instead of 3 + 1.

Closes amd#5249, amd#5250, amd#5251. Part of amd#5260.
The forget-vs-turn comparison was strict, so a forget stamped in the same
tick as the turn was missed and the fact stored. The queued-before-forget
test also pins the turn a second back so it never rests on two clock reads.
The test sent two turns, and a message refetch between them could wipe the
first, so it failed now and then under a full run. It now opens a chat that
already has a finished turn and sends once.
…o claude/ui-integration-test-2

# Conflicts:
#	src/gaia/apps/webui/src/services/api.ts
#	src/gaia/ui/_chat_helpers.py
…de/ui-integration-test-2

# Conflicts:
#	src/gaia/apps/webui/src/__tests__/App.newTask.test.tsx
#	src/gaia/apps/webui/src/components/__tests__/ChatView.autotitle.test.tsx
#	src/gaia/apps/webui/src/components/__tests__/ChatView.cards.test.tsx
#	src/gaia/apps/webui/src/components/__tests__/ChatView.confirmation.test.tsx
#	src/gaia/apps/webui/src/components/__tests__/ChatView.dispatch.test.tsx
#	src/gaia/apps/webui/src/components/__tests__/ChatView.escAndFirstWord.test.tsx
#	src/gaia/apps/webui/src/components/__tests__/ChatView.historyNotice.test.tsx
#	src/gaia/apps/webui/src/components/__tests__/ChatView.liveStatus.test.tsx
#	src/gaia/apps/webui/src/components/__tests__/ChatView.needsInput.test.tsx
#	src/gaia/apps/webui/src/components/__tests__/ChatView.staleState.test.tsx
#	src/gaia/apps/webui/src/components/__tests__/ChatView.stop.test.tsx
#	src/gaia/apps/webui/src/components/__tests__/ChatView.test.tsx
#	src/gaia/apps/webui/src/components/__tests__/NeedsInputCard.expiry.test.tsx
#	src/gaia/apps/webui/src/components/__tests__/PermissionPrompt.repeat.test.tsx
#	src/gaia/apps/webui/src/components/__tests__/stepCount.test.tsx
#	src/gaia/apps/webui/src/services/api.ts
@github-actions github-actions Bot added documentation Documentation changes chat Chat SDK changes mcp MCP integration changes llm LLM backend changes cli CLI changes tests Test changes electron Electron app changes security Security-sensitive changes performance Performance-critical changes agents labels Oct 17, 2026
kovtcharov added a commit to kovtcharov/gaia that referenced this pull request Oct 17, 2026
kovtcharov added a commit to kovtcharov/gaia that referenced this pull request Oct 17, 2026
@kovtcharov
kovtcharov force-pushed the claude/ui-session-panel-92c639 branch from ee1045c to 95f64af Compare October 18, 2026 07:18
Resolves the Memory dashboard test conflict (the Advanced tab from amd#5243
plus main's conversation-search test) and regenerates the API types.
@kovtcharov
kovtcharov marked this pull request as ready for review October 18, 2026 09:03
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Request changes

This review covers the PR's own session-panel commits: folder and internet enforcement, Undo all, the backend for Environment, Outputs, Changes and git, and the panel UI. The bundled PRs (#5239–#5246, #5275) get their own reviews. The design is solid: folder removal really is enforced in the agent, Undo all is all-or-nothing, and Commit and PR only run after confirmation. The internet-off switch is the problem. The PR presents it as an enforced control, but two easy shapes of call get past it.

  • Internet off is leaky. If a shell command includes any localhost URL, the whole command counts as local, so curl http://localhost:8000 && curl example.com or curl http://127.0.0.1 ; git push runs while the chat is offline. Separately, any host name that merely starts with 127. counts as this PC, so a web tool pointed at http://127.0.0.1.attacker.example/ is allowed. Fix: check every network command on its own, and test hosts with a real loopback-IP check.
  • Commit fails outright if the chat touched a gitignored file, such as a generated .csv or a file under build/. Git refuses to stage ignored paths, so the whole commit errors and none of the chat's files get committed. Fix: leave ignored files out of what gets staged, and skip them in the file list.

Real-world evidence

N/A: no evidence-bundle.md was produced for this run (the PR comes from a fork). The PR description embeds 13 rendered screenshots from a live Agent UI run (Outputs and Changes, removed folder and internet off, both refusals on a real model turn, the commit dialog, Undo all, light theme, phone width), plus a real commit and a byte-identical Undo all. That covers the surface. The two findings above come from static review: I reproduced the shell-check logic and git add on an ignored file in a scratch shell, not in the app.

🔍 Technical details

🟡 Internet-off shell check is defeated by any loopback URL in the same command (src/gaia/agents/base/offline.py, _command_goes_online)
It searches for an online command anywhere in the line. It then allows the whole line if every http(s):// URL it finds is loopback. A second segment with no scheme (curl example.com, git push origin main) contributes no URL, so the line is allowed. Reproduced against the shipped regex:

'curl http://localhost:8000/ && curl example.com'  -> allowed
'curl http://127.0.0.1/ ; git push origin main'    -> allowed

effects_of_call doesn't catch it either, because _hosts only matches scheme-qualified URLs. Suggested fix: split into segments (denied_effects._split_segments already exists) and refuse if any segment matches _ONLINE_COMMAND_RE with no loopback URL of its own. Add both strings above to test_session_environment_enforcement.py.

🟡 _is_loopback treats 127.<anything> host names as local (src/gaia/agents/base/offline.py)
host.startswith("127.") matches 127.0.0.1.attacker.example. _url_is_local then returns None early for every tool except search_web, so fetch_page / download_file / browser_* with such a URL bypass the switch.

def _is_loopback(host: str) -> bool:
    host = host.lower().strip("[]")
    if host == "localhost":
        return True
    try:
        return ipaddress.ip_address(host).is_loopback
    except ValueError:
        return False

Add import ipaddress. 0.0.0.0 drops out, which is fine: it isn't a valid destination for outbound requests anyway.

🟡 Commit errors when any changed file is gitignored (src/gaia/ui/session_git.py, commit → git add --all -- *rel)
git add -- <ignored path> exits 1 ("The following paths are ignored… Use -f"), so _run raises and nothing is committed. I verified this with GIT_LITERAL_PATHSPECS=1 in a scratch repo. describe() also lists those files as part of the repo's changes. A chat that writes summary.csv into a repo that ignores *.csv can never commit. Suggested fix: filter rel through git check-ignore --no-index --stdin (or git ls-files --others --ignored --exclude-standard -- …) in both describe and commit, and show the skipped files in the dialog rather than force-adding them. Add a test in test_session_git.py.

🟢 offline_refusal's local-url early return covers every tool (offline.py)
An MCP connector tool, or a shell call that passes url="http://localhost" alongside an online command, returns None before the connector and command checks run. Moving the early return into the WEB_TOOLS / browser_ branches would keep it narrow.

🟢 Undo all leaves folders behind for files created and then deleted within the chat (file_snapshots._spans)
Those spans resolve to unchanged and are dropped, so their created_dirs never get cleaned up. This is cosmetic.

Strengths

  • withhold_path beats every grant and is checked in is_path_allowed, validate_read_access, and the shell cwd. The removed-folder case is genuinely enforced rather than only displayed.
  • _apply / _Step reuse the per-turn rollback for Undo all. Copies are verified before anything is written, and a failure part-way rolls back every file.
  • The git actions are carefully scoped: literal pathspecs, commit -- <paths> so other staged work stays staged, message and body passed via file, no force push, and the PR is refused while internet is off.

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Replaced by #5326, which carries all of these commits plus the fixes for the review findings.

kovtcharov-amd added a commit to kovtcharov/gaia that referenced this pull request Oct 19, 2026
…ter (amd#5290)

The Agent UI looked developer-built: copper on cool blue-grey, 19 font
sizes, labels in spaced-out monospace capitals, and buttons in three
different shapes. This lands the foundation of the approved redesign
(amd#1001). It brings warm gray neutrals and muted brass for actions and
focus only. Inter replaces DM Sans and Space Mono. Controls are soft
tinted, rise slightly on hover and settle on press, and dialogs use calm
sentence-case titles. Every token keeps its name, so the open feature
PRs pick up the new look without edits. With no saved theme, the app now
follows the OS instead of defaulting to dark, so a light-mode user who
never picked a theme opens it in light.

**Decided: brass on both the Agent UI and the TUI.** This PR moves the
Agent UI first. The TUI keeps copper only until amd#5291 lands a
terminal-safe brass, because the light brass `#7A5A22` rounds to
`#875F00` on a 256-colour terminal, which is the TUI's Warning and
Selected entry. Until then the cross-surface test pins the TUI's copper
on its own, and amd#5291 restores the shared-accent assertion. The commit
marked `[decision pending]` predates the decision.

**Stacked on amd#5266.** This branch includes amd#5266's motion commit,
because its tokens are the motion base; review the commits after it.
Lands after v0.25.0.

| Before (`main`) | After |
|---|---|
|
![](https://raw.githubusercontent.com/kovtcharov/gaia/ui-redesign-1001-before/finished-answer-light-win32.png)
|
![](https://raw.githubusercontent.com/kovtcharov/gaia/5eb5f66b5ff11ed138c04b692443ee044caa5352/src/gaia/apps/webui/visual/__screenshots__/finished-answer-light-win32.png)
|
|
![](https://raw.githubusercontent.com/kovtcharov/gaia/ui-redesign-1001-before/scheduled-tasks-light-win32.png)
|
![](https://raw.githubusercontent.com/kovtcharov/gaia/5eb5f66b5ff11ed138c04b692443ee044caa5352/src/gaia/apps/webui/visual/__screenshots__/scheduled-tasks-light-win32.png)
|
|
![](https://raw.githubusercontent.com/kovtcharov/gaia/ui-redesign-1001-before/documents-dark-win32.png)
|
![](https://raw.githubusercontent.com/kovtcharov/gaia/5eb5f66b5ff11ed138c04b692443ee044caa5352/src/gaia/apps/webui/visual/__screenshots__/documents-dark-win32.png)
|
|
![](https://raw.githubusercontent.com/kovtcharov/gaia/ui-redesign-1001-before/new-chat-dark-win32.png)
|
![](https://raw.githubusercontent.com/kovtcharov/gaia/5eb5f66b5ff11ed138c04b692443ee044caa5352/src/gaia/apps/webui/visual/__screenshots__/new-chat-dark-win32.png)
|

**Defaulted, easy to change.** The four round-3 design questions went
unanswered, so the recommended answers stand: a green tick for a
finished step, neutral markers for the selected chat and current
chapter, a small dark dot for an unread answer, and an icon shadow that
falls only outside each shape. They apply in the follow-ups below, which
own those components.

## Test plan

- [ ] `npm test` in `src/gaia/apps/webui`: 899 pass, including new
contrast cases for the raw brass and the switch knob on it
- [ ] `npx tsc --noEmit -p .` and `npx tsc --noEmit -p visual` in
`src/gaia/apps/webui` are clean
- [ ] `npx vitest run` in `website/`: 236 pass
- [ ] `go test ./internal/ui/theme/...` in `tui/` passes against the
updated spec
- [ ] `npm run test:visual` in `src/gaia/apps/webui`: 12 snapshots, six
screens in light and dark, match on Windows (set `GAIA_VISUAL_CHROMIUM`
to a local Chromium if `npx playwright install chromium` can't download)
- [ ] `gaia chat --ui`: switch Light, Dark and Match system in Settings
› General. The composer shows a brass focus ring, buttons lift on hover,
the warning notice shows its icon, and Settings switches are brass when
on.

<details>
<summary>🔍 Technical details</summary>

**What moved**
- `index.css` tokens: warm-gray palette in both themes; brass `--accent`
(`#7A5A22` / `#D4B47E`); soft-tinted `--accent-fill`; new
`--accent-solid`, `--accent-ring`, `--shadow-press`, `--ease-spring`,
`--duration-spring`, `--duration-press` and `--fs-*`. The layered
`--shadow-sm/md/lg` carry a light top rim. None of them is a glow, and
the no-glow guard passes.
- Each place that used `--accent-fill` as a solid mark moved to a role
that stays visible on the new pale wash: switch tracks, native
checkboxes and progress bars, the suggested permission button, and the
count badges in `Sidebar.css` and `NotificationCenter.css`.
- `ScheduleManager.css` redefined `.btn-primary` and `.btn-secondary`
unscoped. Once its lazy chunk loaded, every button in the app changed
shape. Those rules are removed.
- Labels that were uppercase or monospace in stylesheets no other open
PR touches are now sentence-case Inter. Paths, keys and code stay
monospace.
- `--bg-active` rejoins the contrast matrix. The pinned copper used to
fail on it; the brass clears every floor.
- The Electron mirrors (`main.cjs`, the installer dialog), `index.html`
`theme-color` and `utils/theme.ts` follow the new canvas.

**Visual suite** (`src/gaia/apps/webui/visual/`): `vite preview` of the
production build, every `/api` call answered from fixtures, a frozen
clock, animations off, and at most 50 differing pixels. An API call
without a fixture fails the test by name. Baselines are Windows-only and
no CI job runs the suite yet; follow-up below.

**Follow-ups once these PRs merge** (each restyle goes through tokens;
no code here depends on them)
- amd#5242: sidebar rich rows (status, preview line, time), titles that
fade instead of truncating, borderless search.
- amd#5240: 28px greeting, raised suggestion cards that lift, first-run
stepper. `SetupScreen.css` gets a one-line change here, outside amd#5240's
hunks.
- amd#5243: Memory with neutral stat figures, brass switches instead of
green, and no per-tile hues.
- amd#5245: live checklist with each step's time, a shimmering live step,
and sans labels.
- amd#5269 / amd#5266: a raised user bubble, 15px answer prose, path chips and
the answer footer.
- amd#5244: AdvancedSettings headings in sentence case, and warning status
text with its icon.
- amd#5246, amd#5241, amd#5275, amd#5283, amd#5239: side rail, queue rows, context
panel, session panel and turn changes adopt the type and elevation
tokens.
- New behaviour, each its own PR: resizable panes, chapter bars (amd#5271),
the outer-only icon shadow wrapper, and Linux baselines plus a CI job
for `test:visual`.
- TUI: brass that survives 256-colour rounding, re-unifying the accent
(amd#5291).
</details>

---------

Co-authored-by: Kalin Ovtcharov <[email protected]>
kovtcharov-amd pushed a commit to kovtcharov/gaia that referenced this pull request Oct 20, 2026
kovtcharov-amd pushed a commit to kovtcharov/gaia that referenced this pull request Oct 20, 2026
grtninja pushed a commit to grtninja/gaia that referenced this pull request Oct 20, 2026
…md#5326)

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 amd#5283 (closed). It was rebuilt on main so it
carries only what isn't merged yet.

## Test plan

- [x] `npx tsc --noEmit`, `npx vitest run` (1465 passed) and `npm run
build` in `src/gaia/apps/webui`
- [x] `npx jest` in `tests/electron`: all pass on Linux line endings;
ChatView is 101.6 KB of the 102.4 KB limit
- [x] `pytest tests/unit/agents tests/unit/chat/ui` plus the security
and shell suites; the only failures also fail on main on this machine (a
background thread trying to start the daemon, and `test_step_timing`)
- [x] `python util/lint.py --black --isort`
- [x] Agent UI on a fresh GAIA home with a local model: a turn edits two
files in a git folder, the panel shows them under Outputs and Changes,
Review changes shows the diff, Commit commits only those files, and Undo
all restores them (screenshots in the evidence comment)
- [x] Agent UI with internet off: web search and a page fetch are
refused before running, the message box says the chat is offline, and
the panel doesn't claim a failed lookup or a contacted site
- [ ] Flagship eval at the next RC: the agent loop now refuses calls up
front when internet is off or a folder was removed

<details>
<summary>🔍 Technical details</summary>

- Rebuilt from `origin/main` by cherry-picking the amd#5283 commits and
this PR's own fixes. Commits already on main via amd#5275 or amd#5311 were
dropped (the Retry with… turn-queue fix, the live-line tool label,
`visibleInterval`). API types were regenerated with `export_openapi` +
`gen:api-types` and match the merged files.
- Conflicts were resolved keeping main's behaviour.
`PathValidator.validate_read` keeps 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 `_apply` used by Undo and Undo all. `ContextPanel` was split into
`ContextDetails` (shown in the panel) and the standalone sheet, starting
from amd#5275's final per-section error handling.
- New: `useJumpToMessage` moves jump-to-turn out of ChatView to keep it
under the size budget. `turn_summary._ran` skips calls whose result says
they never ran (`executed: False` or `status: 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.
</details>

---------

Co-authored-by: Kalin Ovtcharov <[email protected]>
kovtcharov added a commit to kovtcharov/gaia that referenced this pull request Oct 23, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents chat Chat SDK changes cli CLI changes documentation Documentation changes electron Electron app changes llm LLM backend changes mcp MCP integration changes performance Performance-critical changes security Security-sensitive changes tests Test changes

Projects

None yet

2 participants