Repository navigation
fix(browser): stop telling an installed app user to run pip - #7261
Conversation
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
|
Verdict: Approve People using the installed desktop app no longer get told to run Real-world evidenceN/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 detailsIssues found 🟢 Duplicate Checked and fine
Strengths
|
The browser hint and the install hint it wraps now decide "installed build" with the same function, so they cannot disagree.
|
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. |
…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>
When the browser tools were not available, the installed agent told the user to run
pip installand 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
.envone-liner is not addressed here.Refs #7209
Test plan
python -m pytest tests/unit/test_browser_install_hint.pyand the existing browser tests (203 pass)