You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Scenario preset editor loses unsaved edits on navigation without a prompt #4279
The scenario preset editor silently discards unsaved edits when the user navigates away or refreshes. There is no route blocker and no beforeunload guard, unlike the sibling suite editor and the conversation and configuration editors, which all confirm before discarding.
Steps/Code to Reproduce
Open an existing preset for editing, for example /registry/scenario-presets/nightly_probe/edit.
Change the description, pick different techniques, or change dataset options.
Click any sidebar item, press browser Back, or refresh the tab.
# the guard pair exists in exactly three editors; the preset editor is not one of them# frontend/src/components/Configuration/Configuration.tsx useBlocker + useBeforeUnload# frontend/src/components/Chat/ConversationEditor.tsx useBlocker + useBeforeUnload# frontend/src/components/ScenarioSuites/ScenarioSuiteEditor.tsx useBlocker + useBeforeUnload# frontend/src/components/ScenarioPresets/ScenarioPresetEditor.tsx (none)
Expected Results
A discard confirmation dialog blocks in-app navigation while edits are pending, and the browser asks for confirmation before unloading, mirroring ScenarioSuiteEditor.
Actual Results
All edits are lost immediately with no prompt, including large ones (scenario selection, parameters, datasets, techniques, name, description).
Screenshots
Not applicable.
Versions
OS: macOS
Browser: any
Python version: 3.13
PyRIT version: main at 165bdbd
Activity