Handle external link and open file failures #767

Manually merged
epicleafies merged 8 commits from handle-url-failures into qt6 2026-11-03 17:12:12 +00:00 AGit
epicleafies commented 2026-06-24 18:27:40 +00:00 (Migrated from github.com)

When a link or the debug log can't be opened, the app now tells the user instead of silently doing nothing. Fixes #597

  • External links: every link asks for confirmation before opening, including the "Show in" links in transaction details.

    • If the link can't be opened, the dialog says so and offers to copy it.
    • The link is selectable, so it can always be copied and opened by hand.
    • Only http and https links are opened.
  • Debug log: problems show in a banner on the debug log page.

    • A missing or unreadable log is reported until it can be read again. Search, filter and "Open debug.log" are disabled meanwhile.
    • A failed "Open debug.log" is reported until you leave the page.
    • The page reads the log file the node actually writes (-debuglogfile), and says when writing it is turned off (-nodebuglogfile).
  • Banners: banners whose message was already set when their page opened now show up instead of staying blank.

  • About: the Version link uses the same open-externally icon as the other links.

  • Cleanup: the unused legacy About page and its controls are removed.

  • Tests: unit, QML and functional tests cover the link dialog, the debug log banners and log settings, and the transaction links.

Known limitation: the system only reports whether something was launched to open the link, so a browser that starts and then fails still counts as success.

Link can't be opened

![1-link-could-not-open]

Debug log banners 2a-debug-log-open-failed 2b-debug-log-file-logging-off
Transaction "Show in" link 3a-transaction-show-in-menu 3b-transaction-show-in-popup
When a link or the debug log can't be opened, the app now tells the user instead of silently doing nothing. Fixes #597 * **External links**: every link asks for confirmation before opening, including the "Show in" links in transaction details. * If the link can't be opened, the dialog says so and offers to copy it. * The link is selectable, so it can always be copied and opened by hand. * Only http and https links are opened. * **Debug log**: problems show in a banner on the debug log page. * A missing or unreadable log is reported until it can be read again. Search, filter and "Open debug.log" are disabled meanwhile. * A failed "Open debug.log" is reported until you leave the page. * The page reads the log file the node actually writes (`-debuglogfile`), and says when writing it is turned off (`-nodebuglogfile`). * **Banners**: banners whose message was already set when their page opened now show up instead of staying blank. * **About**: the Version link uses the same open-externally icon as the other links. * **Cleanup**: the unused legacy About page and its controls are removed. * **Tests**: unit, QML and functional tests cover the link dialog, the debug log banners and log settings, and the transaction links. Known limitation: the system only reports whether something was launched to open the link, so a browser that starts and then fails still counts as success. <details> <summary>Link can't be opened</summary> ![<img width="1280" height="720" alt="1-link-could-not-open" src="https://git.fish.foo/attachments/436af5ad-20f2-4832-afa7-6f4a1c2b4314" />] </details> <details> <summary>Debug log banners</summary> <img width="1280" height="720" alt="2a-debug-log-open-failed" src="https://git.fish.foo/attachments/975ef1ee-e45b-4001-b25c-6553004ef925" /> <img width="1280" height="720" alt="2b-debug-log-file-logging-off" src="https://git.fish.foo/attachments/9b51c803-a98a-4ed9-8a2e-1fb734dfcd4e" /> </details> <details> <summary>Transaction "Show in" link</summary> <img width="1280" height="720" alt="3a-transaction-show-in-menu" src="https://git.fish.foo/attachments/8b2a4516-b48c-4ad3-b580-8740009e290e" /> <img width="1280" height="720" alt="3b-transaction-show-in-popup" src="https://git.fish.foo/attachments/ba218a0f-c103-4828-bff4-d503c473f80f" /> </details>
johnny9 (Migrated from github.com) approved these changes 2026-11-03 15:44:16 +00:00
johnny9 (Migrated from github.com) left a comment

ACK 48101e2468

Tested on Linux with Qt 6.10.2: 684 QML component checks and 25 debug-log model checks pass. Verified external-link confirmation, the copy fallback after a failed open, and URL scheme validation.

No introduced issues found.

ACK 48101e2468fb40eca45e07325cd8c445a578c889 Tested on Linux with Qt 6.10.2: 684 QML component checks and 25 debug-log model checks pass. Verified external-link confirmation, the copy fallback after a failed open, and URL scheme validation. No introduced issues found.
rreview commented 2026-11-03 16:19:20 +00:00 (Migrated from github.com)

🟠 Minor · Log-setting test sub-runs collide with the original GUI's RPC port

The new debug-log sub-runs overlap the original GUI, so their shared RPC port prevents node initialization, while sub-run failures collect diagnostics from the wrong process.

Location: test/functional/qml_test_debug_log.py:364 (head).

🟠 Minor · Aborted log reads disable controls without an error message

A failed seek or short read after opening the log can now disable search, filtering and Open debug.log without supplying an explanation.

Location: qml/models/debuglogmodel.cpp:665 (head).

🔵 Suggestion · The custom-log test searches outside the initially loaded tail

The marker is absent from the initial 1,000-row cache even when the viewer reads the wrong default log, so this assertion cannot detect that regression.

Location: test/functional/qml_test_debug_log.py:318 (head).

🔵 Suggestion · The scheme-rejection test checks the mock's allowlist, not production validation

Weakening UrlOpener's production validation would not affect the QML rejection test because MockUrlOpener independently implements the same checks.

Location: qml/urlopener.h:46 (head).

Review coverage was incomplete.


Reviewed: 48101e2468fb · Full review report

<!-- ralph-major:bitcoin-core/gui-qml --> **🟠 Minor · Log-setting test sub-runs collide with the original GUI's RPC port** The new debug-log sub-runs overlap the original GUI, so their shared RPC port prevents node initialization, while sub-run failures collect diagnostics from the wrong process. Location: [test/functional/qml_test_debug_log.py:364](<https://github.com/bitcoin-core/gui-qml/blob/48101e2468fb40eca45e07325cd8c445a578c889/test/functional/qml_test_debug_log.py#L364>) (head). **🟠 Minor · Aborted log reads disable controls without an error message** A failed seek or short read after opening the log can now disable search, filtering and Open debug.log without supplying an explanation. Location: [qml/models/debuglogmodel.cpp:665](<https://github.com/bitcoin-core/gui-qml/blob/48101e2468fb40eca45e07325cd8c445a578c889/qml/models/debuglogmodel.cpp#L665>) (head). **🔵 Suggestion · The custom-log test searches outside the initially loaded tail** The marker is absent from the initial 1,000-row cache even when the viewer reads the wrong default log, so this assertion cannot detect that regression. Location: [test/functional/qml_test_debug_log.py:318](<https://github.com/bitcoin-core/gui-qml/blob/48101e2468fb40eca45e07325cd8c445a578c889/test/functional/qml_test_debug_log.py#L318>) (head). **🔵 Suggestion · The scheme-rejection test checks the mock's allowlist, not production validation** Weakening UrlOpener's production validation would not affect the QML rejection test because MockUrlOpener independently implements the same checks. Location: [qml/urlopener.h:46](<https://github.com/bitcoin-core/gui-qml/blob/48101e2468fb40eca45e07325cd8c445a578c889/qml/urlopener.h#L46>) (head). Review coverage was incomplete. <!-- Review tier: sensitive --> --- Reviewed: [`48101e2468fb`](<https://github.com/bitcoin-core/gui-qml/commit/48101e2468fb40eca45e07325cd8c445a578c889>) · [Full review report](<https://review.fish.foo/traces/gui/767-48101e2468fb40eca45e07325cd8c445a578c889-2067-1.html>)
Sign in to join this conversation.
No description provided.