gui: add non-file import/export fallbacks for text workflows - #2129
gui: add non-file import/export fallbacks for text workflows#2129starius wants to merge 3 commits into
Conversation
|
Hi, thanks for looking into this, could you share some screenshots or screencats of the UI changes, so @nondiremanuel can figure out if it fits in the flow? |
|
Thanks for the review!
Yes, that fallback is already implemented in this PR. When the native file picker does not return a path, the modal stays open and switches to a simple manual path input instead of closing immediately.
I agree that showing both file and clipboard actions everywhere can make the UI feel too busy. My suggestion would be to keep clipboard actions only for short, single-line values such as xpubs, where copy/paste is likely the primary user flow anyway. In practice, xpubs are often exchanged directly between participants, for example over chat, and requiring a temporary file just adds extra steps on both sides. For longer text content such as full backups, labels, or other larger exports, I agree that relying on file import/export plus the manual path fallback is probably the cleaner UI. More concretely, my suggestion for the cases in this PR would be:
That seems like a reasonable compromise between usability and keeping the UI uncluttered. What do you think? |
I agree with your consideration, but I would still avoid having the "Copy" and "Paste" for the PSBT for the following reasons:
|
29eb0d7 to
c46c186
Compare
|
@nondiremanuel I removed unneeded changes. Now it is quite small:
I also kept the backup retry-state fix because it is independent and still useful. |
Thanks! I will test and we will review as soon as possible. |
|
Sorry it took me some time to test. It generally looks good (at least from a non-code-review perspective) but I have a couple of comments:
|
Show a direct clipboard action for shared xpubs in the installer share step while keeping the existing file export action as the primary flow. This keeps the common xpub handoff flow available without forcing users to route short text through a temporary file, while preserving the existing file-based export path.
Track whether the descriptor shown in the installer came from a backup import and clear that derived state before starting another backup import attempt. This prevents stale aliases, backup metadata, and backup-derived descriptor contents from remaining active when the user retries the existing file-based import flow.
When the native file picker returns no path, keep the shared import/export modal open and switch it to a simple manual path entry state instead of closing immediately. This applies to both ordinary picker cancellation and picker backend failures, since `rfd` exposes both as `None`. It still provides a minimal but functional fallback for environments where the desktop picker cannot complete the selection flow.
c46c186 to
a556a20
Compare
|
@nondiremanuel Thanks for checking it!
|














Summary
This PR reduces Liana GUI's dependence on native file pickers for text-based workflows and keeps the shared import/export modal usable when the picker does not return a path.
On non-Nixos nix setups the wallet does not have a working file picker widget, so Export/Import buttons showed a window and immediately closed it:
On Linux, Liana currently relies on rfd's XDG portal backend for file selection. In some environments that portal request fails at runtime; rfd then falls back to spawning zenity. If zenity is not available, rfd returns no path and the existing GUI treats that the same as a normal chooser cancel, so the import/export modal closes immediately. This PR adds non-file clipboard flows for text-based workflows and keeps the modal usable by falling back to manual path entry when no path is returned.
What changed
Copyactions for shared xpubs in the installer share step while keeping the existing export buttons.