Repository navigation
Closed
Labels
area/vscodeArea: VS Code extension
Description
Problem
Architect and builder terminal output constantly references issues and PRs by number (#915, PR #1402). In VS Code terminals these are not actionable: Cmd+click falls through to VS Code's workspace word search, which matches nothing and silently does nothing. Every reference costs a manual lookup.
Fix
Register a vscode.window.registerTerminalLinkProvider in the extension that claims #\d+ and PR #\d+ spans in all terminal lines and makes them Cmd+clickable. Claiming the span also stops VS Code's useless fallback search.
Click resolution (decided with the owner, 2026-08-12)
PR #N→ open the PR's forge page in the browser via the existinggetPRpath (vscode: one-step 'view issue N' / 'view pr N' from QuickPick + Cmd+K P for direct PR-by-ID open #1179). There is no in-editor PR preview (established in vscode: one-step 'view issue N' / 'view pr N' from QuickPick + Cmd+K P for direct PR-by-ID open #1179:openPRByIdwarns rather than degrading), so the browser is the only destination; the target setting below does not apply.- Bare
#N→ try the issue fetch first and open the built-in issue viewer (codev.viewBacklogIssue/ the vscode: codev.openIssueByNumber quick-action + Cmd+K I keybinding for direct issue access #1096 preview) — keeps the user in-editor, consistent with backlog-row clicks and the vscode: one-step 'view issue N' / 'view pr N' from QuickPick + Cmd+K P for direct PR-by-ID open #1179 QuickPick landing in the same surface. If the number resolves as a PR instead (issues and PRs share one number space on GitHub, so this is deterministic — never both), fall through to the PR browser-open. One click, no disambiguation prompt. - Setting:
codev.terminalLinks.issueTarget: editor | browser(defaulteditor) for users who prefer the browser for issues too. No modifier-key variants in v1. - Unresolvable numbers (forge down, number doesn't exist): warning toast, matching
openIssueById's failure grammar.
Scope
- New file in
apps/vscode/src/(link provider + resolution), registered inextension.ts— theopen-pr-by-id.ts/open-issue-by-id.tspattern and their fetch paths are the template; reuseopenIssueInBrowser/openPRInBrowser/viewBacklogIssuerather than new fetch code. - Tests: link detection (line-scan spans incl. multiple refs per line), resolution order (issue-first, PR fallback), setting behavior.
Out of scope (follow-up)
- Tower web dashboard terminals (xterm.js) need their own
registerLinkProvider— separate surface, adjacent to the web-terminal decoration issue Web terminal: orphaned dotted-underline file-path decorations litter the screen after TUI repaints #1217. File after this lands. - An in-editor PR preview surface (would let PRs honor the
editortarget) — only worth an issue if wanted on its own merits.
Metadata
Metadata
Assignees
Labels
area/vscodeArea: VS Code extension
Activity
amrmelsayed commentedon Aug 11, 2026
On it! Working on this with the PIR protocol (plan + dev-approval gates before PR).
[PIR #1412] Plan draft
[PIR #1412] Plan draft
[PIR #1412] Plan: rebase on main, correct extension.ts line refs
[PIR #1412] Clickable #N / PR #N terminal references
[PIR #1412] Tests: terminal ref detection and resolution routing
[PIR #1412] Add click feedback + drop redundant fetch on terminal ref…
[PIR #1412] Reword issueTarget setting: drop internal 'bare #N' jargon
[PIR #1412] Review + retrospective
[PIR #1412] Docs: amend plan for adopted latency approach; fix stale …
[PIR #1412] Update builder thread: consultation all-clear, pr gate pe…
docs(release-notes): clickable #N/PR #N terminal references (#1412, PR …
docs(changelog): clickable #N/PR #N terminal references (#1412, PR #1418