Repository navigation
FEAT Add expandable paired outcome transition details - #3391
Roman Lutz (romanlutz) merged 8 commits into
Conversation
|
Completed #3389 with expandable pair details, conversation links, pagination, and mobile layout fixes. Desktop/mobile checks and regression tests pass. Ready for review. |
Keep the simplified GUI guide from main and describe paired outcome transition details under Scanner.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the paired-outcome detail expansion.
No open issues 🎉
What changed in this PR
Extends the Scenario run’s existing Paired outcomes panel with expandable details, addressing #3389 and building on #3337. Users can inspect matched objectives and conversations without changing the aggregate pairing rules.
Changes:
- Adds a paginated detail API that reuses pairing validation and supports labelled compound-child conversation links.
- Adds on-demand expansion, retry and cancellation handling, keyboard focus restoration, and responsive layouts.
- Extends unit and browser coverage and documents the drill-down workflow.
| File | Description |
|---|---|
tests/unit/backend/test_paired_outcome_routes.py |
Tests detail responses and request validation. |
tests/unit/analytics/test_paired_outcome_statistics.py |
Tests pairing consistency, cursors, pagination, and compound links. |
pyrit/backend/routes/scenarios.py |
Adds the paginated paired-outcome detail endpoint. |
pyrit/analytics/paired_outcome_statistics.py |
Adds detail models and pagination using shared pairing logic. |
pyrit/analytics/__init__.py |
Exposes the new analytics API through lazy exports. |
frontend/src/types/index.ts |
Defines transition and detail response types. |
frontend/src/services/api.ts |
Adds cancellable detail requests. |
frontend/src/components/Scenarios/PairedOutcomes.tsx |
Adds expandable pair details and conversation navigation. |
frontend/src/components/Scenarios/PairedOutcomes.test.tsx |
Covers loading, retries, cancellation, pagination, and links. |
frontend/src/components/Scenarios/PairedOutcomes.styles.ts |
Styles detail cards, mobile layouts, and accessible controls. |
frontend/e2e/paired-outcomes.spec.ts |
Exercises real-API navigation, pagination, keyboard use, and recovery. |
frontend/e2e/fixtures/paired_outcomes_backend.py |
Seeds saved conversations and pagination edge cases. |
doc/gui/0_gui.md |
Documents paired-outcome inspection with desktop and mobile screenshots. |
Review effort: Balanced
|
Roman Lutz (@romanlutz) merged main and fixed the doc conflict (main dropped the paired outcomes section, so I added a short one under Scanner). Tests, ty and frontend checks pass locally. PTAL when u get a chance, thanks |
Keep comparison optional behind a completed-scan disclosure, use saved plans only, and preserve canonical conversation links. Restore dedicated browser coverage in CI. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Description
Closes #3389, following merged #3337. Scenario run results show paired outcome counts, but users need to inspect the objectives and conversations behind each transition. Each transition can now be expanded and collapsed to load its matching pairs on demand.
No new dependencies or schema migrations.
Tests and Documentation
make unit-test).The existing two ScenarioDetail dataset-replacement tests queried the page before Fluent UI restored accessibility after cancelling Run preview. Their reopen action now waits for the accessible Launch scan button; modal production behavior is unchanged.
Updated
doc/gui/0_gui.mdwith usage guidance and actual desktop/mobile screenshots. No notebooks or executable documentation examples changed; JupyText execution was not run. Existing build/dependency warnings remain (Vite chunk size/config compatibility and Pydantic field-name warnings).Desktop
Mobile
Focused capture of one expanded transition (272 × 452), without app-chrome overlap or blank space. Mobile metrics use two columns, transition labels retain room beside right-aligned counts, and detail padding adapts to narrow screens.