Skip to content

[plan] Add fuzzy-searchable workflow selection with Huh #14020

@github-actions

Description

@github-actions

Objective

Enhance the gh aw run command with fuzzy-searchable workflow selection using Huh forms, making it easier to find and select workflows from large lists.

Context

Issue #14013 identified that workflow selection could benefit from interactive fuzzy search. This is particularly useful in repositories with many workflow files.

Approach

  1. Create selectWorkflow() function in pkg/cli/run.go
  2. Use huh.NewSelect() with Filtering(true) for fuzzy search
  3. Add keyboard navigation hints (↑/↓, /, Enter)
  4. Integrate with console.IsAccessibleMode() for accessibility
  5. Set appropriate height (15 rows) for comfortable browsing

Implementation Details

func selectWorkflow(workflows []string) (string, error) {
    options := make([]huh.Option[string], len(workflows))
    for i, workflow := range workflows {
        options[i] = huh.NewOption(workflow, workflow)
    }
    
    var selected string
    form := huh.NewForm(
        huh.NewGroup(
            huh.NewSelect[string]().
                Title("Select a workflow to run").
                Description("↑/↓ to navigate, / to search, Enter to select").
                Options(options...).
                Filtering(true).
                Height(15).
                Value(&selected),
        ),
    ).WithAccessible(console.IsAccessibleMode())
    
    return selected, form.Run()
}

Files to Modify

  • Update: pkg/cli/run.go - Add interactive workflow selection
  • Update: pkg/cli/run_command_test.go - Add tests for fuzzy search

Acceptance Criteria

  • Interactive workflow selection with fuzzy search
  • Clear keyboard navigation instructions
  • Accessibility mode support (list view without fancy UI)
  • TTY detection - skip interactive prompt when output is piped
  • Command-line argument takes precedence over interactive selection
  • Fuzzy search matches workflow names efficiently
  • Tests cover interactive selection and filtering
    Related to Terminal Stylist Analysis: Console Output Patterns in gh-aw #14013

AI generated by Plan Command for #14013

  • expires on Feb 8, 2026, 1:01 AM UTC

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions