Skip to content

Configuration silently discards unsaved changes during navigation #2594

Description

@romanlutz

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

  1. Open Configuration > PyRIT Configuration.
  2. Edit the YAML without saving it.
  3. Navigate to Scanner, then return to Configuration.
  4. Observe that the editor has reverted to the saved file without confirmation.
  5. Open Environment & Secrets and edit an environment source without saving it.
  6. Switch to Initializers, then return to Environment & Secrets.
  7. 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.

Activity

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions