Uh oh!
There was an error while loading. Please reload this page.
fix(console-ai): graceful handling when the build agent isn't deployed (routing + home CTA) - #1873
Merged
Merged
Conversation
On a backend without a given built-in agent (e.g. app-showcase, which has no cloud AI Studio plugin, so no build agent), navigating to /ai/build bounced to the junk URL /ai/ask/build — it treated 'build' as a legacy conversation id and tried to load a chat called 'build'. Fix: distinguish a KNOWN agent that's merely unavailable in this catalog from a real conversation id. A known built-in name (build / ask / metadata_assistant / data_chat) that the catalog doesn't serve now falls back cleanly to the default agent surface (/ai/ask); only a truly unknown segment is treated as a conversation id. - New isBuiltinAgentName() in the alias module (+3 unit tests, 17 total). - AiChatPage: unavailableKnownAgent guard excludes such segments from the legacy-conversation-id path and the canonicalization effect redirects them to the default surface. Verified live: app-showcase (no build agent) /ai/build & /ai/metadata_assistant → /ai/ask cleanly; custom /ai/showcase_assistant routes to its own surface; regression-checked on a backend WITH the build agent → /ai/build still resolves. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
The build/authoring agent ships in the cloud AI Studio plugin and is absent on open-source deployments (e.g. app-showcase). Showing 'Build with AI' there was misleading — it silently fell back to Ask. Now the home CTAs reflect the live agent catalog: - 'Build with AI' renders only when a build agent is actually deployed. - 'Ask AI' shows whenever AI is on (becomes the primary CTA when build is unavailable). - Admin empty-state drops the 'AI generates your app' pitch when build is unavailable, pointing to the Administration menu instead. - No AI CTA renders when AI is off / before the catalog loads (no flash). Catalog is fetched once via useHomeAiAvailability (useAgents). Verified live: build-enabled backend shows both CTAs; app-showcase (no build agent) shows only Ask. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
xuyushun441-sys
commented
Jun 22, 2026
ContributorAuthor
Extended this PR to also gate the home "Build with AI" CTA on build-agent availability (open-source/app-showcase has no build agent). Verified live: build-enabled backend shows Build+Ask; app-showcase shows only Ask. /ai/build also falls back cleanly to /ai/ask there. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
Community edition can be in any of three states; the home CTAs now track the live catalog per agent rather than 'any agent present': - build agent deployed → 'Build with AI' - data/ask agent deployed (isAskAgent) → 'Ask AI' - neither (AI off, or only custom agents) → no AI CTA (custom agents stay reachable via the assistant launcher / FAB) Admin empty-state copy is now three-way too: build pitch / data-explore / plain 'set up from Administration' when AI is off. Verified live: :3100 (data_chat+metadata_assistant) → Build+Ask; app-showcase :3001 (ask only) → Ask only; unreachable/empty catalog → no buttons. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Uh oh!
There was an error while loading. Please reload this page.
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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 freeto 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.
Symptom
On a backend without a given built-in agent, opening
/ai/buildbounced to the junk URL/ai/ask/buildand there was no way to select build mode. Reproduced onexamples/app-showcase(catalog:ask+showcase_assistantonly — it doesn't load the cloud AI Studio plugin, so the build agent isn't registered).Cause
The router treated any unresolved first segment as a legacy conversation id. So
/ai/build(whenbuild/metadata_assistantisn't in the catalog) was read as "open a conversation calledbuild" → redirect to the default agent surface carrying that segment →/ai/ask/build.Fix
Distinguish "a known agent that's merely not deployed here" from "a real conversation id":
isBuiltinAgentName()— true forbuild/metadata_assistant/ask/data_chatregardless of the live catalog.AiChatPage: a known built-in name that the catalog doesn't serve (unavailableKnownAgent) is excluded from the legacy-conversation-id path and the canonicalization effect redirects it cleanly to the default surface (/ai/ask). Only a truly unknown segment is still treated as a conversation id.Verified live
/ai/build&/ai/metadata_assistant→/ai/ask/…(clean, no/buildjunk); launcher correctly lists onlyAsk+ the customDelivery Assistant./ai/showcase_assistant→ its own surface (generic routing)./ai/build→/ai/build/…still resolves — the fix only changes the unavailable case.isBuiltinAgentName).Note on availability
The build agent is a cloud / EE feature (ships in
@objectstack/service-ai-studio). On open-source deployments like app-showcase it's intentionally absent, so this PR makes the absence degrade gracefully rather than enabling build there. To actually use build mode, the backend must load the AI Studio plugin.Follow-up to objectui#1868.
🤖 Generated with Claude Code