fix(frontend): give the templates gallery its baseAppURL - #5838
Merged
Conversation
f915825 uses baseAppURL in handleSelectTemplate's template literal and dep array but never obtains it, so next build's type check fails and the web image does not build - on the release branch and every PR based on it. The repo's TS lint jobs do not run next build, which is why nothing caught it earlier. Same useURL() pattern as NewAgentButton and usePlaygroundNavigation.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Behind the baseAppURL type error hid a second image-build breaker from the same commit: TemplateDetail's markdown renderer imports x-markdown's Latex plugin, whose CJS build requires katex.min.css - Node evaluates the CSS as JS during prerender and dies on the leading '.'. ssr:false on the dynamic import (the settings page's established pattern) keeps the page client-only; it reads template_key from the client router anyway. Full local next build: all 44 pages generate.
Contributor
Railway Preview Environment
Updated at 2026-08-09T19:18:18.198Z |
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.
What
The web image does not build on
release/v0.112.0or on any PR based on it:handleSelectTemplateusesbaseAppURLin a template literal and in its dependency array, but the component never obtains it. Introduced by f915825 (template cards / gallery rail / template detail page), which is already merged into the release branch, so every open PR inherits the redbuild-image (agenta-web)check from the base.The fix
Two lines: import
useURLand readbaseAppURLfrom it, the same pattern the neighboringNewAgentButtonandusePlaygroundNavigationalready use.Why lint did not catch it
The TypeScript lint/format jobs pass; only
next build's type check (which runs inside the image build) compiles this path. Fulltscoverweb/ossafter the fix: zero errors.Urgency
Merging this unblocks the
build-image (agenta-web)check on all six open release PRs (#5832-#5837) at once.