Improve Send and Send Review pages #860

Manually merged
pseudoramdom merged 11 commits from send-improvements into qt6 2026-08-26 07:47:13 +00:00 AGit
pseudoramdom commented 2026-08-14 05:30:38 +00:00 (Migrated from github.com)

This is an omnibus PR that fixes a several issues related to Send and Send review pages.

  • Allow payment requests to be pasted directly into the address field.
  • Reject invalid characters in the address field.
  • Navigate to the activity details page when selecting “View Transaction” after sending.
  • Keep the bitcoin/sats unit preference synchronized on the Send Review page.
  • Fixes #873
  • Widen and animate the wallet passphrase popup.
  • Allow addresses to toggle between truncated and full forms on the Send Review page.
  • Improve the multiple-recipient Send Review layout.

Review note: The changes are organized into focused commits, so this PR is best reviewed commit by commit.

This is an omnibus PR that fixes a several issues related to Send and Send review pages. - Allow payment requests to be pasted directly into the address field. - Fixes #839 - Reject invalid characters in the address field. - Fixes #836 - Navigate to the activity details page when selecting “View Transaction” after sending. - Fixes #830. - Fixes #831. - Keep the bitcoin/sats unit preference synchronized on the Send Review page. - Fixes #844 - Fixes #873 - Widen and animate the wallet passphrase popup. - Allow addresses to toggle between truncated and full forms on the Send Review page. - Improve the multiple-recipient Send Review layout. **Review note:** The changes are organized into focused commits, so this PR is best reviewed commit by commit.
johnny9 (Migrated from github.com) reviewed 2026-08-15 17:13:02 +00:00
johnny9 (Migrated from github.com) left a comment

Everything looks good in this PR. Just want to check if we should go ahead and handle full bitcoin uri's with this PR or not.

Everything looks good in this PR. Just want to check if we should go ahead and handle full bitcoin uri's with this PR or not.
johnny9 (Migrated from github.com) commented 2026-08-15 17:09:12 +00:00

Should we go ahead and add Uri parsing for all input fields?

The uri can contain data for the amount and label as well. Would probably need to be handled at the form level instead of just the input fields so that the rest of the fields could be modified when pasting. We'd also probably need to confirm overwrite if there is already information in the unfocused fields.

Should we go ahead and add Uri parsing for all input fields? The uri can contain data for the amount and label as well. Would probably need to be handled at the form level instead of just the input fields so that the rest of the fields could be modified when pasting. We'd also probably need to confirm overwrite if there is already information in the unfocused fields.
pseudoramdom (Migrated from github.com) reviewed 2026-08-18 04:22:10 +00:00
pseudoramdom (Migrated from github.com) commented 2026-08-18 04:22:10 +00:00

This is a good suggestion. The commit qml: Parse payment URIs pasted into send fields (8cf4f065d7f8e9a6917b3bc42087fa73d5290250) does this now.

This is a good suggestion. The commit `qml: Parse payment URIs pasted into send fields` (8cf4f065d7f8e9a6917b3bc42087fa73d5290250) does this now.
pseudoramdom (Migrated from github.com) reviewed 2026-08-18 04:22:28 +00:00
pseudoramdom (Migrated from github.com) commented 2026-08-18 04:22:28 +00:00

We'd also probably need to confirm overwrite if there is already information in the unfocused fields

Screenshot 2026-08-17 at 9 16 58 PM
> We'd also probably need to confirm overwrite if there is already information in the unfocused fields <img width="375" height="276" alt="Screenshot 2026-08-17 at 9 16 58 PM" src="https://git.fish.foo/attachments/381853dd-4281-45c5-b4e6-5581cc3368be" />
johnny9 (Migrated from github.com) reviewed 2026-08-18 18:00:10 +00:00
johnny9 (Migrated from github.com) commented 2026-08-18 18:00:05 +00:00

I think this might be making too big of an assumption about how pasting form the clipboard is configured. I don't know that we can assume ctrl+V is always the paste combo

I think this might be making too big of an assumption about how pasting form the clipboard is configured. I don't know that we can assume ctrl+V is always the paste combo
pseudoramdom (Migrated from github.com) reviewed 2026-08-19 21:35:48 +00:00
pseudoramdom (Migrated from github.com) commented 2026-08-19 21:35:48 +00:00

I removed the shortcut-specific paste interception. Bitcoin URIs are now detected when the field content changes and handled at the Send form level, so this works with platform-specific keyboard shortcuts, context-menu paste, and other paste mechanisms.

I removed the shortcut-specific paste interception. Bitcoin URIs are now detected when the field content changes and handled at the Send form level, so this works with platform-specific keyboard shortcuts, context-menu paste, and other paste mechanisms.
johnny9 (Migrated from github.com) requested changes 2026-08-20 02:13:13 +00:00
johnny9 (Migrated from github.com) left a comment

Paste handling still breaks older supported Qt versions and mixes user paste with model updates.

Paste handling still breaks older supported Qt versions and mixes user paste with model updates.
johnny9 (Migrated from github.com) commented 2026-08-20 02:13:13 +00:00

Would it be simpler to keep the previous explicit paste handler and use event.matches(StandardKey.Paste) instead of checking Ctrl/Meta+V? Qt would handle the platform shortcut mappings, the handler would run before validation, and model updates would not be treated as pastes. A context-menu Paste action could call the same shared handler. This may remove the need for the new text synchronization code.

Would it be simpler to keep the previous explicit paste handler and use `event.matches(StandardKey.Paste)` instead of checking Ctrl/Meta+V? Qt would handle the platform shortcut mappings, the handler would run before validation, and model updates would not be treated as pastes. A context-menu Paste action could call the same shared handler. This may remove the need for the new text synchronization code.
johnny9 (Migrated from github.com) commented 2026-08-20 02:13:13 +00:00

TextArea has no textEdited signal in supported Qt 6.4 and 6.8. CI fails here and the Send page cannot load. onTextChanged already calls handlePaymentUriInput(), so this line can be removed.

`TextArea` has no `textEdited` signal in supported Qt 6.4 and 6.8. CI fails here and the Send page cannot load. `onTextChanged` already calls `handlePaymentUriInput()`, so this line can be removed.
johnny9 (Migrated from github.com) commented 2026-08-20 02:13:13 +00:00

This only works when the URI replaces the whole field. The amount field starts with 0.00000000, so a normal paste at the cursor is rejected by the validator. The test hides this by calling selectAll() first.

Please compare the old and new text to find what was inserted, verify it matches the clipboard, and parse that value. StandardKey.Paste can handle platform keyboard shortcuts, with the same handler used by the context menu. This should also reduce the need for syncFromAddress().

This only works when the URI replaces the whole field. The amount field starts with `0.00000000`, so a normal paste at the cursor is rejected by the validator. The test hides this by calling `selectAll()` first. Please compare the old and new text to find what was inserted, verify it matches the clipboard, and parse that value. `StandardKey.Paste` can handle platform keyboard shortcuts, with the same handler used by the context menu. This should also reduce the need for `syncFromAddress()`.
johnny9 (Migrated from github.com) commented 2026-08-20 02:13:13 +00:00

onTextChanged also runs for model updates. If a label contains a valid Bitcoin URI, it gets parsed again and can set an amount that was not in the original request. I reproduced an encoded label setting the amount to 1 BTC. Please only check user edits or add a sync guard.

`onTextChanged` also runs for model updates. If a label contains a valid Bitcoin URI, it gets parsed again and can set an amount that was not in the original request. I reproduced an encoded label setting the amount to 1 BTC. Please only check user edits or add a sync guard.
pseudoramdom (Migrated from github.com) reviewed 2026-08-21 21:01:26 +00:00
pseudoramdom (Migrated from github.com) commented 2026-08-21 21:01:26 +00:00

Fixed. I removed TextArea.onTextEdited. Now handle native context-menu paste through the guarded onTextChanged path, which should be compatible with the Qt versions

Fixed. I removed TextArea.onTextEdited. Now handle native context-menu paste through the guarded onTextChanged path, which should be compatible with the Qt versions
pseudoramdom (Migrated from github.com) reviewed 2026-08-21 21:05:27 +00:00
pseudoramdom (Migrated from github.com) commented 2026-08-21 21:05:27 +00:00

Fixed in Native context-menu paste now compares the previous and current text, verifies that the inserted substring matches the clipboard.
I also removed the selectAll() calls from the functional test so it now covers pasting directly at the cursor

Fixed in Native context-menu paste now compares the previous and current text, verifies that the inserted substring matches the clipboard. I also removed the `selectAll()` calls from the functional test so it now covers pasting directly at the cursor
pseudoramdom (Migrated from github.com) reviewed 2026-08-21 21:17:14 +00:00
pseudoramdom (Migrated from github.com) commented 2026-08-21 21:17:14 +00:00

This is crazy and a great catch. Should be fixed now.

This is crazy and a great catch. Should be fixed now.
pseudoramdom (Migrated from github.com) reviewed 2026-08-21 21:19:00 +00:00
pseudoramdom (Migrated from github.com) commented 2026-08-21 21:19:00 +00:00

Took the suggestion. Keyboard paste now uses event.matches(StandardKey.Paste), allowing Qt to handle the platform shortcut mapping. Keyboard and native context-menu URI pastes are both routed through the shared Send form handler

Took the suggestion. Keyboard paste now uses `event.matches(StandardKey.Paste)`, allowing Qt to handle the platform shortcut mapping. Keyboard and native context-menu URI pastes are both routed through the shared Send form handler
johnny9 (Migrated from github.com) reviewed 2026-08-25 19:52:44 +00:00
johnny9 (Migrated from github.com) left a comment

Rebase and make the changes to the testcases to match the current pattern

Rebase and make the changes to the testcases to match the current pattern
johnny9 (Migrated from github.com) commented 2026-08-25 19:50:55 +00:00
        gui.wait_for_property("activityStack", "depth", 1, timeout_ms=10000)

this should be less flakey

```suggestion gui.wait_for_property("activityStack", "depth", 1, timeout_ms=10000) ``` this should be less flakey
johnny9 (Migrated from github.com) commented 2026-08-25 19:45:01 +00:00
        const page = createTemporaryObject(sendComponent, testCase.Window.window.contentItem)
```suggestion const page = createTemporaryObject(sendComponent, testCase.Window.window.contentItem) ```
johnny9 (Migrated from github.com) commented 2026-08-25 19:46:39 +00:00

this is to use the window that qt quick test already provides

this is to use the window that qt quick test already provides
johnny9 (Migrated from github.com) commented 2026-08-25 19:41:29 +00:00

These need to be updated now to remove gTest

These need to be updated now to remove gTest
johnny9 (Migrated from github.com) approved these changes 2026-08-26 04:37:09 +00:00
johnny9 (Migrated from github.com) left a comment
ACK f121078eff786c7757a87d58f07bf14a23540ae8
Sign in to join this conversation.
No description provided.