Skip to content

Confirm dialogs and their page each own half of one submission lifecycle #198

Description

@lmcorbalan

User story / Problem statement

Currently EndPendingGrant and CancelGrant each own their write, toast, error and close, stay dismissible mid-submission, and close over values derived outside them. Six review fixes across four waves on PR #197 all landed on that one arrangement.

Expected outcome

Dismissing a confirm dialog over the wallet prompt has no bearing on the submission it started, and whether a dialog is mounted stops being something a write path reasons about.

Acceptance criteria

  • The page rendering the list owns the submission, its in-flight set and its toast
  • EndPendingGrant and CancelGrant take props and emit onConfirm, holding no submission state
  • No onScreen ref, or any other mounted-check, survives in either dialog
  • A value a dialog shows cannot disagree with the value its write uses
  • Dismissing a dialog mid-submission leaves its card unclickable until the write settles
  • pnpm -C dapp/frontend test and pnpm -C dapp/frontend typecheck pass

Alternatives considered

Make the dialog non-dismissible while submitting. Rejected once already: a user cannot see past the wallet prompt, so dismissing it is worth keeping.

Technical notes

The split today: pages/PendingGrants/index.tsx holds endingCids, the refresh and the list; the dialogs hold submitting, the toast and the close. dapp/frontend runs no DOM tests, so review and the manual loop are the verification.

Additional context

Follow-on from PR #197 (#181), under epic #157, whose history holds the six fixes.

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions