Skip to content

[feature] Fuzzy picker for sp open #10

Closed

Description

@rwrife

Pitch: Typing full ids is friction. sp open (with no argument) launches an interactive fuzzy picker over live scratches; pick one, it opens.

Acceptance criteria

  • sp open with no id opens an interactive selector (name, age, expires-in, tags visible)
  • Keyboard-driven filter/fuzzy match; Enter opens the highlighted scratch in $EDITOR
  • Works without an external fzf dependency (use a Go TUI lib, e.g. bubbletea/huh), but detect and defer to fzf if present
  • Esc/Ctrl-C cancels cleanly with no changes
  • Degrades to a numbered prompt when not a TTY-capable terminal

Notes

  • Same idea can later extend to sp cat/sp rm/sp resurrect.

Activity

  1. rwrife commented on Jul 7, 2026

    @rwrife
    OwnerAuthor

    Opened #24 with the interactive fuzzy picker for sp open (bare, no id).

    Highlights: new stdlib-only internal/picker (fuzzy subsequence matcher + three front-ends → fzf when present, built-in filter prompt on a TTY, numbered fallback when piped), --no-fzf flag, and Esc/Ctrl-C/q cancels cleanly. All 5 acceptance criteria covered; 22 new tests, build/vet/test/gofmt/tidy all green.

    One deviation to flag: I used a dependency-light built-in prompt instead of bubbletea/huh (keeps go.mod untouched and the flow headlessly testable). Can swap in a full-screen TUI as a follow-up if preferred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature / backlog item

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions