Skip to content

fix(ui): answer footer and permission prompts speak plainly - #5269

Merged
kovtcharov-amd merged 3 commits into
amd:mainfrom
kovtcharov:claude/ui-polish-5260-06ae89
Oct 19, 2026
Merged

kovtcharov-amd merged 3 commits into
amd:mainfrom
kovtcharov:claude/ui-polish-5260-06ae89

Conversation

@kovtcharov

@kovtcharov kovtcharov commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

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 #5260. The suggestion-card item (cards wrapping 3 + 1) is already fixed in #5240, which lays the cards out as a 2-column grid, so this PR leaves it alone. On merges: this PR and #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 #5241, #5242, #5244 and #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

  • npx vitest run: 860 passed. npx tsc --noEmit is clean
  • 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
  • python util/lint.py --black --isort --pylint passes
  • 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 …"
🔍 Technical details
  • 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.

@github-actions github-actions Bot added documentation Documentation changes mcp MCP integration changes tests Test changes electron Electron app changes agents labels Oct 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

The PR rewrites the line under an answer and the permission prompts in plain words, so they read "Answered in 40 s on your GPU" and "Always allow writing notes.md" instead of showing TTFT numbers and tool ids. The exact numbers are still one click away. The machine-matched grant scope is unchanged, so MCP control keeps working, and both sides have tests. One gap is worth fixing before merge:

  • Cloud answers lose "via Fireworks AI" when Lemonade isn't running. The code that works out where an answer ran sits after the local Lemonade stats call. If that call fails, as it does for a cloud-only user with no local server, the footer never names the provider. Work out the place before that call, or separately from it.
  • No screenshot on the PR. This changes the Agent UI, and the description says it was checked in the running app but embeds no before/after screenshots. Please add them.

Real-world evidence

N/A: no evidence bundle was produced for this run. The verdict rests on static review and the PR's own test results (vitest 860 passed; pytest 6798 passed, plus 3 unrelated tool-count failures in hub/agents/gaia). The Agent UI footer and permission card were not exercised here.

🔍 Technical details

🟡 Cloud place depends on Lemonade being reachable (src/gaia/ui/_chat_helpers.py:3485)
_turn_place is awaited inside the same try as stats_client.get(f"{base_url}/stats"). When Lemonade is down, httpx.ConnectError jumps to the broad except, so turn_place stays None. For a cloud turn, _turn_place returns before it touches Lemonade, so it doesn't need that call to succeed. Resolve the cloud case first and call Lemonade only for local turns. For example, run it in its own try after the stats block, logging at debug on failure like the stats path does. As written, test_cloud_turn_names_the_provider_and_skips_lemonade passes, but the real call site can't reach that branch in the cloud-only setup.

🟡 Agent UI change without embedded screenshots
Under the rubric, an Agent UI change needs before→after screenshots embedded in the PR description. The test plan says light and dark were checked by hand, but no images are attached.

🟢 Prompt body wording (ChatView.tsx:697)
GAIA is asking before ${toolLabel}. renders as "GAIA is asking before writing file." Something like GAIA wants to start ${toolLabel}. or GAIA needs your OK before ${toolLabel}. reads more naturally. This is optional.

🟢 AnswerStats list keys (AnswerStats.tsx:151)
key={line} is fine today because every line has a distinct prefix. Using the index is slightly more robust if two lines ever match. This is optional.

Strengths

  • always_scope keeps its machine-matched value, and always_label is added next to it. The MCP agent_ui_control contract is unchanged and the test pins this (test_path_grant_names_its_file_as_subject).
  • The wording reuses derive_narration / _VERB_FORMS instead of a second phrase table. grant_phrase returns None for an unknown verb rather than guessing, and the UI then shows the raw scope.
  • Older messages without place make no claim about where they ran, and a test covers this.

@kovtcharov

Copy link
Copy Markdown
Contributor Author

Thanks for the review. All four points are handled:

  • Cloud answers with Lemonade stopped: fixed in 682bd16. The provider now comes from the model before any Lemonade call, so a cloud answer says "via Fireworks AI" even with no local server. A new turn test runs with Lemonade unreachable and checks both the live update and the saved message.
  • Screenshots: before/after in light and dark are now in the description.
  • Prompt wording: taken in 40fd206. It now reads "GAIA needs your OK before writing file."
  • List keys: left as they are. The exact-numbers lines always start with different words ("Total time", "First token", "… tokens", "… tokens/s"), so they can't collide. The list is never reordered, so index keys would add nothing.
🔍 Technical details
  • _turn_place is split into _turn_location / _cloud_place, which run before the stats try, and _local_place, which is the only part that calls Lemonade's /health.
  • Tests: test_cloud_turn_names_its_provider_with_lemonade_stopped and test_local_turn_with_lemonade_stopped_claims_no_place in tests/unit/chat/ui/test_turn_place.py. They patch httpx.AsyncClient so every request raises ConnectError.

The line under an answer read "1012ms TTFT · 68 → 510 tokens · 38.1 tok/s",
and permission prompts named internal tools ("Always allow write_file on
prompt-test.txt"). Now the footer says "Answered in 40 s on your GPU · first
word in 1 s" (or "via Fireworks AI"), with the exact numbers a click away,
and prompts say "Allow writing file?" / "Always allow writing
prompt-test.txt in this chat".

- Each turn records where it ran in its stats (`place`), from the model's
  provider or the device Lemonade reports for it.
- permission_request carries `tool_label` and `always_label`, built from the
  narration verbs; `always_scope` is unchanged, since the MCP control
  matches it exactly.
- Full-access and accept-edits notices use the call's narration instead of
  the tool id.

Part of amd#5260.
A cloud turn's footer lost "via Fireworks AI" whenever the local Lemonade
was not running: the provider was only worked out after the Lemonade
/stats call, so a failed call skipped it. The provider is now resolved
from the model before any Lemonade request; only a local turn's device
still needs Lemonade.

Part of amd#5260.
"GAIA is asking before writing file." read awkwardly; it now says "GAIA needs your OK before writing file."

Part of amd#5260.
@kovtcharov-amd
kovtcharov-amd force-pushed the claude/ui-polish-5260-06ae89 branch from 40fd206 to cfe96ba Compare October 19, 2026 06:34
@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Oct 19, 2026
Merged via the queue into amd:main with commit 1c8187a Oct 19, 2026
62 of 64 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the claude/ui-polish-5260-06ae89 branch October 19, 2026 08:38
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents documentation Documentation changes electron Electron app changes mcp MCP integration changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants