From b21ea31ffce411a1c8c60d3c96dd82ce54fc24ff Mon Sep 17 00:00:00 2001 From: MaheshtheDev <38828053+MaheshtheDev@users.noreply.github.com> Date: Fri, 31 Jul 2026 04:52:36 +0000 Subject: [PATCH] fix(web): rework agents discover panel in Select Space modal (#1379) Agent switcher snapped back to the just-connected plugin while the API-key banner was open; fixed the effect so manual tab clicks stick. Replaced the double header + blurred install-steps overlay with named chip tabs (matching existing chip style), inline Connect + Docs, and a plain step-title preview. Fixes ENG-1141 --- apps/web/components/select-spaces-modal.tsx | 138 +++++++++++--------- 1 file changed, 77 insertions(+), 61 deletions(-) diff --git a/apps/web/components/select-spaces-modal.tsx b/apps/web/components/select-spaces-modal.tsx index fa283b3b..c9a06dd0 100644 --- a/apps/web/components/select-spaces-modal.tsx +++ b/apps/web/components/select-spaces-modal.tsx @@ -47,7 +47,7 @@ import { spacePluginIdToCatalogId, type PluginInfo, } from "@/lib/plugin-catalog" -import { InstallSteps, PillButton } from "./integrations/install-steps" +import { INSET, InstallSteps, PillButton } from "./integrations/install-steps" import { useProjectMutations } from "@/hooks/use-project-mutations" import { AUTO_CHAT_SPACE_ID } from "@/lib/chat-auto-space" import NovaOrb from "@/components/nova/nova-orb" @@ -1660,15 +1660,16 @@ function AgentsDiscoverPanel({ newKey?.pluginId ?? catalogIds[0] ?? "codex", ) + // snap to the just-connected plugin only when the key changes, so manual tab clicks aren't overridden + useEffect(() => { + if (newKey?.pluginId) setActiveCatalogId(newKey.pluginId) + }, [newKey?.pluginId]) + useEffect(() => { - if (newKey?.pluginId && catalogIds.includes(newKey.pluginId)) { - setActiveCatalogId(newKey.pluginId) - return - } if (!catalogIds.includes(activeCatalogId)) { setActiveCatalogId(catalogIds[0] ?? "codex") } - }, [activeCatalogId, catalogIds, newKey?.pluginId]) + }, [activeCatalogId, catalogIds]) if (catalogIds.length === 0) { return ( @@ -1680,39 +1681,32 @@ function AgentsDiscoverPanel({ return (
Agents
-- Claude Code, Codex, and OpenCode share project memory -
-+ {info.tagline} +
+ ) : ( ++ {info.name} +
++ {info.tagline} +
+- {info.name} -
-- {info.tagline} -
-+ What you'll do next +
+