Skip to content

vscode: codev.openIssueByNumber quick-action + Cmd+K I keybinding for direct issue access #1096

Description

@amrmelsayed

Problem

Opening a specific GitHub issue by number in the Codev VS Code extension is a multi-step round-trip today:

  • Cmd+Shift+P to open the palette
  • Type "Codev: Search Backlog..."
  • The Quick Pick opens, populated from the live backlog
  • Type the issue number, scan the filtered rows, press Enter
  • The issue opens via codev.viewBacklogIssue

Two friction points compound:

  1. No direct "open #N" command. The existing codev.searchBacklog is a Quick Pick over the backlog rows; it filters by typed text but you still have to scan the filtered list and pick. There is no command that accepts a typed issue number and opens it directly, regardless of whether the issue is in the current backlog set.
  2. No keybinding on any issue command. package.json contributes.keybindings has zero entries for issue affordances. Every invocation goes through Cmd+Shift+P.

A related gap: the search-backlog approach only works on issues currently in the backlog set. Closed issues, archived issues, and arbitrary numbers (e.g. an issue you saw in a Slack link) cannot be opened through any Codev affordance.

Proposal

Two small additions:

A. New command: codev.openIssueByNumber

A direct-input command that:

  1. Prompts via vscode.window.showInputBox for an issue number (numeric validation, support #1234 and 1234 forms).
  2. Fetches the issue via the existing forge contract (the same path codev.viewBacklogIssue uses today). Works for open AND closed issues; not limited to the backlog set.
  3. Opens it in the preview via codev.viewBacklogIssue so the placement / focus / reuse behavior is identical to the sidebar-click path (which PR [AIR #1074] vscode: align backlog issue-preview placement with count-then-pick (remove focus side-effect) #1076 already aligned with the builder-terminal count-then-pick model).
  4. If the issue does not exist, surfaces a clean error message ("Codev: issue #1234 not found in this repository").

The command is palette-discoverable (Codev: Open Issue by Number...).

B. Default keybinding

Bind codev.openIssueByNumber to Cmd+K I / Ctrl+K I by default. Verified against bundled VS Code 1.125.0 default keybindings (vs-code-default-keybindings JSON at codebling/master): cmd+k i is unbound; cmd+k cmd+i is workbench.action.showHover (near-collision worth knowing, same pattern as Codev's existing Cmd+K B near-collision with setSelectionAnchor : the two chords are distinct in VS Code's grammar, the release-vs-hold of Cmd between keys differentiates them).

Why Cmd+K I specifically:

Plan-gate decisions to lock at plan-approval

  1. Input validation shape. Accept 1234, #1234, full URLs (https://github.com/owner/repo/issues/1234)? Lean: numeric + #-prefixed; URL parsing is a follow-up if real users paste links.
  2. Error message on not-found. Quick info message (transient) vs modal error vs status-bar drop. Lean: quick info; matches the existing affordance vocabulary.
  3. Cross-repo support. This codev workspace is bound to one forge / repo via .codev/config.json. Should the command accept owner/repo#1234 for cross-repo? Lean: no for v1; same-repo only; cross-repo is a separate concern.
  4. Should the command also accept PRs? GitHub treats issues and PRs as the same numeric space. Accepting 1091 and resolving to a PR preview if that's what the number is = useful. Lean: yes; route PRs to the PR-detail flow (codev.referencePRInArchitect's sibling viewer, or open the PR in browser if no preview surface). Bikeshed at plan.
  5. Keybinding default vs opt-in. Lean: ship Cmd+K I as the default; matches the precedent of Cmd+K B and Cmd+K A (both default-shipped). Users override in keybindings.json if it conflicts with their personal setup.

Acceptance criteria

  • codev.openIssueByNumber registered as a palette-discoverable command (title Codev: Open Issue by Number...).
  • Invoking it prompts via showInputBox for a numeric issue ID (accepting 1234 and #1234).
  • On valid input, the command fetches the issue via the existing forge contract used by codev.viewBacklogIssue and opens the preview. Works on issues NOT currently in the backlog set (closed, archived, arbitrary numbers).
  • Cmd+K I / Ctrl+K I bound as the default keybinding.
  • On a non-existent issue number, surfaces a clean error message; no exception leak.
  • Unit test for the input parser (1234, #1234, whitespace, empty, non-numeric all handled).
  • When-clause gating: keybinding active globally (not scoped to a particular editor / view); the command is universally useful.
  • No regression to codev.searchBacklog, codev.viewBacklogIssue, codev.openBacklogIssue, or the existing keybinding-free state of other issue commands.

Out of scope

  • A "search for issues" feature beyond what codev.searchBacklog already offers (this is direct-number-input, not search).
  • Cross-repo issue resolution.
  • Reverse-lookup for PRs (covered in plan-gate decision Installation Process Failures - Multiple Steps Being Skipped #4 if accepted).
  • Modifying the existing codev.searchBacklog Quick Pick behavior.
  • Status-bar entry for the issue action; the keybinding + palette is the v1 surface.

Protocol selection

Small, well-scoped, no design ambiguity beyond the five plan-gate items above (all locked leans). One new command + one new keybinding + parser tests. Roughly 60-100 LOC including tests.

  • AIR is the natural fit. Single-pass autonomy, review goes in the PR body.
  • BUGFIX is a poor fit (this is additive, not a bug fix).
  • PIR would be overkill (no design ambiguity worth a dev-approval gate; the existing sidebar-click and search-Quick-Pick flows already define the placement/focus behavior this command inherits).

Related

Metadata

Metadata

Assignees

No one assigned

    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