WIP: qt: refactor QML frontend onto owned models

bitcoin-core/gui-qml: PR #1142

1 minor finding · 3 suggestions

Earlier concerns neither republished nor resolved: 1 major finding · 6 minor findings · 7 suggestions. See the Run archive for their assessments.

Findings

Link

[minor] · Backup and PSBT export confirmations have no height limit or scrolling

A long destination or short window can make WalletBackupConfirmation and PsbtExportConfirmation exceed the available height, leaving destination text or buttons outside the window; this is inferred from source, not an observed rendering.

Location: qml/components/WalletBackupConfirmation.qml:19 (head).

Details and suggested fix

Both components set implicitHeight to the full ColumnLayout height and center it with (parent.height - height) / 2. The layout places the complete operation.finalPath, wrapped with Text.WrapAnywhere, above the Cancel and approval buttons. Their callers add no height bound, and path inspection allows input up to 32,768 bytes. When the content exceeds the window, there is no scrollable area through which to inspect the destination and reach the actions. Escape still refuses the operation. Cap each popup to the overlay height, keep the buttons in a visible footer, and make the destination area scrollable. Add a small-window, long-path regression test; exact overflow thresholds depend on font metrics and Qt positioning.


Optional improvements

Link

[suggestion] · The signer-substitution commit adds a helper but no production enforcement

Commit 1769dec2 advertises rejection of substituted signer transactions, but enforcement arrives in later extraction commits, making the security check harder to locate when reviewing the series.

Location: qml/models/signertransaction.cpp:9 at 1769dec2c8c6 (commit) (commit).

Details and suggested fix

Commit 1769dec2c8c67109066c2ec5b1c7c53175f87d6a defines MatchesUnsignedTransaction and tests it, but does not connect it to a production signing path. The rejecting calls arrive in walletsend.cpp in 33856db8f27504e6d6bb37bb1cd6df95e4595474, then in psbtwork.cpp and immediately after signBumpTransaction in walletbump.cpp in ac7e2e481dd6d97dfe84ad45dbde783c8c2d8f3c. Keep the preparatory commit, but title it as adding the comparison helper and cross-reference those enforcement sites in its message. This preserves the useful isolated helper test while making the protection reviewable end to end. Moving the helper only into the later PSBT commit would reverse the earlier Send dependency. This concerns review flow, not missing enforcement at head.


Link

[suggestion] · The commit inventory omits the trailing partial #1088 workaround

The description lists #1088 as fixed by the Receive extraction but omits the final production workaround, which still leaves untried unsupported address types visible.

Location: qml/walletreservations.cpp:346 at b47ab4fadf95 (commit) (commit).

Details and suggested fix

The final commit, b47ab4fadf9579a377bcd82f5140d98da0819f7a, follows the six test-only close-outs and changes production Receive behavior: it matches Core's Error: No %s addresses available. string, records rejected types for the wallet opening, and retries an unspecified type using a fallback. Its message calls #1088 partial, and its test uses QEXPECT_FAIL for the unsupported types still offered before generation. The description instead credits the earlier Receive extraction, d904a8d8dd51b66bd3ed3d28cf0fda162c882ced, under “Fixed” and omits this final commit. Refresh the inventory and stale SHAs, and move #1088 to “Addressed” with the untried-type limitation and Core error-string dependency. No commit rearrangement is necessary.


Link

[suggestion] · The settings extraction presents a superseded admission contract

The settings extraction initially reserves 384 KiB per keystroke; folding the later L-02 fix and regression into it would let reviewers assess the final admission contract together without changing head behavior.

Location: qml/models/settingseditormodel.cpp:47 at 27453eb09e2b (commit) (commit).

Details and suggested fix

Commit 7b81204f64dcf55c9ecb40acf5e2ba4bf095bd8f introduces SettingsEditorModel::State::post with a fixed 393216-byte Domain reservation, including for each typed edit. Commit 27453eb09e2bdf5cbc93d6ac832284b24bdcb4c5 replaces that reservation with the edit's key, sequence, and literal size, and adds typingAheadOfTheDomainKeepsEveryKeystroke. That regression uses the existing fixture to queue a complete proxy entry while the Domain lane does not advance, distinguishing the corrected contract from the version that exhausts the budget and rejects typed characters. Squash the implementation, header, and test changes into the introducing commit so the settings-area review starts with that contract and its regression together. These files have no intervening edits, and the area commits are already documented as not building independently. Keep the L-02 discovery note for traceability; this is a sequencing suggestion, not a defect remaining at head.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.

Background

Ralph's summary of historical context for the behaviour affected by this change. The historical record reviewed here is incomplete.

Documented decisions

Receive history needs to distinguish current payment credit from historical address use. The earlier wallet-background-work proposal explicitly made the payment-status badge follow the current received amount, including replacement away to zero, while retaining historical sharing/edit restrictions.

This explains why receipt reconciliation and request editing are separate concerns in the affected Receive models. A reversible payment observation and a historical restriction need not have identical lifetimes; treating them as one permanent 'paid' flag would lose that distinction.

Source 1 · Source 2 · Source 3

Unresolved disagreements

The historical unloading discussion exposed a real tradeoff between a small release-safe workaround and prompt completion of unload RPCs. Deferring deletion avoided crashes with limited changes, but one participant warned that waiting for the user to close a dialog could cause an RPC timeout; the response accepted that possibility because the handler would continue waiting. The inspected record does not establish a general resolution beyond the proposed short-term workaround.

This is background for why UI closure, backend retirement and operation completion have separate lifetimes. It should not be read as an unresolved defect in this PR or as proof that the old Qt Widgets workaround governs the current Qt Quick application.

Source 1 · Source 2 · Source 3 · Source 4