Skip to content

feat: task list in vp run#148

Merged
branchseer merged 11 commits intomainfrom
02-10-feat_task_list_in_vp_run_
Feb 13, 2026
Merged

feat: task list in vp run#148
branchseer merged 11 commits intomainfrom
02-10-feat_task_list_in_vp_run_

Conversation

@branchseer
Copy link
Copy Markdown
Member

@branchseer branchseer commented Feb 10, 2026

Interactive task selector for vp run

Screen.Recording.2026-02-12.at.22.44.49.mov

When vp run is called without a task or with a typo, show an interactive fuzzy-searchable selector (TTY) or a plain task list (piped stdin).

Interactive mode (TTY)

  • Fuzzy-searchable list powered by nucleo-matcher
  • Arrow keys to navigate, Enter to select, Esc to cancel
  • Scrollable when the list exceeds the viewport (page size = 8)
  • Typo pre-filled as initial search query with "Task not found" header
  • Selected task runs with original flags (-r, -t, extra args) preserved
  • Command shown in cyan, matching the execution summary style

Non-interactive mode (piped stdin)

  • Plain text list: taskName: command
  • "Did you mean" suggestions for typos (fuzzy-matched)
  • Exits with failure status for typo case

Key implementation details

  • vite_select crate — standalone UI widget with crossterm rendering, fuzzy matching, after_render callback for test milestones
  • RunFlags — extracted as Copy struct with #[clap(flatten)] so flags survive RunCommand consumption
  • RecursiveTaskNotFound error variant — recursive queries (-r) now error on unmatched task names instead of silently returning an empty graph
  • Nested task safetytask_not_found_name() returns None when the call stack is non-empty, so errors from nested tasks (e.g. vp run nonexistent inside a task script) propagate as-is instead of triggering the selector

E2E tests

12 test cases across task-select and task-list fixtures covering:

  • Non-interactive list, did-you-mean, recursive did-you-mean
  • Interactive select, search-then-select, typo pre-fill, cancel
  • Scroll through long list (12 tasks, page size 8)
  • Flag preservation (-r, -t)
  • Nested task error propagation (typo in task script fails without showing selector)

Copy link
Copy Markdown
Member Author

branchseer commented Feb 10, 2026

@branchseer branchseer changed the title refactor: simplify command handling by introducing to_synthetic_plan_request method feat: task list in vp run Feb 10, 2026
@branchseer branchseer marked this pull request as ready for review February 10, 2026 09:50
@branchseer branchseer changed the base branch from 02-09-chore_fix_clippy_issues to graphite-base/148 February 10, 2026 12:10
@branchseer branchseer force-pushed the 02-10-feat_task_list_in_vp_run_ branch from afe9e08 to 5ac00a8 Compare February 10, 2026 12:14
@graphite-app graphite-app bot changed the base branch from graphite-base/148 to main February 10, 2026 12:15
@branchseer branchseer force-pushed the 02-10-feat_task_list_in_vp_run_ branch 2 times, most recently from 93bb95d to 1f4ccd8 Compare February 12, 2026 09:52
@branchseer branchseer changed the base branch from main to graphite-base/148 February 12, 2026 09:53
@branchseer branchseer changed the base branch from graphite-base/148 to 02-11-test_add_pty_terminal_test February 12, 2026 09:53
@branchseer branchseer changed the base branch from 02-11-test_add_pty_terminal_test to graphite-base/148 February 12, 2026 10:09
@branchseer branchseer force-pushed the 02-10-feat_task_list_in_vp_run_ branch from 1f4ccd8 to 48f06ea Compare February 12, 2026 10:11
@graphite-app graphite-app bot changed the base branch from graphite-base/148 to main February 12, 2026 10:12
@branchseer branchseer force-pushed the 02-10-feat_task_list_in_vp_run_ branch from 48f06ea to b40f41f Compare February 12, 2026 10:12
When `vp run` is called without a task or with a typo, show an
interactive fuzzy-searchable selector (TTY) or a plain task list (piped).

- Add vite_select crate with crossterm-based interactive widget and
  nucleo-matcher fuzzy search
- Extract RunFlags from RunCommand for flag preservation across selection
- Detect interactive vs non-interactive mode via stdin/stdout is_terminal
- Show 'did you mean' suggestions for typos (including -r/--recursive)
- Add RecursiveTaskNotFound error for recursive queries with no matches
- Only intercept task-not-found at top level (non-empty call stack
  propagates as-is, fixing nested task error hanging)
- Style list items as 'taskName: command' with cyan command color
- E2E tests: list, did-you-mean, interactive select, search, scroll,
  cancel, flag preservation, nested task error propagation
…e_select

- Replace interactive_select() + print_select_list() with single select_list()
- Add Mode enum: Interactive { selected_index: &mut usize } / NonInteractive
- Remove SelectResult; selected index written directly via Mode reference
- Shared render_items() with RenderParams used by both modes
- Switch from crossterm styling to owo-colors with if_supports_color
- Esc now clears search query instead of cancelling selection
- Ctrl+C restores terminal and exits with code 130
…al width

Prevents line wrapping that breaks cursor-based clearing when navigating
the interactive task list. Descriptions exceeding terminal width are
truncated with an ellipsis. Non-interactive (piped) output is unaffected.

Moves the long-cmd test into a dedicated task-select-truncate fixture so
it does not appear in every task-select snapshot.
…ze to 12

Remove the vp interact subcommand and interactions-no-vp test fixture
as they are no longer needed. Remove crossterm and pty_terminal_test_client
dependencies from vite_task_bin that were only used by the interact command.

Increase interactive task select page_size from 8 to 12. Add extra tasks
to the task-select fixture to ensure paging behavior is still tested.
@branchseer branchseer merged commit 0cc4755 into main Feb 13, 2026
7 checks passed
@branchseer branchseer deleted the 02-10-feat_task_list_in_vp_run_ branch February 13, 2026 04:32
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