Skip to content

fix(browser): stop telling an installed app user to run pip - #7261

Merged
kovtcharov-amd merged 2 commits into
amd:mainfrom
kovtcharov:kalin/rc18-browser-hint
Nov 12, 2026
Merged

kovtcharov-amd merged 2 commits into
amd:mainfrom
kovtcharov:kalin/rc18-browser-hint

Conversation

@kovtcharov

Copy link
Copy Markdown
Contributor

When the browser tools were not available, the installed agent told the user to run pip install and a Playwright command, which an installed build cannot do. It now says the feature is not included in this build; a source install still gets the commands for its own Python.

This covers the browser message in #7209. The mail and calendar messages are in #7164, and the .env one-liner is not addressed here.

Refs #7209

Test plan

  • python -m pytest tests/unit/test_browser_install_hint.py and the existing browser tests (203 pass)
  • Installed agent: ask it to open a web page in a browser and read the message
  • Eval categories to watch on the next RC: gaia_tool_selection, error_recovery

Before: browser_open in the installed desktop app answered "pip install
'amd-gaia[browser]' && python -m playwright install chromium", though the
agent is a self-contained binary that neither command can change. After: an
installed build says browser automation isn't bundled and needs a source
install; a source install still gets both commands, for its own Python.

The missing-install and launch-failure messages now build their remedy from
missing_extra_hint, the frozen-aware helper the other optional tools use,
and the registration log line uses the same text.

Closes amd#7209
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve

People using the installed desktop app no longer get told to run pip install and a Playwright command when browser automation is missing. They now see that the feature isn't included in their build and that they need a source install. Source installs still get both install commands, written for their own Python. I found nothing blocking.

Real-world evidence

N/A — no evidence bundle was produced for this run. The verdict rests on reading the code alone. The PR's unchecked item, reading the message in a real installed agent, is still the one check that proves it.

🔍 Technical details

Issues found

🟢 Duplicate _frozen() helper (src/gaia/browser/errors.py:16): this is an exact copy of gaia.agents.install_hints._frozen. The module already imports from install_hints lazily, so it could reuse that helper. Then the tests' sys.frozen monkeypatch and the hint text would always use the same check. Optional.

Checked and fine

  • Playwright isn't in any freeze spec, so the frozen-build text "GAIA[browser] isn't bundled in this GAIA build" is accurate.
  • When the Chromium executable is missing, driver.py:192 raises BrowserNotInstalled, so that case also gets the frozen-aware text.
  • Docs drift: browser-use.mdx:19,26-27 still show pip install 'amd-gaia[browser]', but those lines are the source-install instructions, which is correct. The new troubleshooting sentence matches what the code does.
  • In a source install, editable_gaia_root() can raise on a corrupt direct_url.json, and that would come out of the exception's constructor. Other missing_extra_hint callers already share this risk, so it isn't new to this PR.

Strengths

  • Reuses missing_extra_hint / format_command from install_hints instead of a third hand-written install string, so the browser message now follows the uv-or-pip and editable-checkout logic used everywhere else.
  • The tests check both installs (frozen and source) for both error types, including that a frozen build never sees python -m playwright.

The browser hint and the install hint it wraps now decide "installed
build" with the same function, so they cannot disagree.
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

The browser errors now reuse the shared installed-build check instead of their own copy, as the review suggested, so the two hints can't disagree. Browser tests pass.

@github-actions github-actions Bot added documentation Documentation changes tests Test changes agents labels Nov 12, 2026
@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Nov 12, 2026
Merged via the queue into amd:main with commit 792754d Nov 12, 2026
42 of 44 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the kalin/rc18-browser-hint branch November 12, 2026 08:29
kovtcharov-amd pushed a commit to kovtcharov/gaia that referenced this pull request Nov 12, 2026
…res (amd#7340)

The rc18 desktop app told users to run `gaia connectors connect google`
and `pip install amd-gaia[browser]`. A desktop install has neither
command, so the user was left with nothing they could do; it also
offered an agent list in a product that is one agent. This adds a lint,
in the style of `test_amd_gaia_urls.py`, over every string the desktop
app or the TUI can show, so the next such message fails the PR that adds
it.

It flags a `gaia <subcommand>` written as something to type (the
subcommands are read from the parser, so a new one is covered), `pip
install`, `lemonade-server serve`, and the removed features: an agent
list, an agent catalog, an Agent Hub, the standalone email agent. The
TUI is a terminal, so only the last three rules apply there.

**What it found on main:** 66 strings, counted per file with the issue
that tracks them. The count is exact both ways: a new string fails, and
fixing one fails until its number is lowered, so the list can only
shrink.

| Class | Strings | Issue |
|---|---|---|
| Tells the user to type a `gaia ...` or `pip install ...` command | 53
| amd#7338 (new; amd#7209 covers only the browser hint) |
| Names an Agent Hub, an agent catalog or `gaia hub` | 7 | amd#7339 (new) |
| Names the standalone email agent | 6 | amd#4825, removed by amd#7108 |

Eight more matches are not text for a user (a table of commands GAIA
holds for approval, developer API schema text) and are listed separately
with the reason.

A fix PR that changes one of these strings (amd#7164, amd#7261, amd#7108) will
need to lower the matching count when it lands after this.

## Test plan

- [ ] `python -m pytest tests/unit/test_user_facing_text.py -q` passes
(5 tests)
- [ ] Add `"Run \`gaia init\` to fix this."` to any file under
`src/gaia/agents/tools/` and the test fails naming the file and line
- [ ] Runs in the existing unit job (`test_unit.yml` runs
`tests/unit/`); no workflow change needed

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

- Python strings come from the AST, minus docstrings and logging calls,
under `src/gaia/ui`, `src/gaia/agents` and
`hub/agents/gaia/python/gaia_agent`. The Agent UI is covered by its
English locale file (0 violations today). Go string literals are read
with comments blanked out.
- `test_the_rules_catch_what_rc18_shipped` pins the exact rc18 strings
so a rule cannot be loosened to get green, and
`test_the_rules_leave_ordinary_text_alone` pins prose such as "the gaia
daemon".
</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents documentation Documentation changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants