feat(console-ai): split AI surfaces — agent-scoped /ai/:agent routing + launcher#1868
Merged
Conversation
…i side) Split the two assistants into their own pages instead of mixing them in one surface behind a hidden dropdown. - Route the active agent in the path (/ai/:agent[/:conversationId]) and derive it from the param against the live catalog — drops the fragile ?agent= query snapshot (StrictMode double-mount used to lose it). - New agentAliases module: friendly route names (build/ask) <-> built-in ids, robust across the Path A rename (metadata_assistant->build, data_chat->ask) and legacy ids. resolveDefaultAgentName is alias-aware. - Dropdown becomes a launcher that navigates between agent surfaces; always available when >1 agent, lists custom agents naturally. - Back-compat redirects: bare /ai -> default agent; legacy /ai/:conversationId -> /ai/:agent/:conversationId (resolved via the conversation's agentId); legacy built-in id -> friendly form. - Per-surface empty-state branding + alias-aware per-agent starters. - Conversations sidebar scoped to the active agent (lenient on null/active). - Home: Build with AI -> /ai/build, add Ask AI -> /ai/ask. - ConsoleLayout/FAB build-agent checks + labels made alias-aware. - i18n: ask/build labels, per-surface empty states, home.askAI (en/zh). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…witch Landing on /ai/:agent (or switching agents via the launcher) resumed a SCOPELESS / previous-agent conversation: - useChatConversation resolved once per USER, so a scope (agent) change kept the prior agent's conversation. Now keyed per (user, scope): an agent switch re-resolves under the new agent's cache; a same-scope re-render still short-circuits. Stale id is cleared before the async resolve so it can't be mirrored onto the new agent's URL. - The hook now exposes conversationScope (the scope the current id was resolved under); AiChatPage's URL-mirror only fires when it matches the active agent, blocking the switch-transition mirror race. - Gate userId on the resolved agent (AiChatPage + FAB) so the catalog-load window can't bind a scopeless conversation in the first place. Verified on the EE rig: /ai/ask and /ai/build resolve distinct convs, each surface resumes its own, and switching Ask→Build lands on the build conv. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
14 cases for agentAliases (agentRouteName / agentAliasGroup / resolveAgentParam / isBuildAgent / isAskAgent) and resolveDefaultAgentName, across legacy (data_chat/metadata_assistant) and renamed (ask/build) catalogs, plus custom-agent and non-agent (conversation-id) segments. 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
|
This was referenced Jun 22, 2026
Merged
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.
Why
The two built-in assistants were mixed in one full-page surface behind a hidden,
?agent=-gated dropdown. The product owner found the combined chat/build surface confusing (Claude Code separates "chat" vs "code"; Airtable Omni keeps them distinct). This splits them into their own pages and fixes the known StrictMode deep-link bug where?agent=metadata_assistantdidn't activate on the dev server.This is the objectui half of a Path A rename (
metadata_assistant→build,data_chat→ask). It is written to work before, during, and after the cross-repo rename via an alias layer, so it can land independently. Framework + cloud rename + theagent_iddata migration follow in separate PRs.What
/ai/:agentand/ai/:agent/:conversationId. The active agent is derived from the path param (resolved against the liveGET /ai/agentscatalog) — the?agent=query snapshot is gone (that's what StrictMode's double-mount + the/ai→/ai/:idrewrite used to drop).@object-ui/plugin-chatbot/agentAliases): friendly route names (build/ask) ↔ built-in ids, resolving to whichever the catalog actually serves.resolveDefaultAgentNameis now alias-aware. Custom*.agent.tsagents route by their own name, unchanged./ai/:agentinstead of toggling an in-surface mode; always available when >1 agent, lists custom agents naturally./ai→ default agent surface;/ai?agent=X→/ai/X; legacy built-in id (/ai/metadata_assistant) → friendly form (/ai/build); legacy bare/ai/:conversationId→/ai/:agent/:conversationId(resolved via the conversation'sagentId)./ai/:agent(or switching via the launcher) used to resume a scopeless / previous-agent conversation becauseuseChatConversationresolved once per user. Now keyed per(user, scope), gated on the agent being known, with the URL-mirror guarded against the switch-transition race./ai/build; added "Ask AI" →/ai/ask.ask/buildlabels, per-surface empty states,home.askAI.Verification (live, against the local EE rig on :3100 —
data_chat+metadata_assistant)/ai/buildopens Build directly, build starters, build→draft→Publishbugobject + Publish affordance/ai/askopens the data assistant + data starters/ai/<custom>generic routing/ai,/ai?agent=…,/ai/:conversationIdredirectAdded 14 unit tests for the alias resolver (legacy + renamed catalogs, custom-agent, non-agent segments). Note: component test files can't run via direct vitest locally (
@tailwindcss/postcssmissing from node_modules — reproduces onmaintoo); they run in CI.Follow-ups (Path A, separate PRs)
service-ai: renamedata_chat→ask(+ back-compat alias in the agent resolver //agents/:name/chat); exposeagentIdon the conversation list+detail API (this rig's build omits it, so sidebar scoping + legacy-id agent resolution currently degrade gracefully to the default).service-ai-studio: renamemetadata_assistant→build; update the Studio appdefaultAgent.ai_conversations.agent_id(+ai_messages) old→new.🤖 Generated with Claude Code