Redesign peers list #889

Manually merged
pseudoramdom merged 7 commits from peers-redesign into qt6 2026-09-17 12:35:45 +00:00 AGit
pseudoramdom commented 2026-09-09 21:04:04 +00:00 (Migrated from github.com)

Summary

The existing Peers interface was designed around a narrow layout and separate list, detail, and banned-peer pages. This redesign presents peer information more consistently, makes better use of wider windows, and adapts the same interaction model to compact layouts. Additionally, add support to search, filter, sort peers.

Implementation details

  • Introduce SizeClass to centralize compact and regular layout breakpoints. Originally proposed in https://github.com/bitcoin-core/gui-qml/pull/690 but felt worthwhile to port it in to this redesign.
  • Introduce NavigationSplitView a reusable primary-detail container. At regular widths, th list and detail view are displayed side by side with the first peer selected automatically. At compact widths, they are stacked in a navigation view.
  • Peers list and detail adopts the NavigationSplitView

Screenshots

https://github.com/user-attachments/assets/6cf4c31a-3781-44c1-ae13-1f336c492a9e

## Summary The existing Peers interface was designed around a narrow layout and separate list, detail, and banned-peer pages. This redesign presents peer information more consistently, makes better use of wider windows, and adapts the same interaction model to compact layouts. Additionally, add support to search, filter, sort peers. ## Implementation details - Introduce `SizeClass` to centralize compact and regular layout breakpoints. Originally proposed in https://github.com/bitcoin-core/gui-qml/pull/690 but felt worthwhile to port it in to this redesign. - Introduce `NavigationSplitView` a reusable primary-detail container. At regular widths, th list and detail view are displayed side by side with the first peer selected automatically. At compact widths, they are stacked in a navigation view. - Peers list and detail adopts the `NavigationSplitView` ## Screenshots https://github.com/user-attachments/assets/6cf4c31a-3781-44c1-ae13-1f336c492a9e
uqlidi (Migrated from github.com) requested changes 2026-09-12 18:40:58 +00:00
uqlidi (Migrated from github.com) left a comment

That's impressive works. I like the new design but there are few suggestions

That's impressive works. I like the new design but there are few suggestions
uqlidi (Migrated from github.com) commented 2026-09-12 18:02:44 +00:00

I see it's similar to Alertpopup. cannot make a shared component between them or reuse AlertPopup?

I see it's similar to Alertpopup. cannot make a shared component between them or reuse AlertPopup?
uqlidi (Migrated from github.com) commented 2026-09-12 18:06:54 +00:00

PeerDetailsModel::mappedAS() and permission() return tr("N/A"), which is
translated. Under a German or Spanish locale the comparison never matches, so
those rows show the translated "N/A" instead of the em dash the rest of the page
uses.

Fix it in the model. Let C++ report "no value" and let QML decide how to render
it:

// qml/models/peerdetailsmodel.h
QString mappedAS() const { return m_combinedStats->nodeStats.m_mapped_as != 0 ? QString::number(m_combinedStats->nodeStats.m_mapped_as) : QString{}; }
QString permission() const {
    if (m_combinedStats->nodeStats.m_permission_flags == NetPermissionFlags::None) {
        return {};
    }
    ...
}

Then drop || value === "N/A" from unavailable(). startingHeight() returns
tr("N/A") too and has the same problem.

`PeerDetailsModel::mappedAS()` and `permission()` return `tr("N/A")`, which is translated. Under a German or Spanish locale the comparison never matches, so those rows show the translated "N/A" instead of the em dash the rest of the page uses. Fix it in the model. Let C++ report "no value" and let QML decide how to render it: ```cpp // qml/models/peerdetailsmodel.h QString mappedAS() const { return m_combinedStats->nodeStats.m_mapped_as != 0 ? QString::number(m_combinedStats->nodeStats.m_mapped_as) : QString{}; } QString permission() const { if (m_combinedStats->nodeStats.m_permission_flags == NetPermissionFlags::None) { return {}; } ... } ``` Then drop `|| value === "N/A"` from `unavailable()`. `startingHeight()` returns `tr("N/A")` too and has the same problem.
uqlidi (Migrated from github.com) commented 2026-09-12 18:09:22 +00:00

nit: There are a lot of emdashes. honestly I dont like it and I don't think people like it after the AI. cannot replace them?

nit: There are a lot of emdashes. honestly I dont like it and I don't think people like it after the AI. cannot replace them?
uqlidi (Migrated from github.com) commented 2026-09-12 18:25:18 +00:00

Cannot reuse the network charts in settings page here?

Image

it would be really cool (I love charts =D)

Cannot reuse the network charts in settings page here? <img width="1898" height="1138" alt="Image" src="https://git.fish.foo/attachments/f6e4e5d0-619d-4299-b255-ac4031b4b5f1" /> it would be really cool (I love charts =D)
uqlidi commented 2026-09-12 18:41:53 +00:00 (Migrated from github.com)

Fix broken CIs please

Fix broken CIs please
pseudoramdom (Migrated from github.com) reviewed 2026-09-12 22:47:15 +00:00
pseudoramdom (Migrated from github.com) commented 2026-09-12 22:47:15 +00:00

Em-dashes is probably the right thing to do here.
We do have precedent in using em-dash for empty values. See bullet 2 in https://github.com/bitcoin-core/gui-qml/issues/807.
(AI ruined em-dashes for everyone)

Em-dashes is probably the right thing to do here. We do have precedent in using em-dash for empty values. See bullet 2 in https://github.com/bitcoin-core/gui-qml/issues/807. (AI ruined em-dashes for everyone)
pseudoramdom (Migrated from github.com) reviewed 2026-09-12 22:48:31 +00:00
pseudoramdom (Migrated from github.com) commented 2026-09-12 22:48:31 +00:00

This is to show the list of banned peers in a modal view so that we show them without pushing a new view. Hence the popup suffix. It's not related to Alertpopup :)

This is to show the list of banned peers in a modal view so that we show them without pushing a new view. Hence the `popup` suffix. It's not related to Alertpopup :)
pseudoramdom (Migrated from github.com) reviewed 2026-09-16 00:11:36 +00:00
pseudoramdom (Migrated from github.com) commented 2026-09-16 00:11:36 +00:00

Good idea. We can, but will probably stick to this table for this PR

Good idea. We can, but will probably stick to this table for this PR
johnny9 (Migrated from github.com) reviewed 2026-09-16 16:37:37 +00:00
johnny9 (Migrated from github.com) left a comment

Reviewed 87a7b72c1. The four findings from my earlier summary are attached inline here.

Five existing QML suites passed, and focused probes reproduced these issues. Full backend, sanitizer, and platform validation remain untested locally; lint and clang-tidy were blocked by missing scripts in this checkout.

Reviewed `87a7b72c1`. The four findings from my earlier summary are attached inline here. Five existing QML suites passed, and focused probes reproduced these issues. Full backend, sanitizer, and platform validation remain untested locally; lint and clang-tidy were blocked by missing scripts in this checkout.
johnny9 (Migrated from github.com) commented 2026-09-16 16:37:37 +00:00

Under Spanish, the direction/type becomes Outbound · Saliente Retransmisión completa: details.direction is English while details.type already contains the translated direction. Display details.type directly, or expose separately translated direction and connection-type values.

Under Spanish, the direction/type becomes `Outbound · Saliente Retransmisión completa`: `details.direction` is English while `details.type` already contains the translated direction. Display `details.type` directly, or expose separately translated direction and connection-type values.
johnny9 (Migrated from github.com) commented 2026-09-16 16:37:37 +00:00

If peer A disconnects while its ban confirmation is open, the regular layout selects B and confirming bans B instead. Disconnect confirmation has the same problem. Capture the target when opening each confirmation and use it for both the message and action, or cancel when that peer disappears.

If peer A disconnects while its ban confirmation is open, the regular layout selects B and confirming bans B instead. Disconnect confirmation has the same problem. Capture the target when opening each confirmation and use it for both the message and action, or cancel when that peer disappears.
johnny9 (Migrated from github.com) commented 2026-09-16 16:37:37 +00:00

Updating a traffic statistic rebuilds the table delegates, clearing text selection and keyboard focus even in an unchanged field. Keep the delegates stable and update their values in place. Cover selecting the ping value while refreshing a byte counter.

Updating a traffic statistic rebuilds the table delegates, clearing text selection and keyboard focus even in an unchanged field. Keep the delegates stable and update their values in place. Cover selecting the ping value while refreshing a byte counter.
johnny9 (Migrated from github.com) commented 2026-09-16 16:37:37 +00:00

Leaving the desktop Peers tab still executes the cleanup referencing peersStack, but this replacement removes that ID. Every transition raises ReferenceError: peersStack is not defined. Remove the obsolete cleanup or replace it with the intended PeersView reset.

Leaving the desktop Peers tab still executes the cleanup referencing `peersStack`, but this replacement removes that ID. Every transition raises `ReferenceError: peersStack is not defined`. Remove the obsolete cleanup or replace it with the intended `PeersView` reset.
pseudoramdom (Migrated from github.com) reviewed 2026-09-16 18:04:13 +00:00
pseudoramdom (Migrated from github.com) commented 2026-09-16 18:04:13 +00:00

Resolved in 359556a581

Resolved in 359556a581af2ac63edc2e38982a211a2275ce98
pseudoramdom (Migrated from github.com) reviewed 2026-09-16 18:06:01 +00:00
pseudoramdom (Migrated from github.com) commented 2026-09-16 18:06:01 +00:00

Resolved in 359556a581

Resolved in 359556a581af2ac63edc2e38982a211a2275ce98
pseudoramdom (Migrated from github.com) reviewed 2026-09-16 18:06:04 +00:00
pseudoramdom (Migrated from github.com) commented 2026-09-16 18:06:04 +00:00

Resolved in 359556a581

Resolved in 359556a581af2ac63edc2e38982a211a2275ce98
pseudoramdom (Migrated from github.com) reviewed 2026-09-16 18:06:09 +00:00
pseudoramdom (Migrated from github.com) commented 2026-09-16 18:06:09 +00:00

Resolved in 359556a581

Resolved in 359556a581af2ac63edc2e38982a211a2275ce98
johnny9 (Migrated from github.com) approved these changes 2026-09-17 12:12:22 +00:00
johnny9 (Migrated from github.com) left a comment
ACK 28a4cc25222b7b4792dc779b979bdec7d58338bf
Sign in to join this conversation.
No description provided.