Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 2.61 KB

File metadata and controls

45 lines (34 loc) · 2.61 KB

← Back to Backlog

[SC-031] Redesign menu layout with grouped commands and contextual help

Status: Open Priority: Medium Component: lib/wsl/manager.ps1 Depends on: SC-029, SC-016

Summary: As a user, I want the WSL Manager menu to be organized into logical groups with contextual help so that I can quickly find commands and understand what they do without memorizing letter shortcuts.

Description: The current flat list of 13+ letter-keyed commands is functional but can be overwhelming, and will only grow as features are added (export/import from SC-020, future items). A grouped layout with contextual help improves discoverability and reduces cognitive load.

This item builds on SC-016's arrow-key navigation and PwshSpectreConsole integration to create a polished, organized menu experience.

Planned improvements

  1. Grouped command categories using Read-SpectreSelection with grouped choices:
    • Distribution: Install, Clone, Import, Export, Remove
    • Configure: Setup User, Setup Proxy, Setup Docker, Setup Podman, Setup DevPod
    • Manage: Update, Terminate, Shutdown, Configure .wslconfig
  2. Contextual help: one-line description for the currently highlighted item shown below the menu
  3. Dimmed unavailable commands: gray out commands that don't apply (e.g., "Terminate" when no distros are running)
  4. Status summary in header: show distro count and running count (e.g., "3 distributions, 1 running")
  5. Breadcrumb trail: show navigation context for nested workflows (e.g., "Menu > Install > Select Distribution")

Technical approach

  • Replace Start-InteractiveMode's flat menu rendering with a Spectre grouped selection model
  • Define a menu model (array of groups with items) that is easy to extend when new commands are added
  • Track "available" state per item based on current distro list and running state
  • Use Read-SpectreMultiSelectionGrouped where batch operations make sense (e.g., terminate multiple distros)

Acceptance Criteria:

  • Menu commands are organized into logical groups (Distribution, Configure, Manage) with visual separators
  • Highlighted menu item shows a one-line contextual help description
  • Unavailable commands are visually dimmed (not hidden) with a reason
  • Header shows distribution count and running count
  • Breadcrumb trail is displayed during nested workflows (e.g., distro selection after choosing "Install")
  • New commands can be added by extending the menu model without changing rendering logic
  • All existing tests continue to pass

← Back to Backlog