Skip to content

fix(frontend): give the templates gallery its baseAppURL - #5838

Merged
mmabrouk merged 2 commits into
release/v0.112.0from
fix/templates-gallery-baseappurl
Aug 9, 2026
Merged

fix(frontend): give the templates gallery its baseAppURL#5838
mmabrouk merged 2 commits into
release/v0.112.0from
fix/templates-gallery-baseappurl

Conversation

@mmabrouk

@mmabrouk mmabrouk commented Aug 9, 2026

Copy link
Copy Markdown
Member

What

The web image does not build on release/v0.112.0 or on any PR based on it:

./src/components/pages/agent-home/components/TemplatesGallery/index.tsx:85:33
Type error: Cannot find name 'baseAppURL'.

handleSelectTemplate uses baseAppURL in 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 red build-image (agenta-web) check from the base.

The fix

Two lines: import useURL and read baseAppURL from it, the same pattern the neighboring NewAgentButton and usePlaygroundNavigation already 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. Full tsc over web/oss after the fix: zero errors.

Urgency

Merging this unblocks the build-image (agenta-web) check on all six open release PRs (#5832-#5837) at once.

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.
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Aug 9, 2026
@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview Aug 9, 2026 7:06pm

Request Review

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.
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Status Destroyed (PR closed)

Updated at 2026-08-09T19:18:18.198Z

@mmabrouk
mmabrouk merged commit 1188fb8 into release/v0.112.0 Aug 9, 2026
55 of 59 checks passed
@mmabrouk mmabrouk added the lgtm This PR has been approved by a maintainer label Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug report Something isn't working frontend lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant