Repository navigation
fix(ui): answer footer and permission prompts speak plainly - #5269
Conversation
|
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:
Real-world evidenceN/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 🔍 Technical details🟡 Cloud place depends on Lemonade being reachable ( 🟡 Agent UI change without embedded screenshots 🟢 Prompt body wording ( 🟢 Strengths
|
|
Thanks for the review. All four points are handled:
🔍 Technical details
|
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.
40fd206 to
cfe96ba
Compare
…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 | |---|---| |  |  | |  |  | |  |  | |  |  | **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]>
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.txtin 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:
Footer before the click:
Test plan
npx vitest run: 860 passed.npx tsc --noEmitis cleanpyteston the Agent UI, permission, stdio, shell-prompt and agent suites plus the flagship package tests: 6798 passed. The 3 failures are tool-count checks inhub/agents/gaia(87 tools found vs 95 declared). Optional dependencies are missing from the local venv, and this PR doesn't touch tool registrationpython util/lint.py --black --isort --pylintpasses🔍 Technical details
place, set by_turn_place. For a cloud model it is the provider's name. For a local model it is thedevicethat Lemonade's/healthreports for that model. Older messages have noplace, 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_requestgainstool_label(fromtool_phrase, built onderive_narration) andalways_label(fromgrant_phrase, which uses the same_VERB_FORMS).always_scopeis unchanged becauseagent_ui_controlmatches it exactly. Shell scopes get no label because they are already the command itself.GrantScopegains an optionalsubject(the file or skill), so the label can be worded without parsing it.turn_viewfooter still returns the raw numbers. Only its docstring and the guide line about it changed.