Skip to content

FEAT: outcome breakdown visualization on the scenario run page - #2644

Open
WatchTree-19 wants to merge 1 commit into
microsoft:mainfrom
WatchTree-19:feat/gui-outcome-breakdown
Open

FEAT: outcome breakdown visualization on the scenario run page#2644
WatchTree-19 wants to merge 1 commit into
microsoft:mainfrom
WatchTree-19:feat/gui-outcome-breakdown

Conversation

@WatchTree-19

Copy link
Copy Markdown
Contributor

Description

Adds an accessible outcome-breakdown bar to the scenario run page, showing the distribution of attack outcomes (success, failure, undetermined, error) across a run's executions with per-outcome counts and percentages. The intent is that you can see at a glance how a run went, rather than reading the atomic-group table row by row. It sits between "Overall progress" and "Atomic attack groups", and it is computed from results the page already loads, so no backend change is required.

This addresses the "visualizing results from attacks in the GUI" area that Roman Lutz (@romanlutz) and I discussed alongside the scorer work in #2626 and #2628.

The change adds a pure utility, summarizeAttackOutcomes, which returns counts, total and percentages and is defensive about missing or unrecognised outcomes; a new OutcomeSummaryBar Fluent UI v9 component with co-located styles, fill colours aligned to OutcomeBadge semantics, and a role="img" element whose aria-label reads the full breakdown for screen readers; and the wiring into ScenarioRunPage.

Tests and Documentation

attackOutcomeSummary.test.ts covers counts, percentages, empty input and malformed-outcome handling. OutcomeSummaryBar.test.tsx covers segment rendering, the accessible summary label, legend counts and percentages, and the empty-state hint. The existing ScenarioRunPage.test.tsx heading assertion is updated for the new section. tsc --noEmit is clean, eslint --max-warnings 0 is clean, and jest passes across the util, component and run-page suites (28 tests). No JupyText changes, since this is frontend-only.

The change follows the frontend style guide: tokens-only styling in a co-located .styles.ts, inline style used only for the genuinely dynamic segment width, data-testid selectors, and accessible markup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant