Skip to content

Add MiniBlockClock to the Navigation Bar#558

Open
johnny9 wants to merge 3 commits into
bitcoin-core:qt6from
johnny9:miniblockclock
Open

Add MiniBlockClock to the Navigation Bar#558
johnny9 wants to merge 3 commits into
bitcoin-core:qt6from
johnny9:miniblockclock

Conversation

@johnny9
Copy link
Copy Markdown
Collaborator

@johnny9 johnny9 commented Apr 26, 2026

Adds the mini version of the BlockClock dial. This mirrors the block clock states (Connecting, IBD, Blocks, Paused, and Error).

Additionally, fixed a bug with the lambda capture for the update handler that was causing the IBD % to flicker between the current % and 0%. (83b4455)

Screenshot from 2026-04-26 01-38-26 Screenshot from 2026-04-26 01-37-48 Screenshot from 2026-04-26 01-37-32

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.

434faf0
tested, works as expected

  • The pause does not seems perfectly centered?
Image
  • Is it on purpose that the mini block clock is not representing current "state" when selected? i.e. always "full
Screencast.from.2026-05-06.08-43-53.webm

johnny9 added 3 commits May 7, 2026 05:53
Add a compact BlockClock representation for wallet navigation. The mini dial uses the shared BlockClockDial without time ticks or individual block segments, with immediate connecting animation, non-animated IBD/selected fills, and center/pause/error glyph states.

Keep the selected state visible across dynamic states, including pause, by using the selected yellow for the paused mini indicator. Also allow NavigationTab to host custom content and use pointing-hand cursors consistently for navigation buttons.
NotifyBlockTip callbacks can arrive from node threads. The queued lambda previously captured the block tip and verification progress by reference, so IBD progress could read stale stack values and flicker to 0%.

Capture block height, block time, and verification progress by value before queueing onto the Qt thread, and queue connection-count updates through the same path. Add a regression test that fires block-tip updates from a worker thread and verifies the delivered payloads.
BlockClock state depends on node and chain context objects while the dial itself is rendered by a QQuickPaintedItem. Add injected model refs and stable object names so QML tests and the automation bridge can drive the component deterministically.

Cover the dial painter with sampled-pixel unit tests, BlockClock state/format/toggle behavior with QML mocks, and the stable no-peer regtest path with a functional CONNECTING/PAUSE smoke test. Keep IBD, synced, and error permutations in unit/QML coverage instead of making the functional test timing-sensitive.
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.

3 participants