Peers search does not accept the displayed #ID #1105

Open
opened 2026-11-10 14:46:23 +00:00 by jarolrod · 0 comments
jarolrod commented 2026-11-10 14:46:23 +00:00 (Migrated from github.com)

The Peers page displays identifiers such as #72, but searching for that displayed identifier returns no match. Searching for the bare number works.

To reproduce:

  1. Open Peers with a row labeled #72, or use another displayed peer ID.
  2. Select the row and confirm that its details identify the same peer.
  3. Enter #72 in Search peers.
  4. Replace the search text with 72.

The first search empties the list and clears the detail pane. The second restores the same peer and address. In the reproduced fixture, the underlying model retained both peers and the footer continued to count them; refreshing did not resolve the prefixed search.

Searching by peer ID should accept both the displayed #72 form and the bare 72 form.

The GUI adds the # prefix when displaying the ID. The model exposes the ID as a number, while the search filter compares the unchanged query against its string representation.

Reproduced in two component runs on macOS / Qt 6.9 at 6e54a48ab571, using the production Peers page and models, deterministic peer snapshots, and mouse/key events. No live peer connection was used. The five owning view/model files are unchanged at merged eed1f426fcb6.

The Peers page displays identifiers such as `#72`, but searching for that displayed identifier returns no match. Searching for the bare number works. To reproduce: 1. Open Peers with a row labeled `#72`, or use another displayed peer ID. 2. Select the row and confirm that its details identify the same peer. 3. Enter `#72` in Search peers. 4. Replace the search text with `72`. The first search empties the list and clears the detail pane. The second restores the same peer and address. In the reproduced fixture, the underlying model retained both peers and the footer continued to count them; refreshing did not resolve the prefixed search. Searching by peer ID should accept both the displayed `#72` form and the bare `72` form. The GUI [adds the `#` prefix when displaying the ID](https://github.com/bitcoin-core/gui-qml/blob/eed1f426fcb64daa61b004590335a03afe376274/qml/pages/node/Peers.qml#L496). The model [exposes the ID as a number](https://github.com/bitcoin-core/gui-qml/blob/eed1f426fcb64daa61b004590335a03afe376274/qml/models/peerlistmodel.cpp#L72), while the [search filter compares the unchanged query against its string representation](https://github.com/bitcoin-core/gui-qml/blob/eed1f426fcb64daa61b004590335a03afe376274/qml/models/peerlistsortproxy.cpp#L244). Reproduced in two component runs on macOS / Qt 6.9 at `6e54a48ab571`, using the production Peers page and models, deterministic peer snapshots, and mouse/key events. No live peer connection was used. The five owning view/model files are unchanged at merged `eed1f426fcb6`.
Sign in to join this conversation.
No description provided.