Skip to content

01a000c3 - Cancel pending RealUnit buy quotes - #916

Open
TaprootFreak wants to merge 30 commits into
stagingfrom
feat/realunit-deactivate-buy-quotes
Open

01a000c3 - Cancel pending RealUnit buy quotes#916
TaprootFreak wants to merge 30 commits into
stagingfrom
feat/realunit-deactivate-buy-quotes

Conversation

@TaprootFreak

@TaprootFreak TaprootFreak commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

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).

  • BuyConfirmButton is confirm-only
  • Pending row is tappable (no close icon) and opens /dashboard/pendingTransaction
  • Detail page shows type, status, amount, date, id/uid
  • Cancel is shown only for type == buy and state == waitingForPayment
  • After a successful cancel the detail page pops the cancelled id; the list drops that row and then reloads, so a failed reload cannot restore it
  • Handbook cards 270–272 plus updated 92
  • CI: scripts/check-touched-ui-coverage.sh on the full lcov before the packages/cubits/blocs extract

Goldens for the new detail screens and the updated buy-confirm / dashboard pending shots are regenerated on the self-hosted runner.

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.
@TaprootFreak
TaprootFreak marked this pull request as ready for review August 14, 2026 20:57
@TaprootFreak
TaprootFreak marked this pull request as draft August 14, 2026 21:04
@TaprootFreak
TaprootFreak marked this pull request as ready for review August 14, 2026 21:35
@TaprootFreak

TaprootFreak commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

EN:
Ready after 3 review passes.
Customers cancel a pending RealUnit buy quote from the dashboard detail page after the binding purchase, not from the confirm screen.

DE:
Bereit nach 3 Review-Durchläufen.
Kunden stornieren ein ausstehendes RealUnit-Kaufangebot auf der Dashboard-Detailseite nach dem verbindlichen Kauf, nicht auf dem Bestätigungsbildschirm.

Details

Head 57e8ca195b96. Mergeable. No open review threads, inline comments, or reviews.

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 tier3:full label — expected).

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.

@TaprootFreak
TaprootFreak marked this pull request as draft August 17, 2026 06:56
TaprootFreak and others added 6 commits August 17, 2026 09:32
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.
@TaprootFreak
TaprootFreak marked this pull request as ready for review August 17, 2026 08:11
@TaprootFreak
TaprootFreak marked this pull request as draft August 17, 2026 08:12
Three new pending-transaction-detail cards landed in the assemble
map; the Handbook Build Check still expected 279.
@TaprootFreak
TaprootFreak marked this pull request as ready for review August 17, 2026 08:20
@TaprootFreak
TaprootFreak marked this pull request as draft August 17, 2026 08:23
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.
@TaprootFreak
TaprootFreak marked this pull request as ready for review August 17, 2026 08:41
@TaprootFreak
TaprootFreak marked this pull request as draft August 17, 2026 08:59
A depth-1 fetch of the PR base SHA left no merge-base, so
git diff BASE...HEAD exited 128 on Analyze & Test.
@TaprootFreak
TaprootFreak marked this pull request as ready for review August 17, 2026 09:08
@TaprootFreak
TaprootFreak marked this pull request as draft August 17, 2026 09:34
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.
@TaprootFreak
TaprootFreak marked this pull request as ready for review August 17, 2026 09:56
@TaprootFreak
TaprootFreak marked this pull request as draft August 17, 2026 10:21
Flip the cubit-closed flag only after navigation so the early
return on a closed pending cubit is actually executed.
@TaprootFreak
TaprootFreak marked this pull request as ready for review August 17, 2026 10:28
@TaprootFreak
TaprootFreak marked this pull request as draft August 17, 2026 10:47
Move drop/reload/isClosed out of the list view so the touched-UI
coverage gate no longer depends on an unmounted-widget branch.
@TaprootFreak
TaprootFreak marked this pull request as ready for review August 17, 2026 10:55
@TaprootFreak
TaprootFreak marked this pull request as draft August 17, 2026 11:17
TaprootFreak and others added 3 commits August 17, 2026 13:31
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.
@TaprootFreak
TaprootFreak marked this pull request as ready for review August 17, 2026 12:12
@TaprootFreak
TaprootFreak marked this pull request as draft August 17, 2026 12:41
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.
@TaprootFreak
TaprootFreak marked this pull request as ready for review August 17, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant