-
Notifications
You must be signed in to change notification settings - Fork 0
Add shui for persistent pak UI #57
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
Conversation
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.
Pull request overview
This PR introduces shui, a persistent UI daemon that consolidates message dialogs, list selectors, keyboard input, and progress bars into a single daemon-based tool. This eliminates SDL reinitialization between UI calls, removing the blank screen flicker that occurred with the previous separate utilities (minui-presenter, minui-list, minui-keyboard).
Key architectural change: Instead of each UI utility initializing SDL independently, shui runs as a persistent background daemon that keeps SDL initialized. Scripts send commands via IPC (JSON files in /tmp/shui/), with fire-and-forget messages returning immediately and interactive dialogs waiting for user response.
Key Changes
- Added complete shui implementation with daemon mode, CLI mode, IPC layer, and four UI modules (message, list, keyboard, progress)
- Removed three legacy utilities (minui-presenter, minui-list, minui-keyboard) totaling ~2600 lines of code
- Added strict compiler warning flags (
-Wall -Wextra -Werror) to makefiles across all platforms - Fixed operator precedence bugs in miyoomini keymon
- Updated powerOff implementations to use consistent
shutdownscript pattern - Migrated Wifi pak to use shui commands
Reviewed changes
Copilot reviewed 123 out of 147 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| workspace/all/utils/shui/* | Complete shui implementation with daemon, IPC, and UI modules |
| workspace/*/show/makefile | Added strict compiler warnings across all platforms |
| workspace/*/keymon/makefile | Added strict compiler warnings across all platforms |
| workspace/*/platform/platform.c | Standardized powerOff to call shutdown script consistently |
| workspace/trimuismart/platform/platform.c | Fixed CPU frequency handling with hardcoded values |
| workspace/miyoomini/keymon/keymon.c | Fixed operator precedence bugs with parentheses |
| workspace/all/paks/Wifi/launch.sh | Migrated from minui-* tools to shui commands |
| workspace/all/paks/*/launch.sh | Updated to use shui instead of legacy tools |
Comments suppressed due to low confidence (1)
workspace/all/paks/Wifi/launch.sh:387
- The
SSIDvalue from/tmp/minui-outputis used directly ingrep/sedpatterns without escaping inpassword_screen(). Because Wi‑Fi SSIDs are attacker‑controlled, a malicious access point name containing/and;e ...can break out of the regex and inject additionalsedcommands (e.g., using theecommand) whensed -i "/^$SSID:/d"runs, leading to arbitrary command execution as root when the user edits/forgets such a network. To fix this, either avoidsed -ifor deletion (e.g., rebuild the file withgrep -Fv "^$SSID:" ... > tmp && mv) or rigorously escape allsedregex metacharacters (including/,\,[,],.,*,^,$, and&) inSSIDbefore using it in regex-based tools, and similarly use fixed-string matching (grep -F) instead of regex wherever possible.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Huge UX upgrade for paks.