Skip to content

bug: IonToast dismiss incorrectly reopens Save As dialog #86

Description

@nehayadav827

Description

The IonToast in Menu.tsx is currently shared between two different flows:

  1. Validation errors during Save As
  2. Save failures caused by missing file data

However, the onDidDismiss handler always triggers setShowAlert3(true), which reopens the Save As dialog even when the toast originated from a save failure.

This creates incorrect UX behavior and unintentionally reopens the Save As modal in unrelated flows.

Steps to Reproduce

  1. Open a saved file (non-default)
  2. Trigger a save failure (e.g. remove file data from storage)
  3. Press Save
  4. Dismiss the error toast

Expected Behavior

The toast should dismiss cleanly.
The Save As dialog should only reopen when the toast originated from the Save As validation flow.

Actual Behavior

Dismissing the toast always reopens the Save As dialog regardless of the originating flow.

Possible Fix

Track which flow triggered the toast and conditionally reopen Save As only when appropriate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions