fix(desktop): space add-agent teams section

Signed-off-by: Matt Toohey <contact@matttoohey.com>
This commit is contained in:
Matt Toohey
2026-08-25 11:28:42 +10:00
parent 8d2d0ff5ad
commit c201bca321
2 changed files with 31 additions and 1 deletions

View File

@@ -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"
>

View File

@@ -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"],