-
Notifications
You must be signed in to change notification settings - Fork 8
[FEATURE] UI affordances and PKGBUILD validation #133
Copy link
Copy link
Open
Labels
Description
Summary: Improve UX discoverability with focus/hover action descriptions and add in-app PKGBUILD validation using shellcheck and namcap with graceful degradation and dry-run-safe execution. Related planning: dev/IMPROVEMENTS/FEATURE_PRIORITY.md (button tooltips ~v0.7.1; PKGBUILD ~v0.7.0).
1) Hover / focus descriptions for buttons
Problem
Icon-only or compact buttons are ambiguous; users want discoverability without reading the wiki.
Recommended implementation
- Primary: On focus, show a one-line description in a status bar or help line (keyboard-first; works in all terminals).
- Secondary: If mouse tracking is enabled and supported, mirror the same string on hover after a short debounce.
- Centralize metadata: extend button/widget definitions with
label_short,description, optionalkeybind_hintso help overlay and inline hints stay in sync.
Acceptance criteria
- Every actionable control in main flows has a description visible via focus or documented alternative.
- No duplicate strings diverging from help overlay.
Testing
- Snapshot or unit test that button registry includes non-empty descriptions for registered actions.
2) PKGBUILD preview: shellcheck and namcap
Problem
AUR users review PKGBUILDs in-app; static checks catch common mistakes before install.
Recommended implementation
- Detection: Resolve paths to
shellcheckandnamcapwithwhich/PATH; degrade gracefully with clear “install extra/package” messages if missing. - Execution: Run in sandbox-friendly mode: subprocess with timeout, no network, working dir set to extracted sources or temp copy of PKGBUILD text.
- UI: In PKGBUILD preview panel, keybind “Run checks”; results in scrollable list with severity (error/warning) and line references where available.
- Dry-run: Show commands that would run without executing when global dry-run is on.
Security
- Never
evalPKGBUILD; parsers are external tools on file content only. - Cap output size to avoid memory blowups from noisy tools.
Acceptance criteria
- With tools installed, user sees aggregated shellcheck + namcap output for the displayed PKGBUILD.
- With tools missing, actionable error, no panic.
- CI: unit tests mock subprocess stdout/stderr; optional integration behind feature flag.
Risks
namcapmay require package context; document limitations when only PKGBUILD fragment is available.
Tracking: dev/ROADMAP/OTHER_ui_validation_tooltips.md
Reactions are currently unavailable