[Enhancement] Redraw battery status without needing to change the menu item
Opened by @tadeubas · Assignees: @saranyaelavarthi
Solve & Merge Reward: Up to +229 XP & +60 Coins
+30 XP on PR open · +180 XP & +60 coins on merge · +19 star XP (386 stars)
Claim Status & GitHub Signal
Assigned on GitHub (@saranyaelavarthi). Check recent comments before starting duplicate work.
Estimated from issue labels (enhancement, good first issue), Python context, and discussion depth. There are 6 GitHub comments to review for maintainer clarifications. Note: this is an estimate, not a guarantee.
What It's About
[Enhancement] Redraw battery status without needing to change the menu item. See the battery status update while charging without the need to change the menu item to trigger a screen update
Why It Matters
Resolving #322 improves reliability and developer experience in selfcustody/krux.
Expected Outcome
A focused pull request addressing #322 with relevant checks or tests verified locally.
Log in to compare this issue's requirements against your profile skills. Required concepts: Python.
Progressive AI Hints
Hint #1 is always free and calibrated to your experience level. Extra hints unlock with coins without spoiling the full solution.
Skill-Gap Learning
Issue Description
See the battery status update while charging without the need to change the menu item to trigger a screen update
Linked Pull Requests (0)
No linked or cross-referenced pull requests detected via GitHub timeline. Check comments below for informal claims before starting.
GitHub Comments (6)
Hi, is this still an issue? I'd like to work on it. I'm thinking of refreshing just the battery icon on a timer instead of redrawing the whole menu. Let me know if that works!
I think still issue (but IMO not a big one, krux-devices aren't cellphones).
Maybe discussing well first, IMO, before opening enhancements. cc @tadeubas @jdlcdl.
Thanks! I reproduced it in the simulator: the icon stays the same on the home menu and only updates after going into a submenu and back. One simple option could be to check the battery level in the idle loop and redraw only the icon when the value actually changes, so there's no full menu redraw and little extra work. Happy to go with whatever approach you prefer.
I think will not be a priority FOR NOW. But still think could be worth of on user POV (maybe the details could be more creepy -- or not)
Makes sense, thanks! I'll leave this one for now. Is there another issue you'd suggest for a new contributor? Happy to help with tests or docs too.
Hi @tadeubas , I'd like to take this one. Right now the battery icon is only drawn by draw_status_bar() when a menu redraws, because Menu.run_loop() blocks in wait_for_fastnav_button() until a button is pressed. My plan is to wait in short non-blocking slices while a menu is idle and, on each timeout, redraw only the battery indicator, keeping the screensaver_time behaviour and input debounce unchanged. I'd add tests in tests/pages/test_menu.py for the periodic redraw and the screensaver timing, and check it in the simulator. Does that approach work for you, or would you rather the redraw only happen when USB is plugged or unplugged?
Issue Troubleshooting Threads (0)
No troubleshooting threads opened for this issue yet. If you hit a test, build, or navigation blocker, post what you've tried so fellow contributors can help.
PR Verification & Rewards
Sign in and link GitHub to verify your PR against this issue and earn XP + coins.
Contribution Workflow
Track your local progress before opening a pull request on GitHub.
Repository Context
Top Repository Paths
CONTRIBUTING.md Excerpt
Contributing to Krux firmware
Krux firmware is free and open-source software, built as a community effort. We welcome contributions of any kind: bug reports, feature requests, code, and documentation, from contributors of any experience level. We only ask that you respect others and follow the process described here.
Read the documentation
We maintain detailed user documentation. Please read it carefully before contributing. If you find it incomplete or unclear, improving it is a welcome contribution and a good first issue.
Communication channels
The primary channel is the GitHub repository. Contributors are credited in the krux and krux-installer contributor lists.
Contribution workflow
The workflow is meant to support cooperation and keep quality high, not to impose rigid procedure. To contribute a patch:
- Fork the repository
- Create a topic branch
- Commit your changes
- Push to your fork
- Open a pull request
- Address peer review
Fork the repository
Fork the repository and clone your fork:
git clone git@github.com:<user>/krux.git
Then follow the setup steps in README.md.
Create a topic branch
main is the stable branch and develop is the integration branch that all
development starts from. Create your topic branch off develop, using a
<type>/<name> convention (as used by Bitcoin projects such as bdk and
floresta):
main -> develop -> chore/task-stuff
-> ci/job-stuff
-> docs/info-new
git checkout develop
git checkout -b <type>/<name>
Commit your changes
Commits should be atomic and their diffs easy to read. Do not mix formatting
changes or code moves with functional changes. Each commit should build and
pass tests where possible, so that git bisect and other tools work
reliably. New features should be covered by tests. When refactoring, keep
pull requests focused and split large changes into smaller ones.
Follow these commit message guidelines and the ["Conventional Commits 1.0.0"](https://www.conventionalcommits.org/en/
... (truncated)
Advisory PR Assistant
Helps structure your PR description or unpack reviewer feedback. Does not perform GitHub actions.