fix(desktop): clarify add agents channel action (#6374)

"Create agent" button takes you to a UI to **invite** your existing
agents to a channel. Rewording the button to make this clear.

Before
<img width="481" height="251" alt="Screenshot 2026-08-21 at 1 58 40 pm"
src="https://github.com/user-attachments/assets/1b64f722-62b8-46fa-a6c4-dafcf2bdfaa7"
/>


After
(Sorry about different elements being in hover state in the screenshots)
<img width="481" height="313" alt="Screenshot 2026-08-21 at 1 58 16 pm"
src="https://github.com/user-attachments/assets/f68a9c9b-2276-4ef5-ace8-c4017977b1e8"
/>
## Summary

- Clarify that the empty-channel intro action adds existing agents to
the channel.
- Assert the exact action title and description in the existing E2E
coverage while preserving the separate Welcome create-agent flow.

### Related issue

None found.

### Testing

- `../node_modules/.bin/biome check
src/features/channels/ui/useChannelIntro.tsx tests/e2e/channels.spec.ts`
passed.
- `./node_modules/.bin/tsc && ./node_modules/.bin/vite build --mode e2e`
passed.
- The isolated Playwright smoke case `empty channel shows intro actions`
passed (1/1) after installing the repo-pinned Chromium.
- `env -u BUZZ_AGENT_PROVIDER just ci` passed.
- Screenshots not captured; this is a copy-only UI change.

---------

Signed-off-by: Matt Toohey <contact@matttoohey.com>
This commit is contained in:
Matt Toohey
2026-08-21 21:07:36 +10:00
committed by GitHub
parent 24ec6a468e
commit 9891e64f6b
3 changed files with 12 additions and 5 deletions

View File

@@ -91,9 +91,9 @@ export function useChannelIntro({
if (!activeChannel.archivedAt && activeChannel.isMember) {
if (onAddAgent) {
actions.push({
description: "Add an agent here.",
description: "Bring them in.",
icon: <Bot aria-hidden className="h-6 w-6" />,
label: "Create agent",
label: "Add agents",
onClick: onAddAgent,
testId: "channel-intro-action-create-agent",
});

View File

@@ -1746,8 +1746,15 @@ test("empty channel shows intro actions", async ({ page }) => {
await expect(
page.getByTestId("channel-intro-action-create-channel"),
).toHaveCount(0);
const addAgentsAction = page.getByTestId("channel-intro-action-create-agent");
await expect(addAgentsAction).toBeVisible();
await expect(
page.getByTestId("channel-intro-action-create-agent"),
addAgentsAction.getByText("Add agents", { exact: true }),
).toBeVisible();
await expect(
addAgentsAction.getByText("Bring them in.", {
exact: true,
}),
).toBeVisible();
await expect(
page.getByTestId("channel-intro-action-add-people"),
@@ -1767,7 +1774,7 @@ test("empty channel shows intro actions", async ({ page }) => {
await page.keyboard.press("Escape");
await expect(page.getByTestId("members-sidebar")).not.toBeVisible();
await page.getByTestId("channel-intro-action-create-agent").click();
await addAgentsAction.click();
await expect(page.getByRole("heading", { name: "Add agents" })).toBeVisible();
await page.keyboard.press("Escape");

View File

@@ -142,7 +142,7 @@ for (const theme of THEMES) {
await expect(row).toBeVisible();
await expectMutedSupportingText(
row.getByRole("button", { name: "Open channel general" }),
/Public channel · Active \d+[mhdw] ago/,
/Public channel · Active (just now|\d+[mhdw] ago)/,
);
await page.mouse.move(0, 0);
await expectMutedSupportingText(