Skip to content

vscode: Quick Pick command for searching the backlog #918

@amrmelsayed

Description

@amrmelsayed

Problem

The Backlog tree has no in-sidebar search. Users have:

For finding a specific issue by recall ("the one about webview... something") or by topic ("anything mentioning telemetry"), none of the above help. The sidebar-embedded-input path was closed as not-doable in pir-891 (VSCode's TreeView API has no <input> primitive). The full-webview Backlog path is tracked at #906 but is heavier-weight and orthogonal to a fast find-and-open affordance.

Proposal

Add a Quick Pick command — VSCode's first-class vscode.window.showQuickPick primitive, the same overlay UI that powers Cmd+P (Go to File), Cmd+Shift+P (Command Palette), Cmd+T (Go to Symbol), etc. Built-in fuzzy match, native styling, familiar keyboard nav. No webview, no TreeView limits.

Concretely:

  • Register command codev.searchBacklog (palette title: Codev: Search Backlog...).
  • Invoking it snapshots the current backlog from the shared overviewCache (same source BacklogProvider reads from — no new data path).
  • Maps each backlog item to a vscode.QuickPickItem:
    • label: #909 <issue title>
    • description: <area/label> · <#days> ago (if assignee present, append · @<assignee>)
    • detail: optional — possibly the issue body's first sentence, truncated to ~120 chars (decision left to implementation if it bloats the picker)
  • Calls vscode.window.showQuickPick(items, { placeHolder: 'Search backlog by id, title, area, assignee...', matchOnDescription: true, matchOnDetail: true }).
  • On selection: invoke codev.viewBacklogIssue with the chosen item's issue id (the same default action the sidebar row uses when single-clicked — views/backlog.ts:128-129). User gets the issue opened the same way they would via the sidebar.
  • No default keybinding — leave bindings to user preference (avoids conflicts with VSCode and other extensions). Command is discoverable via the palette.

Design decisions inside the AIR

A few small calls the implementer should pick during the AIR, with the recommended default noted:

  1. Filter scope vs the mine-only toggle: search always over the full backlog, not just mine-only. Searching is a discovery affordance; restricting it to the user's assigned set would surprise a user looking for an issue they didn't author. The mine-only toggle remains a tree affordance only.
  2. Snapshot vs live: snapshot at invoke time. Quick Pick is a one-shot; live-updating items while the user is typing is jittery and not what Cmd+P does either.
  3. Sort order: same as the tree (assigned-to-current-user first, then by area, then by issue number descending). Within fuzzy-match results VSCode handles ranking, but the input order matters when the user just opens the picker without typing.
  4. Closed issues: out — only open issues, matching the sidebar.
  5. alwaysShow: false: default — VSCode hides non-matches once the user types. (true would keep all rows visible which defeats the search.)

Acceptance

  • Codev: Search Backlog... appears in the command palette.
  • Invoking it opens a Quick Pick populated with every open backlog issue.
  • Typing fuzzy-filters by id, title, area, or assignee.
  • Selecting a row opens the same view that single-clicking the sidebar row would (the codev.viewBacklogIssue flow).
  • Esc / clicking outside dismisses with no side effect.
  • Works whether or not the Backlog sidebar view is visible/expanded.

Out of scope

Why AIR (not BUGFIX, not PIR, not SPIR)

  • BUGFIX is for bugs; this is a feature.
  • PIR's pre-PR running-app gate adds latency that isn't load-bearing here — the affordance is a discrete picker, easy to verify in the PR diff plus a manual five-second exercise.
  • SPIR's spec/plan ceremony is overkill for a ~60-100 LOC command registration with no architectural decisions.
  • AIR fits: small, well-scoped, no design ambiguity left after this issue body.

Metadata

Metadata

Assignees

Labels

area/vscodeArea: VS Code extension

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