Skip to content

feat: tree-view task selector with grouped packages#219

Merged
branchseer merged 9 commits intomainfrom
03-11-feat_improve_task_selector_styles
Mar 11, 2026
Merged

feat: tree-view task selector with grouped packages#219
branchseer merged 9 commits intomainfrom
03-11-feat_improve_task_selector_styles

Conversation

@branchseer
Copy link
Copy Markdown
Member

@branchseer branchseer commented Mar 11, 2026

Summary

Redesigns the interactive task selector (vp run) to group tasks by package in a tree view, making it much easier to navigate workspaces with many packages.

Before (flat list)

  › app#build:               echo build app
    app#lint:                echo lint app
    app#test:                echo test app
    lib#build:               echo build lib
    lib#lint:                echo lint lib
    lib#test:                echo test lib
    lib#typecheck:           echo typecheck lib
    task-select-test#check:  echo check root

After (tree view, grouped by package)

When running from packages/app:

  › build:           echo build app
    lint:            echo lint app
    test:            echo test app
  lib (packages/lib)
      build:         echo build lib
      lint:          echo lint lib
      test:          echo test lib
      typecheck:     echo typecheck lib
  task-select-test (workspace root)
      check:         echo check root
      clean:         echo clean root
      deploy:        echo deploy root
  (…5 more)

Current package tasks appear first without a header, so you immediately see the most relevant tasks. Other packages show as dimmed headers with their relative path.

Selecting a task from another package

Navigate into another package's group and press Enter — the output shows the full package#task identifier:

  lib (packages/lib)
  ›   build:         echo build lib

Selected task: lib#build

Fuzzy search still works

  • Type a task name to filter across all packages
  • Type lib#build to search with package qualifier
  • When using #, packages are sorted by best fuzzy match instead of current-package-first

Colors

Matches the vp command picker for visual consistency:

  • Selected: blue bold label, dark grey marker and description
  • Non-selected: default label, dark grey description
  • Package headers: dimmed

Non-interactive mode unchanged

Piped input (echo '' | vp run) still outputs the flat package#task: command format.

Test plan

  • Unit tests for display row generation and group ordering
  • E2E snapshot tests for interactive selection, cross-package selection, search, scrolling
  • Non-interactive output snapshots verified unchanged format
  • cargo test -p vite_select and cargo test -p vite_task_bin --test e2e_snapshots -- task-select pass

🤖 Generated with Claude Code

branchseer and others added 7 commits March 11, 2026 09:56
…ommands

- Add left-padding to align all commands at the same column
- Color task names with cyan, package prefixes with light cyan
- Selected line uses uniform bold with no color changes
- Split labels into package# prefix and task name for independent styling

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Place the alignment padding between the colon and command instead of
before the label, so commands are visually aligned at the same column.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When selecting a task from the interactive selector (`vp run`), match
the package by filesystem path rather than display name. This bypasses
CLI specifier parsing and directly constructs a TaskQuery with
PackageQuery::containing_package(path).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Group tasks by package in the interactive selector with non-selectable
headers, and sort current-package items first in both interactive and
non-interactive modes. Introduces DisplayRow as the single source of
truth for the flattened display list, replacing the old before_render
callback with built-in group_filtered logic in vite_select.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ender loop

Use crossterm's Display-implementing types directly in write! instead of
calling .to_string(), eliminating 2-3 heap allocations per visible item
per render frame. Also simplify prefix selection with a match expression.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Selected items: DarkGrey marker, Blue+Bold label, DarkGrey description.
Non-selected items: default label color, DarkGrey description.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@branchseer branchseer changed the title feat: Improve task selector styling with colored labels and aligned commands feat: Tree-view task selector with grouped packages Mar 11, 2026
@branchseer branchseer changed the title feat: Tree-view task selector with grouped packages feat: tree-view task selector with grouped packages Mar 11, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@branchseer branchseer marked this pull request as ready for review March 11, 2026 07:52
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@branchseer branchseer requested review from cpojer and fengmk2 March 11, 2026 07:54
@branchseer branchseer merged commit bad8334 into main Mar 11, 2026
7 checks passed
@branchseer branchseer deleted the 03-11-feat_improve_task_selector_styles branch March 11, 2026 08:05
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