Skip to content

Implement optimistic UI updates so stream list reflects changes before confirmation #231

Description

@Chuks-coderr

Overview

Currently, UI state only updates after a transaction is confirmed on-chain, which takes several seconds. Optimistic updates show the expected post-confirmation state immediately, making the UI feel fast and responsive.

Problem

After submitting a withdrawal, the UI shows a loading spinner for 5-10 seconds until confirmation. Users cannot see any feedback that their action was recorded, leading to double-submissions.

Proposed Solution

  • Implement optimistic updates for: withdraw (immediately decrement claimable balance), cancel (immediately remove stream from list), top-up (immediately update stream end date)
  • Roll back the optimistic state if the transaction fails
  • Show a subtle Confirming... indicator alongside the optimistic state

Acceptance Criteria

  • Stream list reflects the withdrawal immediately without waiting for confirmation
  • Failed transaction rolls back the optimistic state and shows an error toast
  • Confirming indicator is visible during the on-chain wait
  • Multiple concurrent operations do not conflict in optimistic state
  • E2E test verifies optimistic update and rollback behaviour

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity: highComplex feature, refactor, or new integrationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions