feat(FN-3726): highlight fast mode bolt icon in task detail

- Add TaskDetailModal CSS rules to visually emphasize the fast mode bolt icon
- Cover fast mode icon highlighting in TaskDetailModal rendering tests
- Preserve existing modal rendering behavior while adding the new fast mode visual cue

Fusion-Task-Id: FN-3726
This commit is contained in:
Fusion
2026-05-08 00:03:42 -07:00
committed by gsxdsm
parent 83be5775cd
commit 3d40df22e4
2 changed files with 21 additions and 0 deletions

View File

@@ -219,6 +219,14 @@
color: var(--color-warning);
}
.detail-execution-mode-toggle--fast svg {
color: var(--color-warning);
background: color-mix(in srgb, var(--color-warning) 20%, transparent);
border-radius: var(--radius-pill);
padding: var(--space-xs);
box-shadow: var(--glow-warning);
}
.detail-execution-mode-toggle--saving {
opacity: 0.75;
}

View File

@@ -324,6 +324,7 @@ describe("TaskDetailModal", () => {
const toggle = screen.getByRole("button", { name: "Execution mode: standard" });
expect(toggle).toHaveAttribute("aria-pressed", "false");
expect(toggle).toHaveTextContent("Standard");
expect(toggle).not.toHaveClass("detail-execution-mode-toggle--fast");
});
it("renders fast mode as a pressed toggle", () => {
@@ -342,9 +343,21 @@ describe("TaskDetailModal", () => {
const toggle = screen.getByRole("button", { name: "Execution mode: fast" });
expect(toggle).toHaveAttribute("aria-pressed", "true");
expect(toggle).toHaveTextContent("Fast");
expect(toggle).toHaveClass("detail-execution-mode-toggle--fast");
});
});
it("defines fast execution mode svg highlight styles with warning tokens", () => {
const css = readDashboardStylesSource();
expectBaseRule(css, ".detail-execution-mode-toggle--fast svg", "color: var(--color-warning);");
expectBaseRule(
css,
".detail-execution-mode-toggle--fast svg",
"background: color-mix(in srgb, var(--color-warning) 20%, transparent);",
);
});
it("appends daemon token query to attachment href/src URLs for direct browser loads", () => {
localStorage.setItem("fn.authToken", "daemon-token");