vscode: one-step view issue/PR from QuickPick + Cmd+K P Open PR by ID - #1399
Merged
Conversation
…iew, TowerClient.getPR
…ind -> target (QuickPickItem reserves kind)
…ltation) for pr-gate decision
…shifted chord is the built-in Copy Path of Active File)
amrmelsayed
added a commit
that referenced
this pull request
Aug 11, 2026
amrmelsayed
added a commit
that referenced
this pull request
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PIR Review: One-step "view issue N" / "view pr N" QuickPick type-ahead + Cmd+K Shift+P Open-PR-by-ID
Fixes #1179
Summary
Two additive VS Code navigation improvements sharing one code path. The backlog search
QuickPick now recognizes numeric input (
1350,#1350,issue 1350,view pr 1350) andprepends dynamic
View Issue #N/View PR #Nrows that fetch live and open in thebrowser, reaching issues outside the loaded backlog (closed, claimed) and PRs in one
gesture. A new
codev.openPRByIdcommand onCmd+K Shift+Pmirrorscodev.openIssueById,backed by a new forge-agnostic PR-fetch slice: the
pr-viewconcept now emits the PR'sbrowser
urlon all three forges, surfaced through Tower's newGET /api/pr, aPRViewwire type, and
TowerClient.getPR.Files Changed
apps/vscode/package.json(+9 / -0) — command declaration +ctrl+k shift+p/cmd+k shift+papps/vscode/src/__tests__/backlog-search.test.ts(+78 / -1) — grammar tableapps/vscode/src/__tests__/open-pr-by-id.test.ts(+95 / -0) — newapps/vscode/src/__tests__/search-backlog-quickpick.test.ts(+148 / -0) — newapps/vscode/src/commands/open-issue-by-id.ts(+30 / -13) — extractopenIssueInBrowserapps/vscode/src/commands/open-pr-by-id.ts(+67 / -0) — newapps/vscode/src/commands/search-backlog.ts(+64 / -11) —createQuickPick+ dynamic rowsapps/vscode/src/extension.ts(+3 / -1) — registercodev.openPRByIdapps/vscode/src/views/backlog-search.ts(+67 / -0) — type-ahead grammar helperspackages/codev/scripts/forge/github/pr-view.sh(+1 / -1) — addurlto--jsonpackages/codev/scripts/forge/gitlab/pr-view.sh(+4 / -1) — mapweb_url→urlpackages/codev/scripts/forge/gitea/pr-view.sh(+4 / -1) — maphtml_url→urlpackages/codev/src/agent-farm/servers/tower-routes.ts(+30 / -0) —GET /api/prpackages/codev/src/lib/forge-contracts.ts(+9 / -0) —PrViewResult.url?packages/codev/src/lib/github.ts(+23 / -2) —fetchPRpackages/sdk/src/tower-client.ts(+14 / -1) —getPRpackages/sdk/src/__tests__/tower-client.test.ts(+13 / -0) —getPRtestspackages/types/src/api.ts(+27 / -0) —PRViewwire typepackages/types/src/index.ts(+1 / -0) — exportcodev/plans/1179-vscode-one-step-view-issue-n-v.md(+201 / -0), thread log, porch stateCommits
55451226f[PIR vscode: one-step 'view issue N' / 'view pr N' from QuickPick + Cmd+K P for direct PR-by-ID open #1179] PR-fetch plumbing: pr-view url, fetchPR, GET /api/pr, PRView, TowerClient.getPR0689c8248[PIR vscode: one-step 'view issue N' / 'view pr N' from QuickPick + Cmd+K P for direct PR-by-ID open #1179] codev.openPRById command + Cmd+K P keybinding5608aa1cd[PIR vscode: one-step 'view issue N' / 'view pr N' from QuickPick + Cmd+K P for direct PR-by-ID open #1179] Backlog QuickPick type-ahead: dynamic View Issue/PR #N rows3d50408d0[PIR vscode: one-step 'view issue N' / 'view pr N' from QuickPick + Cmd+K P for direct PR-by-ID open #1179] Thread log: implement phase notes2a747cb52[PIR vscode: one-step 'view issue N' / 'view pr N' from QuickPick + Cmd+K P for direct PR-by-ID open #1179] dev-approval feedback: rename dynamic-row discriminator kind -> target (QuickPickItem reserves kind)9c5ced324plan draft and porchchore(porch)bookkeeping commits)Test Results
pnpm compile(tsc + eslint + esbuild) ✓;tsc --noEmitverifieddirectly after the
kind→targetfix; porchbuildcheck ✓pre-existing skips / 0 failed; sdk 75/75 (2 new
getPRtests); porchtestscheck ✓exercised the Command Palette and QuickPick flows; caught a real
tscerror my pipedcompile run had masked (see Lessons)
CODEV_PR_NUMBER=1398 sh packages/codev/scripts/forge/github/pr-view.shreturns title/url/state from GitHub
Architecture Updates
No arch changes —
GET /api/pr/TowerClient.getPR/fetchPRdeliberately mirror thealready-documented
GET /api/issue/getIssue/fetchIssuepattern (arch.md's forgesection documents the concept mechanism generically and already lists
pr-viewamong the15 concepts; it doesn't enumerate per-concept output fields or individual Tower routes).
Lessons Learned Updates
lessons-learned.md(UI/UX):vscode.QuickPickItemreserveskind(
QuickPickItemKindseparators) — a custom discriminator namedkindon a QuickPickitem type fails the
createQuickPick<T extends QuickPickItem>constraint; use adomain name like
target. Plus: dynamic rows injected viaonDidChangeValueneedalwaysShow: trueto survive the fuzzy filter.tailreports the filter's exit code) bit again in this project — my backgroundpnpm compile 2>&1 | tail -6reported success whiletscwas failing on thekindcollision; the human reviewer caught it at the gate. The lesson already exists; noting
the recurrence here rather than duplicating it.
Things to Look At During PR Review
originally planned
Ctrl+K P/Cmd+K Pshadowed a VS Code built-in. The issue said"verified P slot is free," but that verification (plan's included) only covered the
extension's own keybindings map; VS Code registers
workbench.action.files.copyPathOfActiveFileon exactly that chord (weight 200, nowhenclause — confirmed in the bundledworkbench.desktop.main.js), andextension-contributed keybindings outrank workbench ones. Resolution (human decision
at the pr gate): rebound to
Ctrl+K Shift+P/Cmd+K Shift+P— verified free acrossthe core workbench chord table (no shift-modified KeyP chord exists), built-in
extensions, and our own map, and it keeps the P-for-PR mnemonic the issue intended.
(PIR consultation is single-pass; the rebind itself was verified by the human reviewer,
not re-reviewed by the models.)
search-backlog.tsthe async browser-openhelpers are invoked bare inside the sync
onDidAcceptcallback, so anopenExternalrejection would be an unhandled rejection. Left as-is per house style (bare
fire-and-forget calls); both helpers handle their real failure modes (not connected /
not found) internally with toasts.
search-backlog.tsaccept-routing: dynamic rows are discriminated by'target' in picked— static
BacklogQuickPickItemrows never carrytarget, so the check is sound, butit's the one structural assumption tying the two item shapes together.
View Issue #NandView PR #N(ambiguous input);explicit
issue N/pr Nforms narrow to one.1350 fix(trailing text) deliberatelyyields no dynamic rows.
in-editor PR preview to degrade to (unlike the issue path's
viewBacklogIssuefallback).pr-view.shscripts gained ajqdependency (mirroring theirissue-view.shsiblings, which already use it). GitHub's script (the default) does not.loaded backlog row. Flagged in the plan as a deliberate scope cut.
How to Test Locally
afx dev pir-11791350→View Issue #1350+View PR #1350on top;Enter on the first opens the issue in the browser
view pr 1350→View PR #1350on top; Enter opens the PR in the browsertower→ normal filtering, no dynamic rowsCmd+K Shift+P→ InputBox;1398+ Enter opens PR [Spec 1380] artifact-canvas: horizontal multi-column reading mode #1398 in the browserCmd+K P(unshifted) still runs the built-in Copy Path of Active File999999→ warning toast, no crashCmd+K Iunchanged; backlog row Enter still opens the in-editor preview