Repository navigation
Harden Slatepack UI and lifecycle handling - #1521
Merged
Merged
Conversation
desktopTextExtraSmall uses the disabled button text color, which is nearly white on the desktop card, so the explanation above the input was almost invisible. Use the subtitle color like the other slatepack hints.
Creating a slatepack did not compare the result with what the user had just confirmed, reported failures as "Broadcast transaction failed" although nothing is broadcast, and dropped the result without a trace when the confirmation view had closed in the meantime. A slatepack created for another amount is now cancelled and refused with an error naming both amounts. A different fee is logged and shown as a warning only, because the confirmed fee is an estimate and the wallet may select other inputs when it builds the slate. Failures are titled "Could not create the slate" or "slatepack". The sending dialog is closed through a navigator looked up before the send, so it no longer stays up when the view is gone, and that case is logged.
An imported response slatepack was offered for finalizing even when the wallet had no transaction for it, with only a note in the summary, and a transaction the wallet had received counted as a match. The lookup now reports the direction of the local transaction, prefers the send when a wallet holds both sides of a slate, and refreshes the stored history once before giving up, since a send made moments ago may not be in it yet. Without a send of its own the import flow explains that only the wallet that started the transaction can finalize it and no longer shows the Finalize button.
The slatepack dialog refused to draw a QR code for anything over 1000 characters. Epic Cash slates and MWC slatepacks can be longer than that and were drawn at any length before the shared dialog replaced the per-coin ones, so the longer ones lost their QR code. The limit is now what a QR code can hold at the error correction level the widget draws at, 2953 bytes, counted in bytes instead of characters. Longer data still gets the note to copy, share or save it.
The import flow passed whatever was pasted, scanned or opened straight to the wallet, so a slatepack with a greeting, a quote marker or other text around it was rejected. The flow now trims the text and, when it holds an armored slatepack, keeps only the part from the begin marker to the end marker. Both the BEGINSLATEPACK and BEGINSLATE_BIN frames are recognised, with or without the final period. JSON slates and anything without a frame are only trimmed. Inspecting, receiving and finalizing all use that text.
On the slatepack screen a second press of Continue could start the import again while the first was still under way. On a phone the screen closes the keyboard and waits briefly before it starts, which leaves room for that, and the slatepack would then be processed twice. The screen now tracks a running import, ignores further presses and disables the button until the import has returned.
Receiving a slatepack takes a while. If the screen that started the import was gone by the time the wallet had signed it, the response was dropped without a word, even though the wallet had already recorded the transaction and the sender still needs that response. The import flow now keeps hold of the root navigator before it starts and shows the response from there when its own screen has closed. It logs the slate id in that case, and also when a finalize completes after the screen closed. The response text itself is not logged.
The slatepack dialog shared its text without a position for the share sheet. An iPad needs one to place the popover and refuses to open the sheet without it, so Share did nothing there apart from logging an error. The dialog now passes the Share button's rect on screen. Other devices ignore it.
The sending dialog was closed by popping the root navigator. If another route had opened above the dialog by the time the send returned, that route was popped and the dialog stayed up. The dialog's route is now kept and removed directly, so nothing else is closed. A failed HTTP address also closes the dialog when the view is already gone.
The import flow showed its loading overlay through showLoading, which only removes the overlay while the calling screen is still mounted. If that screen closed while the wallet was working, the overlay stayed over the whole app, under the response that is now shown in that case. The flow keeps its own overlay route on the root navigator and removes it when the wallet answers. An error is shown from the root navigator too when the screen is gone.
sneurlax
marked this pull request as draft
November 13, 2026 22:50
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## feat/slatepack-interface #1521 +/- ##
============================================================
+ Coverage 16.34% 16.84% +0.50%
============================================================
Files 1147 1147
Lines 113495 113585 +90
============================================================
+ Hits 18546 19131 +585
+ Misses 94949 94454 -495 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is intentionally stacked on #1507 so its lifecycle and UX fixes remain independently reviewable.
Verification