Skip to content

[FEATURE] UI affordances and PKGBUILD validation #133

@Firstp1ck

Description

@Firstp1ck

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, optional keybind_hint so 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

  1. Detection: Resolve paths to shellcheck and namcap with which/PATH; degrade gracefully with clear “install extra/package” messages if missing.
  2. Execution: Run in sandbox-friendly mode: subprocess with timeout, no network, working dir set to extracted sources or temp copy of PKGBUILD text.
  3. UI: In PKGBUILD preview panel, keybind “Run checks”; results in scrollable list with severity (error/warning) and line references where available.
  4. Dry-run: Show commands that would run without executing when global dry-run is on.

Security

  • Never eval PKGBUILD; 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

  • namcap may require package context; document limitations when only PKGBUILD fragment is available.

Tracking: dev/ROADMAP/OTHER_ui_validation_tooltips.md

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions