Skip to content

feat(ui): first-run setup names the chat model; new chats offer tasks - #5240

Merged
kovtcharov-amd merged 5 commits into
amd:mainfrom
kovtcharov:claude/ui-first-run-empty-state-a093e1
Oct 19, 2026
Merged

kovtcharov-amd merged 5 commits into
amd:mainfrom
kovtcharov:claude/ui-first-run-empty-state-a093e1

Conversation

@kovtcharov

@kovtcharov kovtcharov commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

A new user used to open GAIA to a text box on a black canvas, and first-run setup described the wrong thing: after "Use mine" it still offered to install a server, promised "about 6 GB" while pulling a 23 GB model, and never said which chat model would answer. Now setup checks the PC (device, memory, disk), names the chat model and the real download size before anything starts, lets you pick a smaller model, follows "Use mine", and ends on a few first tasks. A new chat greets you, shows the folder GAIA works in, offers up to four tasks from your installed skills and what you've set up (indexed documents, a connected mail account), and says what is loading ("Loading Qwen3.6-35B-A3B-GGUF on your GPU… 4s"). It lands after v0.25.0.

Closes #5182, closes #5249, closes #5250, closes #5251. Part of #597, #5181, #5260, #470, #471.

Fixes from the fresh-install test:

🔍 Technical details
  • /api/setup/plan and /api/setup/chat-model decide with gaia init's own functions (resolve_init_chat_model, with_chat_model, pending_download_sizes, recommend_default_chat_model), so the screen can't name a model setup won't pull. Before GAIA's own server runs, the hardware can't be read, so the plan says the pick comes once the server answers, and the run reports it from gaia init's "Chat model:" line.
  • Model options include a check that this Lemonade version can serve the model, the same check setup makes.
  • /api/onboarding/start picks cards from installed skills, indexed documents and mail connectors, with no model calls.

Test plan

  • npx vitest run: 84 files, 882 tests
  • npx tsc --noEmit
  • Electron Jest (tests/electron): 29 suites, 847 passed
  • pytest tests/unit/chat/ui tests/unit/test_lemonade_choice*.py tests/installer …. One unrelated failure, test_custom_agent_mcp_harness, fails the same way on origin/main.
  • pytest tests/unit/chat/ui tests/unit/test_ui_warmup.py tests/unit/test_onboarding_router.py tests/test_api.py and related UI suites (1892 passed)
  • python util/lint.py --black --isort --pylint --flake8
  • Cold first run against an empty GAIA_HOME (backend on :4307, served build): system check → "Use mine" → model named with size → pick smaller and back → install → download → ready card → first task → new chat. A second cold run covered "Starting GAIA…" (fix(ui): a fresh install shows the chat screen for ~10 seconds, then swaps in setup #5249), a busy Lemonade's "Couldn't check" and its retry (fix(setup): the setup screen sometimes misses a running Lemonade and offers to install a second one #5250), "You chose", and the agent-can't-start message with Details and Try again (fix(ui): when the agent can't start, the new-chat screen shows a 900-character developer error #5251). The gaia init run, the user's Lemonade and the warm-up's model load were mocked (no multi-GB downloads).
  • On a real PC with an existing Lemonade: "Use mine" → Start setup shows "Use your Lemonade Server", and the ready card names the model in ~/.gaia/config.json
  • On a real cold PC: setup names the chat model once GAIA's server is installed

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.
@github-actions github-actions Bot added documentation Documentation changes tests Test changes electron Electron app changes labels Oct 16, 2026
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.
…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.
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

First-run setup now names the chat model and its real download size, follows "Use mine", and a new chat offers task cards and says which model is loading. The backend reuses gaia init's own decision functions, so the screen and the install can't disagree, and every new piece has tests. One edge path is worth fixing before merge:

  • A PC with no secure keyring loses the whole new-chat screen. To decide whether to offer "Triage my inbox", the start screen checks the OS keyring for a mail account. On a Linux box without gnome-keyring or kwallet that check raises an error, the whole request fails, and every new chat then says "GAIA's assistant didn't start". That's wrong (the assistant is fine), and it also hides the working-folder line and every other card. The mail check is only a hint, so log the keyring error and leave out the inbox card instead of failing the screen.

Real-world evidence

N/A here: no evidence bundle was produced for this run. The PR description reports two cold first runs against an empty GAIA_HOME, with gaia init, the user's Lemonade and the model load mocked. Two real-hardware items are still unchecked: "Use mine" on a PC with its own Lemonade, and a cold PC naming the model once the server is up. Static review covered the rest; screenshots of setup and the new-chat screen are still owed from a strix-halo / real-PC run.

🔍 Technical details

🟡 Keyring failure takes down /api/onboarding/start (src/gaia/ui/start_screen.py:146)
peek_connection calls verify_keyring_backend(), which raises ConnectorsError for a refused (plaintext) backend or an unresolvable PYTHON_KEYRING_BACKEND. new_chat_start only catches HTTPException from list_skills, so this becomes a 500. NewChat then sends the error through SuggestionsUnavailable ("assistant didn't start"), and you lose working_folder too. Catch the error, log it with context and skip the mail card. This is a display boundary, not a silent fallback on a required operation:

def _mail_connected() -> bool:
    from gaia.connectors.errors import ConnectorsError
    from gaia.connectors.registry import REGISTRY
    from gaia.connectors.store import peek_connection

    try:
        for connector_id in MAIL_CONNECTORS:
            spec = REGISTRY.get(connector_id)
            if peek_connection(spec.oauth_provider_ref or spec.id) is not None:
                return True
    except ConnectorsError as e:
        logger.warning("New-chat inbox card skipped: can't read connections: %s", e)
    return False

Add a unit test in test_start_screen.py that has peek_connection raise.

🟢 Detection worst case doubled (src/gaia/llm/lemonade_choice.py:2072 in diff)
With _DETECT_TIMEOUT read set to 10 s and two DETECT_PORTS probed one after the other, a machine where both ports accept but stall now blocks /api/lemonade/detect for ~20 s. That's acceptable given the "Couldn't check" UI, but if it shows up in the fresh-install test, probe the two ports in parallel.

Strengths

  • setup_plan.py decides with resolve_init_chat_model / with_chat_model / pending_download_sizes, so what the UI promises can't drift from what gaia init pulls. It fails loudly through SetupPlanError → 503/422 with actionable text.
  • Detection.unchecked separates "none found" from "couldn't tell", which fixes the quiet second-server plan (fix(setup): the setup screen sometimes misses a running Lemonade and offers to install a second one #5250) at the source instead of in the UI.
  • Gating request_warm_up on is_initialized() stops the pre-setup Gemma load with a logged reason, and has test coverage.

On a PC whose OS keyring can't be read, the mail check raised and the
whole new-chat screen failed with "GAIA's assistant didn't start",
hiding the working folder and every card. The check is only a hint, so
a keyring error is now logged and the inbox card is left out.
kovtcharov-amd pushed a commit to kovtcharov/gaia that referenced this pull request Oct 19, 2026
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 |
![](https://raw.githubusercontent.com/kovtcharov/gaia/efd1d2e456449ca32044b4bff748197a1353e1ce/before-light.jpg)
|
![](https://raw.githubusercontent.com/kovtcharov/gaia/efd1d2e456449ca32044b4bff748197a1353e1ce/after-light.jpg)
|
| Dark |
![](https://raw.githubusercontent.com/kovtcharov/gaia/efd1d2e456449ca32044b4bff748197a1353e1ce/before-dark.jpg)
|
![](https://raw.githubusercontent.com/kovtcharov/gaia/efd1d2e456449ca32044b4bff748197a1353e1ce/after-dark.jpg)
|

Footer before the click:
![](https://raw.githubusercontent.com/kovtcharov/gaia/efd1d2e456449ca32044b4bff748197a1353e1ce/after-dark-footer-collapsed.png)

## 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>
@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Oct 19, 2026
Merged via the queue into amd:main with commit 81e0099 Oct 19, 2026
51 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the claude/ui-first-run-empty-state-a093e1 branch October 19, 2026 09:22
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

documentation Documentation changes electron Electron app changes llm LLM backend changes performance Performance-critical changes ready_for_ci Run CI workflows on draft PR without requesting review tests Test changes

Projects

None yet

2 participants