Skip to content

FEAT: Browse Scenario result parents and children in the GUI (#3602) - #3611

Open
Fazeel Usmani (FazeelUsmani) wants to merge 1 commit into
microsoft:mainfrom
FazeelUsmani:gui-scenario-result-hierarchy
Open

Fazeel Usmani (FazeelUsmani) wants to merge 1 commit into
microsoft:mainfrom
FazeelUsmani:gui-scenario-result-hierarchy

Conversation

@FazeelUsmani

Copy link
Copy Markdown

Description

Fixes #3602 (scope 10A). Adds a read-only "Result hierarchy" section to the Scenario run page, using the endpoints from #3167. No backend changes.

  • Roots page with the root cursor; expanding a result pages its children with that node's own children_cursor.
  • Children show at their absolute position under the parent. Missing, duplicate or cyclic references stay in place as unresolved.
  • Run and group totals come straight from the backend and are never counted from loaded rows. Rootless results are noted, not turned into roots.
  • A stale cursor (400) offers a reload; other errors offer a retry. In-progress runs show a snapshot note with a reload.
  • Details reuse the existing attempt dialog, falling back to the clicked node if the progress feed hasn't delivered it yet.

Transcript/conversation evidence (scope 10B) is out of scope.

Side note, not changed here: run-level retries counts each child of a compound attack as a re-attempt of the parent's unit (retry_pressure in pyrit/analytics/scenario_statistics.py), so a 520-step Sequential run shows "Retries: 520". Happy to open an issue if that isn't intended.

Tests and Documentation

  • Unit and component tests for child positions, paging, stale cursors, reloads, totals, and empty/truncated/rootless states. A run-page test covers the Details fallback.
  • Playwright suite against a seeded backend (playwright.scenario-hierarchy.config.ts), added to the CI matrix. It pages a 520-child Sequential parent, checks unresolved positions, stable totals, keyboard use, and a 390px layout.
  • Updated pyrit/backend/README.md, which said the GUI still shows flat executions.

Locally: tsc, eslint, Jest and the new Playwright suite pass (two ScenarioDetail tests fail the same way on main).

Screenshots below.
scenario-hierarchy-desktop
scenario-hierarchy-mobile

…ft#3602)

Add a read-only "Result hierarchy" section to the Scenario run page,
built on the hierarchy endpoints from microsoft#3167.

Roots load in pages with the root cursor. Expanding a result loads its
saved children in pages with that node's own children cursor, so the
two never mix. Children are shown at their absolute position under the
parent, and missing, duplicate or cyclic references stay visible in
place as unresolved. Run and group totals are shown exactly as the
backend reports them and are never counted from loaded rows. Rootless
results are reported, not turned into roots.

A stale cursor (HTTP 400) shows a reload action instead of a generic
error. Details reuse the existing attempt dialog, and fall back to the
clicked node when the progress feed has not delivered that result yet.

Tests: unit tests for child positions and root merging, component tests
for paging, stale cursors, reloads, totals and empty/truncated/rootless
states, and a Playwright suite against a seeded backend
(playwright.scenario-hierarchy.config.ts), added to the CI matrix.
@FazeelUsmani

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

This branch has not been deployed

No deployments
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.

FEAT GUI: Browse Scenario result parents and children

2 participants