feat(FN-3811): add room mention popup to dashboard architecture docs and te

Added documentation for the room mention feature in the architecture docs and a changeset, alongside hardened tests for the `AgentMentionPopup` room variant.

Fusion-Task-Id: FN-3811
This commit is contained in:
Fusion
2026-05-10 10:54:46 -07:00
committed by gsxdsm
parent ff4e7cad78
commit 6b55b26195
3 changed files with 21 additions and 0 deletions

View File

@@ -3,6 +3,16 @@ import { describe, expect, it, vi } from "vitest";
import type { Agent } from "@fusion/core";
import { AgentMentionPopup } from "../AgentMentionPopup";
vi.mock("lucide-react", async (importOriginal) => {
const actual = await importOriginal<typeof import("lucide-react")>();
return {
...actual,
Bot: ({ "data-testid": testId, ...props }: any) => (
<svg data-testid={testId || "icon-bot"} {...props} />
),
};
});
const agents: Agent[] = [
{ id: "agent-001", name: "Alpha", role: "executor", state: "idle", createdAt: "2026-04-01T00:00:00.000Z", updatedAt: "2026-04-01T00:00:00.000Z", metadata: {} },
{ id: "agent-002", name: "Alfred", role: "reviewer", state: "idle", createdAt: "2026-04-01T00:00:00.000Z", updatedAt: "2026-04-01T00:00:00.000Z", metadata: {} },
@@ -59,6 +69,7 @@ describe("AgentMentionPopup room behavior", () => {
);
expect(screen.getByTestId("agent-mention-item-agent-003")).toHaveClass("agent-mention-item--highlighted");
expect(screen.getByTestId("agent-mention-item-agent-003")).toHaveAttribute("aria-selected", "true");
rerender(
<AgentMentionPopup
@@ -72,6 +83,7 @@ describe("AgentMentionPopup room behavior", () => {
);
expect(screen.getByTestId("agent-mention-item-agent-001")).toHaveClass("agent-mention-item--highlighted");
expect(screen.getByTestId("agent-mention-item-agent-001")).toHaveAttribute("aria-selected", "true");
});
it("selects non-members and includes accessible member dot labels", () => {