01a000c3 - Cancel pending RealUnit buy quotes - #916
Conversation
Add PUT /v1/realunit/buy/:id/deactivate from the pending list and the confirm screen. Waiting quotes are identified by uid when id is null.
Guard the cubit while loading, disable the cancel button, and ignore a second pending-row tap until the first deactivate finishes. Cover GoRouter pop after a successful cancel.
The confirm/deactivate column uses 8px spacing. Cancel is offered only on buys that have an id or uid. A failed pending-list reload no longer wipes a list that was already on screen. The buy responsive matrix now covers the two-button success state.
After a successful deactivate the row is removed before reload. A second deactivate is ignored while one is in flight. The confirm dialog checks mounted, and each pending row has a ValueKey.
Processing buys no longer show deactivate. Concurrent cancels of different quotes still run; a second tap on the same quote is ignored.
Deactivate uses its own loading state so confirm and cancel do not share a spinner. The pending list drops a cancelled quote by id or uid and does not emit after the cubit is closed.
Guard BuyConfirmCubit.deactivateQuote emits with isClosed. Empty id/uid cancel tests now use WaitingForPayment so they hit the idOrUid check.
Non-200 pending fetches throw so a failed refresh cannot wipe quotes. Overlapping reloads use a generation counter so an older GET cannot restore a cancelled row.
|
EN: DE: DetailsHead Comment 5298573406 was the previous ready note (confirm-screen cancel). This patch is the single Abschluss for the PR. Review loop: coverage hole on the unused wrapper constructor, then confirm-as-sheet / type-neutral title / back-during-loading, then overflow at 3.0x text scale, then the sticky-CTA catalog+matrix for the sheet. Last dual review: 0 findings. CI on this head: Analyze & Test, Coverage Floor Gate, Visual Regression, BitBox quirks audit, Handbook Build Check all SUCCESS. Maestro handbook flows SKIPPED (no Touched UI files 100% line coverage on the full lcov (Analyze & Test). Handbook cards 270–272, count pin 282. Goldens regenerated on the self-hosted runner; last dispatch reported no further pixel change. |
Remove cancel from the buy-confirm screen. A pending dashboard row opens a detail page where waiting buy quotes can be cancelled. CONTRIBUTING now requires 100% line coverage on every UI file a PR touches.
The Alchemist overlay navigator does not inherit S, so S.of(dialogContext) threw when capturing the confirm dialog golden.
Alchemist does not capture a showDialog overlay, so the previous tap golden was identical to the detail page. Extract CancelQuoteConfirmDialog and snapshot it directly.
Restore the dashboard page constructor, remove unused list-cubit deactivate, and pop the cancelled id so a failed reload cannot restore the row.
Three new pending-transaction-detail cards landed in the assemble map; the Handbook Build Check still expected 279.
The GetIt wiring test must construct BuyConfirmButton non-const so the constructor lines stay covered; analyzer treated that as info.
Update the leftover 279 comment and include slots 270 and 272 so the handbook container check covers the new pending-detail goldens.
Add PendingTransactionDetailPage to the screen table with handbook slots 270-272 and bump the routed-screen count.
A depth-1 fetch of the PR base SHA left no merge-base, so git diff BASE...HEAD exited 128 on Analyze & Test.
The touched-UI gate reported 29/30 on the pending-list view; add the back-without-cancel and dispose-during-push cases.
Keep the navigator alive, hide the pending list, then pop so the mounted guard actually runs.
The pending cubit lives on DashboardPage and outlives the zero- vs nonzero-balance list view. Bind drop/reload to cubit.isClosed, not widget mounted, and assert the success pop payload.
Flip the cubit-closed flag only after navigation so the early return on a closed pending cubit is actually executed.
Move drop/reload/isClosed out of the list view so the touched-UI coverage gate no longer depends on an unmounted-widget branch.
The unused DashboardPendingTransactions widget created a second cubit and left its const constructor at 0 hits in the full-suite lcov.
Cancel confirmation uses the same bottom-sheet pattern as the rest of the app. The detail title is type-neutral, and the back gesture is blocked while deactivate is in flight.
The confirm sheet now uses ScrollableActionsLayout so it does not overflow on small devices at 3.0x text scale.
Catalog the confirm sheet as its own sticky-CTA surface and open it through a real modal so both buttons stay tappable at 3.0x text scale.
EN:
Customers can cancel a pending RealUnit buy quote only after the binding purchase. On the dashboard they tap a pending transaction, see its details, and choose Cancel quote when it is a buy still waiting for payment. The buy-confirm screen no longer offers cancel. CONTRIBUTING now requires 100% line coverage on every UI file a PR touches.
DE:
Kunden können ein RealUnit-Kaufangebot erst nach dem verbindlichen Kauf stornieren. Auf dem Dashboard tippen sie eine ausstehende Transaktion an, sehen die Details und wählen Angebot stornieren, wenn es ein Kauf im Status Warte auf Zahlung ist. Der Bestätigungsbildschirm vor dem verbindlichen Kauf hat keinen Storno mehr. CONTRIBUTING verlangt 100 % Line-Coverage für jede von einem PR berührte UI-Datei.
Details
Depends on DFXswiss/api#4982 (
PUT /v1/realunit/buy/:id/deactivate).BuyConfirmButtonis confirm-only/dashboard/pendingTransactiontype == buyandstate == waitingForPaymentscripts/check-touched-ui-coverage.shon the full lcov before the packages/cubits/blocs extractGoldens for the new detail screens and the updated buy-confirm / dashboard pending shots are regenerated on the self-hosted runner.