-
Notifications
You must be signed in to change notification settings - Fork 312
qt: add reset button and console commands for clearing output/history #882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
qt: add reset button and console commands for clearing output/history #882
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this change is practical. Clearing the console should remove the visible output, but it shouldn't also clear the command history. In most terminal environments (e.g., bash, zsh, cmd, PowerShell, etc.), using clear or Ctrl+L clears the screen while preserving command history, which remains accessible via the arrow keys. Users often rely on this history to repeat or modify previous commands, and removing it could unintentionally disrupt that workflow. I suggest keeping the command history intact when clearing the console.
Also, just a heads-up: this GUI repository is currently in maintenance mode and primarily focused on bugfixes — new feature additions are unlikely to be considered or prioritized unless they're closely tied to functionality in Bitcoin Core. If you're interested in contributing new features or improvements, I encourage you to take a look at bitcoin-core/gui-qml, which is the new GUI project under active development. Your contributions would be very welcome there.
Thanks for the feedback. I understand the comparison to typical terminal behavior, but I think the context here is different. In the RPC console, the command history is never cleared unless you shut down Bitcoin Qt. It stays even after using the "Clear" button, closing the console, or even closing the wallet. This means any sensitive or debug-related commands remain accessible via the arrow keys across sessions. Clearing only the output gives a false impression that the console was fully reset. This change makes the "Clear" button behave more like a full reset, which helps with privacy and general cleanup during debugging. It also aligns with what some users expect from a GUI console. I understand the repo is in maintenance mode, but I still think this is a relevant and useful change. If needed, I'm open to submitting it to gui-qml instead. |
If there is concern about preserving history by default, a compromise could be to clear command history only when holding Shift while clicking the "Clear" button, similar to how modifier keys are used in other GUIs for alternate actions. But personally, my expectation as a user is that "Clear" fully resets the console, including input history. |
9ccce65
to
4dd9a04
Compare
I'm still not very convinced with this change but let's see what others think. Thank you! |
Concept NACK, agree we should match expected behaviour here (not clearing command history). Maybe some way can be added, but I'm not sure there's an obvious right way. |
a8720a1
to
3db405b
Compare
Updated the patch to only clear input when Shift is held; also added Ctrl+Shift+L as a secondary shortcut. |
3db405b
to
73d2cf9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update, but I don’t think relying on a hidden keyboard combination (Shift modifier and Ctrl+Shift+L) is a good long-term solution. Most users will never discover it, and without documentation, it risks becoming an obscure feature that only a handful of people know about. It also deviates from common terminal behavior, where clearing the output and clearing history are separate, explicit actions. On top of that, shortcut bindings can be difficult to maintain long-term — they may conflict with other shortcuts, differ across platforms, or get broken by Qt
or OS
changes.
I think that a more user-friendly and discoverable approach would be to support terminal-style commands in the console, so users can interact in a way they already understand from bash, zsh, cmd, PowerShell, etc. For example:
history # list cached commands
help history # show usage info for the history command
history -c # clear command history
clear # clear visible console output only
help clear # explain clear options (e.g. 'clear history')
clear history # clear command history
This way, clearing history becomes an intentional action the user explicitly types, and it can be documented alongside other commands in the console’s help output. It’s discoverable, consistent with terminal norms but mainly with the current rpc console behaviour, and extensible if more sub-commands are needed in the future.
73d2cf9
to
8c21bf7
Compare
Thanks for the feedback, I agree that discoverability is important, and this is addressed in the latest update. The patch now adds explicit console commands in addition to the button and shortcut:
These commands are listed in the help-console output and also documented in the welcome message shown when the console is cleared, so they are easy to discover. This covers the terminal-style interaction you suggested, while still providing a UI button and shortcut for convenience. The Ctrl+Shift+L shortcut remains as an extra option for users who prefer a quick key combo, but it is no longer the only way to perform the action. |
Uh oh!
There was an error while loading. Please reload this page.