fix(hub): stop offering a GAIA install a non-agent card rules out - #3232
Open
github-actions[bot] wants to merge 1 commit into
Open
fix(hub): stop offering a GAIA install a non-agent card rules out#3232github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
A component or app that ships an npm package rendered "Open in GAIA" as its primary button while the install card above it offered only a platform download and `npm install -g` — neither of which installs into the GAIA app. The button gate keyed off `npm_package` alone; the commands key off the lane. The buttons are now read off installMethods(), so a CTA can never offer a path the command above it did not: a component/app with an npm package links to npm, and every existing entry renders exactly as before. Closes #3231
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A hub page for a component or app that ships an npm package sent readers down a path the same page had just ruled out: the big primary button said Open in GAIA while the install card right above it offered only a platform download and
npm install -g. Now the buttons are read off the install methods the card actually prints, so such an entry links to npm instead. Nothing in the live catalog hits this today —gaia-uiwould be the first — and every currently published page renders unchanged.Closes #3231
Test plan
cd website && npm testpasses (78 tests, incl. new coverage for a non-agent with annpm_package)cd website && npx astro checkreports 0 errorstype: "app"and annpm_package, and confirm/hub/<id>shows View on npm as the primary button and nogaia://hub/install/link/hub/email,/hub/gaia,/hub/terminal-hubrender byte-identically tomain🔍 Technical details
Root cause.
InstallCard.astrogated the button row on bare!!agent.npm_package, while the commands above it come frominstallMethods(), which branches on the lane (isAgent/isSkill). Atype: "app" | "component"entry with annpm_packagetherefore got the agent branch'sOpen in GAIAdeep link (gaia://hub/install/<id>— the Electron install action, seeservices/deep-link.cjs) even thoughinstallMethods()had returnedDownload+npm install -g.Change. New
installCta()incatalog.ts:552derives the buttons frominstallMethods()'s own keys rather than re-deriving the lane, so the two can't drift again:gaia/skillmethod present +npm→gaia+npm(unchanged: GAIA primary, npm secondary)npmwith no GAIA install →npm(npm becomes the primary CTA) ← the fixgaia(unchanged)A skill that ever carried an
npm_packagenow also stays on GAIA alone, since its card shows no npm command.Verification. Built the site twice (patched vs.
main) against a local fixture catalog containing email (agent+npm), gaia (agent), terminal-hub (component), web-research (skill) and agaia-ui(app+npm) entry, then diffed the generated HTML: the four existing shapes are byte-identical and only the app+npm page changes, fromOpen in GAIA+View on npmtoView on npmalone.npx astro check: 0 errors.npm test: 78 pass.Repo-level checks (nothing Python changed):
python util/lint.py --allpasses every check except the environmental "Import Validation" step, which fails here because GAIA isn't importable from/bin/python.pytest tests/unit/— 10370 passed, 3 failed, all three intest_hub_installer.py/test_registry_installed_import.pyfromNo module named pipinside the uv venv, unrelated to this diff.Left alone deliberately. A download-only component (terminal-hub) still gets the
Open in GAIAdeep link it has always had. Whether that link means anything for a component is a separate, pre-existing question — the issue's acceptance criteria pin terminal-hub's output as unchanged, so it isn't touched here.