GUI: Show warnings on all tabs - #301
Conversation
9fff8ee to
a79fdc3
Compare
|
After looking into this briefly, I'm still confused as to the bug here... is the problem that the Pairing tab doesn't display warnings? Because that's the only non-wallet tab besides Overview, and Overview already displays warnings properly? |
|
@chrisguida Overview already shows it (fixed in 81d5172 last July); the actual gap is the Pairing tab, which lives in a parallel stack and so the existing alert label gets hidden when you switch to it. This PR fixes that. |
|
@luke-jr says the bug is already fixed, do we still need this PR? |
|
@chrisguida , @luke-jr fixed the Overview tab bug, this PR fixes the Pairing tab bug, per my comment above. |
|
The Send/Receive/Transactions tabs also don't show the warning. I don't think it would be consistent to put it on Pairing without putting it everywhere...? |
a79fdc3 to
a7685c4
Compare
|
@luke-jr Good point. Updated to drop |
|
I've tested the new version of this PR with a hardcoded warning in Technically this PR is larger in scope than the original issue, which only mentions no-wallet tabs, but there are only 2 no-wallet tabs: Overview and Pairing, and Overview was already working properly. The first version of this PR fixed the Pairing tab, which was the exact scope originally outlined in #300 (and still referred to in this PR's title), but fixing warnings on all 5 tabs (regardless of whether a wallet is loaded) strikes me as the correct solution, and this new version is much cleaner than the old version anyway. Other than the PR's title and top comment needing an update for this new version: ACK a7685c4 |
|
@pdath I tested it by hardcoding a warning in the UI like so: I think I explained what's going on pretty well in my comment. |
This is not working for me on Windows. |
|
@pdath Linux x86, this is what it looks like for me:
When you say "not working", do you mean not building? Or you're just not seeing the warning banner? |
The warning bar in your screenshot - I don't get that on Windows. Everything is building as expected. No errors.
|
|
I know what I am doing wrong now. So I have done a dummy commit locally, and it now works!!!
I tested the code using this approach. I built the code using these commands: I tested on Windows 11 using the "How to reproduce" documentation. I did an AI code review. I think the summary comment is the only one worth mentioning. I used a default configuration, and started the test with: On the basis of the test results only (no human code review), tACK a7685c4. |
|
How about adding 1ex of padding to m_label_alerts since we're losing its margin? |
….makePool` method 6b0a907 Squashed 'src/ipc/libmultiprocess/' changes from 3edbe8f67c1..16bf05dea02 (Ryan Ofsky) Pull request description: The changes can be verified by running `test/lint/git-subtree-check.sh src/ipc/libmultiprocess` as described in [developer notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#subtrees) and [lint instructions](https://github.com/bitcoin/bitcoin/tree/master/test/lint#git-subtree-checksh). Changes since last subtree update (bitcoin#34977): - Adds `makePool` method on `ThreadMap` to support thread pool routing, allowing requests without a specific client thread to be dispatched to a pool using a shortest-queue strategy ([bitcoinknots#283](bitcoin-core/libmultiprocess#283)). - Adds `std::unordered_set` support, a `BuildList` helper, and a `ReadList` helper to reduce duplication in list build and read handlers ([bitcoinknots#277](bitcoin-core/libmultiprocess#277), [bitcoinknots#285](bitcoin-core/libmultiprocess#285)). - Adds support for translating C++ `std::optional<T>` struct fields to pairs of `T` + `hasT :Bool` Cap'n Proto struct fields, allowing unset optional primitive fields to be represented ([bitcoinknots#243](bitcoin-core/libmultiprocess#243)). - Produces more readable log output for Proxy object lifecycle events and IPC server-side failures ([bitcoinknots#218](bitcoin-core/libmultiprocess#218)). - Handles exceptions thrown by `destroy` methods by logging instead of aborting ([bitcoinknots#273](bitcoin-core/libmultiprocess#273)). This can prevent server crashes when non-libmultiprocess clients disconnect without destroying objects, in the case where a server object owns client objects and the server destructor tries to call the disconnected client to free them ([bitcoinknots#219](bitcoin-core/libmultiprocess#219)). - Handles unexpected exceptions thrown by callbacks (that should never happen) by logging errors instead of deadlocking ([bitcoinknots#260](bitcoin-core/libmultiprocess#260)). - Fixes a rare mptest hang on musl builds caused by a lost wakeup bug in `Waiter` ([bitcoinknots#295](bitcoin-core/libmultiprocess#295)). - Fixes a race condition in a log print detected by TSan ([bitcoinknots#286](bitcoin-core/libmultiprocess#286)). - Build improvements: makes `target_capnp_sources` work correctly when libmultiprocess is used as a CMake subproject ([bitcoinknots#289](bitcoin-core/libmultiprocess#289)), adds `mp_headers` target for better lint tool support ([bitcoinknots#291](bitcoin-core/libmultiprocess#291)), and fixes compatibility with recent Nix and CMake 4.0 ([bitcoinknots#238](bitcoin-core/libmultiprocess#238)). - Test, CI, documentation, and minor code improvements: design document corrections ([bitcoinknots#278](bitcoin-core/libmultiprocess#278)), field constant comments ([bitcoinknots#279](bitcoin-core/libmultiprocess#279)), clang-tidy fix ([bitcoinknots#292](bitcoin-core/libmultiprocess#292)), new smoke test for double-precision float values ([bitcoinknots#294](bitcoin-core/libmultiprocess#294)), new test for recursive async IPC calls ([bitcoinknots#301](bitcoin-core/libmultiprocess#301)), removal of libevent from Core CI builds ([bitcoinknots#299](bitcoin-core/libmultiprocess#299)), and rename of `EventLoop::m_num_clients` to `m_num_refs` ([bitcoinknots#302](bitcoin-core/libmultiprocess#302)). ACKs for top commit: fanquake: ACK 02afa66 hebasto: ACK 02afa66. Tree-SHA512: ef81a951c971f328a0a98436030467eeea30925eb6016eafd9bc7a25726c87628a852bbb1d84b88bce340aeea2bed25c65bc55db1168ebcb850628cd18808883







Fixes #300.
The status-bar warning from
ClientModel::getStatusBarWarnings()(e.g. unknown soft-fork activation, "large-work invalid chain", clock-skew warnings, pre-release build notices) was only ever rendered on the Overview tab. Its alert label lived insideOverviewPage, so every other tab showed nothing. Because the Send/Receive/Transactions/Pairing pages each live in their own widget in the stack, switching to any of them hid the warning.This moves the warning label out of
OverviewPageand up intoWalletFrame, as a sibling ofm_global_stackrather than a child of any single page. TheWalletFramelayout changes from anQHBoxLayoutto aQVBoxLayoutso the label sits above the stack and stays visible on every tab.OverviewPage::labelAlertsand itsupdateAlertsslot are removed so there is a single source for the warning instead of a per-page duplicate.Result: the warning shows on all five tabs when a wallet is loaded (Overview/Send/Receive/Transactions/Pairing) and on both no-wallet tabs (Overview/Pairing). The
RPCConsolepath used under-disablewalletis untouched.How to reproduce
getStatusBarWarnings()only returns a non-empty string when the node actually raises a warning (unknown version-bit activation, invalid-chain detection, system-clock skew, etc.), which is awkward to trigger on demand. The simplest way to see the bug is to inject a fixed warning, build, and click through the tabs.src/qt/clientmodel.cpp:Before this PR: the yellow warning bar appears only on the Overview tab. Switching to Pairing (or, with a wallet loaded, to Send/Receive/Transactions) hides it.
With this PR: the warning bar stays visible on every accessible tab. With no wallet that is Overview and Pairing (Send/Receive/Transactions are greyed out); with a wallet loaded it is all five tabs.
Remember to revert the hardcoded warning before testing anything else.