feat(FN-3923): restore details affordance in AgentsView for compact mobile

Restores visible details affordance in AgentsView with test coverage for compact mobile viewports. The change touches the AgentsView component and its test file, ensuring the affordance displays correctly across different screen sizes.

Fusion-Task-Id: FN-3923
This commit is contained in:
Fusion
2026-05-10 09:47:13 -07:00
committed by gsxdsm
parent d5f12a5c95
commit 39a9d23cd0
2 changed files with 10 additions and 2 deletions

View File

@@ -1445,7 +1445,7 @@ export function AgentsView({ addToast, projectId, onOpenTaskLogs, agentOnboardin
title={`View details for ${agent.name}`}
aria-label={`View details for ${agent.name}`}
>
<span className="agent-card-action-label">Details</span>
<ChevronRight size={14} /> <span className="agent-card-action-label">Details</span>
</button>
{(agent.state === "idle" || agent.state === "paused") && (
<button

View File

@@ -651,6 +651,13 @@ describe("AgentsView", () => {
expect(screen.getAllByText("Details").length).toBeGreaterThanOrEqual(4);
});
it("keeps a visible icon affordance on View Details buttons when labels are compacted", async () => {
render(<AgentsView addToast={mockAddToast} />);
const detailsButton = await screen.findByRole("button", { name: "View details for Test Agent 1" });
expect(detailsButton.querySelector("svg")).toBeTruthy();
});
it("opens matching detail view when clicking View Details button", async () => {
render(<AgentsView addToast={mockAddToast} />);
@@ -1976,7 +1983,7 @@ describe("AgentsView", () => {
});
describe("Run Now button", () => {
it("renders sidebar action labels with wrapper spans for icon-only compaction (FN-3902)", async () => {
it("renders compact sidebar action controls with visible icon affordances (FN-3902/FN-3923)", async () => {
const activeWithoutTaskId = { ...mockAgents[1] };
delete activeWithoutTaskId.taskId;
mockFetchAgents.mockResolvedValue([
@@ -1997,6 +2004,7 @@ describe("AgentsView", () => {
expect(runNowButton.querySelector(".agent-card-action-label")).toBeTruthy();
expect(pauseButton.querySelector(".agent-card-action-label")).toBeTruthy();
expect(detailsButton?.querySelector(".agent-card-action-label")).toBeTruthy();
expect(detailsButton?.querySelector("svg")).toBeTruthy();
});
it("shows Run Now button for active agent without taskId", async () => {