Skip to content

[GUI] Show initializer create errors inside the open dialog #2346

Description

@romanlutz

Important

Maintainer-owned: This issue is intentionally labeled not ready yet. Please leave implementation to a PyRIT maintainer unless a maintainer explicitly assigns or approves the work.

Describe the bug

When POST /api/initializers/settings rejects a create request, the Add initializer dialog stays open and preserves the entered values, but it does not display the error. The only alert is rendered on the page behind the modal, inside an aria-hidden ancestor and underneath the modal overlay.

This makes Add appear unresponsive: sighted users cannot see the failure, assistive technology cannot reach the hidden page alert, and the user does not know whether to correct the form or retry. Severity: moderate, because creation is blocked and the failure is not actionable from the active UI.

Steps/Code to Reproduce

  1. Open the Initializers page in the local frontend.
  2. Select refresh_datasets, then choose Add initializer.
  3. Enter 12 for days.
  4. Make the next POST /api/initializers/settings request return HTTP 400 with a synthetic error message.
  5. Choose Add in the dialog.
  6. Observe that the dialog remains open with 12 preserved, but no error appears in the dialog.
  7. Choose Cancel and observe that the page-level error becomes visible only after the modal closes.
# N/A - GUI-only reproduction; no Python code is required.

Expected Results

The active dialog should show and announce the create failure near the form, keep the entered values, and make the next recovery action clear. The user should not need to close the dialog to discover why creation failed.

Actual Results

The dialog stays open and preserves the value, but contains no error text. The generated page-level alert is behind the modal, belongs to an aria-hidden ancestor while the dialog is open, and becomes visible only after canceling the dialog. No sensitive traceback or provider data was involved; the reproduction used a synthetic local HTTP 400 response.

Screenshots

Sanitized screenshot and WebM evidence, showing only the application viewport and synthetic values/errors, is attached in the evidence comment below.

Versions

  • PyRIT commit: 3dd9946ee4ef08a2048c64ff4b29d3a856a8068e
  • OS: Windows_NT
  • Browser automation: Playwright Chromium (@playwright/test 1.62.0)
  • pyrit.show_versions(): N/A for this frontend-only reproduction

Metadata

Metadata

Assignees

No one assigned

    Labels

    GUIUmbrella label for all feedback submitted via the Co-PyRIT GUIbugSomething isn't workingnot ready yetThis issue needs more definition or is blocked by a pending change.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions