Skip to content

Conversation

@nchapman
Copy link
Collaborator

@nchapman nchapman commented Dec 6, 2025

Huge UX upgrade for paks.

Copilot AI review requested due to automatic review settings December 6, 2025 21:01
Copy link

Copilot AI left a 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 shutdown script 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 SSID value from /tmp/minui-output is used directly in grep/sed patterns without escaping in password_screen(). Because Wi‑Fi SSIDs are attacker‑controlled, a malicious access point name containing / and ;e ... can break out of the regex and inject additional sed commands (e.g., using the e command) when sed -i "/^$SSID:/d" runs, leading to arbitrary command execution as root when the user edits/forgets such a network. To fix this, either avoid sed -i for deletion (e.g., rebuild the file with grep -Fv "^$SSID:" ... > tmp && mv) or rigorously escape all sed regex metacharacters (including /, \, [, ], ., *, ^, $, and &) in SSID before 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.

@nchapman nchapman merged commit 1f01741 into develop Dec 6, 2025
4 checks passed
@nchapman nchapman deleted the feature/shellui branch December 6, 2025 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants