Skip to content

Activity search filter#559

Open
johnny9 wants to merge 11 commits into
bitcoin-core:qt6from
johnny9:activity-search-filter
Open

Activity search filter#559
johnny9 wants to merge 11 commits into
bitcoin-core:qt6from
johnny9:activity-search-filter

Conversation

@johnny9
Copy link
Copy Markdown
Collaborator

@johnny9 johnny9 commented Apr 27, 2026

Based on #553 to include RequestHistoryModel.

Adds a toggle to open up text search and drop downs for time and type filters.

The toggle state is saved as a QSetting.

Added an export activity to csv as well.

image image image image image

@johnny9 johnny9 force-pushed the activity-search-filter branch from fbbff05 to 94153d4 Compare May 3, 2026 03:39
Copy link
Copy Markdown
Contributor

@MarnixCroes MarnixCroes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

94153d4

  • There is an issue when Create payment request does not work at first try. You have to change dialog, then it works
Screencast.from.2026-05-05.09-05-57.webm
  • View previous requests should be grayed out when there are none.
  • I think the default save location of the CSV should not be build/bin
  • I guess the message should be displayed here as well, when there is one?
Image
  • For created payment requests, I think it does not make sense to display 0 confirmation count? It's a request, not a pending incoming tx

epicleafies and others added 11 commits May 7, 2026 05:18
Move QmlReceiveRequestRecipient and QmlRecentRequestEntry from an
anonymous namespace in walletqmlmodel.cpp into a dedicated header so
they can be shared with the upcoming ReceiveRequestHistoryModel.

Bump the recipient serialization version to 2, adding an optional
noteSelf field, and widen the date serialization type to int64_t to
avoid Y2038 truncation.
Introduce a QAbstractListModel that manages the in-memory list of
receive request entries. It exposes roles for address, label, amount,
BIP21 URI, and timestamps, and provides static helpers for
serialization, deserialization, and bitcoin: URI construction.

Unit tests cover URI building (plain address, with params, URL
encoding, bech32 case preservation), serialization round-trips
including the v2 noteSelf field, model role queries, prepend/remove
operations, and malformed-blob resilience.
Add several properties to PaymentRequest that the upcoming detail
page needs: addressType (derived from the destination variant),
noteSelf (private note), qrPayload (reactive BIP21 URI that updates
when amount, address, label, or message change), createdIso
(ISO 8601 creation timestamp), and hasPaymentInfo (true when any of
label, message, or amount is set).
Add an isPendingRequest bool to Transaction so the activity list can
distinguish unfulfilled receive requests from real on-chain
transactions. When set, dateTimeString() returns "Pending receive"
instead of computing a relative timestamp.
Wire ReceiveRequestHistoryModel into WalletQmlModel as a persistent
child model. Refactor commitPaymentRequest() to return bool, always
generate a fresh address, and update both the history model and the
activity list on success. Add loadPaymentRequest(),
removeReceiveRequest(), and reloadReceiveRequests() for the detail
page and options menu.

In ActivityListModel, add pending-request support:
addPendingReceiveRequests() merges unfulfilled requests into the
activity feed during refresh, removePendingRequestForAddress() clears
them when a real transaction arrives, and updateTransaction() now
uses proper beginInsertRows/endInsertRows instead of a blanket
dataChanged signal.
Redesign the RequestPayment page from a flat form into a PageStack
with two views: a creation form and a detail page that shows after a
request is committed.

The detail page (PaymentRequestDetail) displays a QR code encoding
the BIP21 URI, copy and share buttons, and an expandable details
section with address, amount, label, message, address type, URI, and
creation time. A CopiedToast component provides transient clipboard
feedback.

Supporting changes:
- Add EllipsisMenuButtonItem control (non-toggle menu action)
- Add ReceiveOptionsPopup and PaymentDetailOptionsPopup components
- Extend OutlineButton with optional icon and disabled state
- Simplify IconButton and EllipsisMenuToggleItem hover handling
- Adjust Separator default color for better contrast
- Register ReceiveRequestHistoryModel QML type in bitcoin.cpp
- Handle textEdited() signal without arguments in testbridge
Add an end-to-end functional test (qml_test_receive.py) that imports
a wallet, creates two receive requests, verifies the BIP21 QR
payload includes correct amount/label/message params, confirms
history persists across a GUI restart, and checks the history count
grows correctly.

Add a QML unit test (tst_requestpayment.qml) covering the
formatRelativeTime helper and the BTC/SAT amount input validators.

Wire the functional test into the CI workflow.
@johnny9 johnny9 force-pushed the activity-search-filter branch from 94153d4 to 5a77614 Compare May 7, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants