Describe the bug
The frontend silently discards unsaved edits in both PyRIT Configuration and Environment & Secrets when the user navigates away or changes Configuration tabs. The UI identifies the editor state as "Unsaved changes," but it does not warn, block navigation, or preserve the draft.
This can cause users to lose substantial configuration work through ordinary navigation.
Steps/Code to Reproduce
- Open Configuration > PyRIT Configuration.
- Edit the YAML without saving it.
- Navigate to Scanner, then return to Configuration.
- Observe that the editor has reverted to the saved file without confirmation.
- Open Environment & Secrets and edit an environment source without saving it.
- Switch to Initializers, then return to Environment & Secrets.
- Observe that this draft has also been discarded without confirmation.
The Environment & Secrets draft remains present while switching between environment files inside the mounted tab. It is lost specifically when changing Configuration tabs because the component is unmounted.
Expected Results
Before leaving an editor with unsaved changes, the frontend should either preserve the draft or ask the user to confirm that it should be discarded. This should cover Configuration tab changes, application navigation, reload, and browser close/back behavior as appropriate.
Actual Results
The navigation succeeds immediately, no confirmation appears, and returning to the editor restores only the saved source.
Relevant implementation:
Screenshots
Captured during the September 7 frontend audit using synthetic, non-secret content:
daily-2026-09-07/manual/configuration-unsaved-before-navigation.png
daily-2026-09-07/manual/configuration-unsaved-lost-after-navigation.png
daily-2026-09-07/manual/environment-unsaved-ux.json
Versions
- OS: Windows
- Browser: Chromium through Playwright 1.62.1
- Python: 3.14.4
- Frontend: 1.2.0-dev.0
- PyRIT:
main at 623d57a3b26e214f53e671c593953b21da6d8b77
- Python package listing: N/A; this is a frontend state-management defect.
Describe the bug
The frontend silently discards unsaved edits in both PyRIT Configuration and Environment & Secrets when the user navigates away or changes Configuration tabs. The UI identifies the editor state as "Unsaved changes," but it does not warn, block navigation, or preserve the draft.
This can cause users to lose substantial configuration work through ordinary navigation.
Steps/Code to Reproduce
The Environment & Secrets draft remains present while switching between environment files inside the mounted tab. It is lost specifically when changing Configuration tabs because the component is unmounted.
Expected Results
Before leaving an editor with unsaved changes, the frontend should either preserve the draft or ask the user to confirm that it should be discarded. This should cover Configuration tab changes, application navigation, reload, and browser close/back behavior as appropriate.
Actual Results
The navigation succeeds immediately, no confirmation appears, and returning to the editor restores only the saved source.
Relevant implementation:
Configuration.tsxcomputeshasUnsavedChanges, but tab selection immediately unmounts the active editor.EnvironmentFiles.tsxkeeps unsaved content only in component state.Screenshots
Captured during the September 7 frontend audit using synthetic, non-secret content:
daily-2026-09-07/manual/configuration-unsaved-before-navigation.pngdaily-2026-09-07/manual/configuration-unsaved-lost-after-navigation.pngdaily-2026-09-07/manual/environment-unsaved-ux.jsonVersions
mainat623d57a3b26e214f53e671c593953b21da6d8b77