Skip to content

feat: Add undo delay on destructive actions (cancel stream) #154

Description

@Austinaminu2

Description

Cancelling a stream is irreversible — the sender gets unstreamed tokens back and the stream is permanently ended. Currently, the app shows a confirmation dialog, but once confirmed, the transaction is submitted immediately.

Adding an undo delay (similar to Gmail's "Undo Send") would give users a safety net against accidental cancellations.

Proposed Solution

After the user confirms cancellation:

  1. Show a 10-second countdown toast: "Stream will be cancelled in 10s — [Undo]"
  2. If the user clicks "Undo", the cancellation is aborted
  3. If the countdown expires, submit the cancel transaction
  4. During the countdown, the stream card shows a "Cancelling..." state

This pattern should also apply to other destructive actions if added in the future.

Acceptance Criteria

  • Countdown toast appears after confirming stream cancellation
  • "Undo" button in the toast aborts the cancellation
  • Countdown duration is configurable (default 10 seconds)
  • Stream card shows a "Cancelling..." visual state during countdown
  • If user navigates away during countdown, cancellation is aborted (safe default)
  • Successful cancellation shows the normal success toast after countdown

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature requestfrontendNext.js frontenduxUser experience improvement

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions