From c201bca321fe9ba1c6f3f856f1c64c843ee39749 Mon Sep 17 00:00:00 2001 From: Matt Toohey Date: Tue, 25 Aug 2026 11:28:42 +1000 Subject: [PATCH] fix(desktop): space add-agent teams section Signed-off-by: Matt Toohey --- .../channels/ui/AddChannelBotDialog.tsx | 2 +- .../welcome-agent-modal-screenshots.spec.ts | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/desktop/src/features/channels/ui/AddChannelBotDialog.tsx b/desktop/src/features/channels/ui/AddChannelBotDialog.tsx index fb27c659d5..3c3226f2bf 100644 --- a/desktop/src/features/channels/ui/AddChannelBotDialog.tsx +++ b/desktop/src/features/channels/ui/AddChannelBotDialog.tsx @@ -231,7 +231,7 @@ export function AddChannelBotDialog({ footerClassName="justify-end gap-2" footerTestId="add-channel-bot-dialog-footer" headerTestId="add-channel-bot-dialog-header" - scrollAreaClassName="space-y-5" + contentClassName="space-y-5" scrollAreaTestId="add-channel-bot-dialog-scroll-area" title="Add agents" > diff --git a/desktop/tests/e2e/welcome-agent-modal-screenshots.spec.ts b/desktop/tests/e2e/welcome-agent-modal-screenshots.spec.ts index 0115b608bf..a93467a318 100644 --- a/desktop/tests/e2e/welcome-agent-modal-screenshots.spec.ts +++ b/desktop/tests/e2e/welcome-agent-modal-screenshots.spec.ts @@ -257,6 +257,36 @@ test.describe("welcome and channel agent entry points", () => { await dialog.screenshot({ path: `${SHOTS}/03-agents-available.png` }); }); + test("teams are visually separated from the agent controls", async ({ + page, + }) => { + await page.setViewportSize({ width: 1212, height: 512 }); + await installMockBridge(page, { + personas: [scoutPersona, editorPersona], + teams: [ + { + id: "research-team", + name: "Research team", + personaIds: [scoutPersona.id, editorPersona.id], + }, + ], + }); + const dialog = await openAgentPicker(page); + const createAgent = dialog.getByTestId("add-channel-create-agent"); + const teamsHeading = dialog.getByText("Teams", { exact: true }); + + const createAgentBox = await createAgent.boundingBox(); + const teamsHeadingBox = await teamsHeading.boundingBox(); + expect(createAgentBox).not.toBeNull(); + expect(teamsHeadingBox).not.toBeNull(); + expect( + (teamsHeadingBox?.y ?? 0) - + ((createAgentBox?.y ?? 0) + (createAgentBox?.height ?? 0)), + ).toBeGreaterThanOrEqual(20); + + await dialog.screenshot({ path: `${SHOTS}/04-teams-spacing.png` }); + }); + test("all personal agents are already in the channel", async ({ page }) => { await installMockBridge(page, { activePersonaIds: ["builtin:fizz"],