vscode: editor-tab webview for rich backlog search (#920)#957
Merged
Conversation
…ing consistency
# Conflicts: # packages/vscode/src/extension.ts
amrmelsayed
added a commit
that referenced
this pull request
Jun 1, 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: VSCode editor-tab webview for rich backlog search
Fixes #920
Summary
Adds a "Search Backlog" editor-tab webview to the VSCode extension for exploratory backlog triage — opened from a 🔍 icon in the Backlog view's title bar. The panel filters open issues by Area / Assignee / Author, substring-searches title + body, sorts by column, and shows a match-count footer; rows open the issue or reference it in the architect chat. Data comes from a dedicated
issue-searchforge concept surfaced asGET /api/issue-search(kept separate fromissue-listso the always-on/api/overviewpayload stays body-free). It complements the always-on sidebar tree and the #918 Quick Pick rather than replacing either (and supersedes the closed #906).Preview
Files Changed
(
git diff --statagainst the merge-base — this PR's changes only)packages/types/src/api.ts(+35) —IssueSearchItem/IssueSearchResponsewire typespackages/types/src/index.ts(+2) — re-exportspackages/core/src/tower-client.ts(+23/−2) —searchIssues(workspace, state)client methodpackages/codev/src/agent-farm/servers/tower-routes.ts(+92) —GET /api/issue-search→handleIssueSearchpackages/codev/src/lib/github.ts(+26) —searchIssues()routing through theissue-searchconceptpackages/codev/src/lib/forge-contracts.ts(+7) — optionalIssueListItem.bodypackages/codev/src/lib/forge.ts(+1/−1) — registerissue-searchinKNOWN_CONCEPTSpackages/codev/scripts/forge/github/issue-search.sh(+13) — verified-herepackages/codev/scripts/forge/{gitlab,gitea,linear}/issue-search.sh(+19/+28/+49) — mirrored,packages/codev/src/__tests__/forge.test.ts(+9/−... ) — concept-count assertions 16→17packages/vscode/src/webviews/backlog-search-panel.ts(+204, new) — panel lifecycle, messaging, host-side filteringpackages/vscode/src/webviews/backlog-search.template.ts(+266, new) — HTML/CSS/client-JS templatepackages/vscode/src/views/backlog-filter.ts(+137) — puresearchBacklog/formatAgehelperspackages/vscode/src/extension.ts(+29/−...) —codev.openBacklogSearchcommand + widenedIssueCommandArgpackages/vscode/package.json(+10) — command + title-bar menu entrypackages/vscode/src/__tests__/backlog-filter.test.ts(+139) — search/sort/age unit testscodev/plans/920-*.md,codev/state/pir-920_thread.md— plan + builder threadCommits
(substantive
[PIR #920]commits; porchchore+ theorigin/mainmerge omitted)443c7a67Add GET /api/backlog-search endpoint + body-bearing data pathc9a5a973Add Search Backlog editor-tab webview panel + command4ab9806aTest searchBacklog filter/sort + formatAge helpers4fdb6194Extract webview markup/script to backlog-search.template.ts1ce709eeAdd inline 'reference in architect' action to search rows65ec47cbReplace parameterized issue-list with dedicated issue-search conceptb5da1395Rename backlog-search API to issue-search for resource-naming consistencyorigin/mainmerged in to keep the branch current with v3.1.6)Test Results
pnpm build(types / core / codev): ✓ passcheck-types✓,lint✓,esbuildbundle ✓,test:unit✓ — 192 tests (incl. ~20 newsearchBacklog/formatAgecases)nonexistent_checkwarnings are pre-existing onmain, unrelated to this change)issue-search.shexercised live here:state=open→ 93 issues withbodypresent;closed/all→ 200-capped,bodypresentdev-approvalgate after reviewing the running worktree (the gate exists precisely for the theme/result-size/filter-combination checks a PR diff can't catch).Architecture Updates
Updated
codev/resources/arch.md→ VS Code Extension › Key Design Decisions: added an "Editor-tab webviews (#920)" entry documenting the reusable pattern (editor-areaWebviewPanel, host-side filtering in vscode-free pure helpers so logic stays testable and issue bodies never reach the webview,*.template.tsmarkup with CSS-variables-only theming + nonce'd CSP, fed by the dedicatedissue-searchconcept). Did not add/api/issue-searchto the API table — that table covers Tower lifecycle/management endpoints and doesn't enumerate the overview/issue data reads (/api/overview,/api/issuearen't listed either), so adding it would be inconsistent.Lessons Learned Updates
Added two entries to
codev/resources/lessons-learned.md→ Architecture:issue-search), UI = feature ("Search Backlog"); don't mix vocabularies across the same data path.Things to Look At During PR Review
gitlab/gitea/linearissue-search.sh). Onlygithubwas empirically exercised (this repo's forge). The others are faithful mirrors of theirissue-list.shsiblings +body+ a state mapping, each with a⚠️ UNVERIFIEDheader naming exactly what to smoke-test (glab's--closed/--all, tea's--state/bodyfield, Linear'sstate.typefilter). They degrade safely — a forge whose concept errors returns null → "search unavailable" — so they can't silently misbehave, but they need a smoke-test by someone with those CLIs before being trusted.openreproduces the sidebar's PR-excluded backlog;closed/alldeliberately lift the PR-exclusion (a closed issue usually has a merged PR, so excluding would empty the list). Confirm that's the intended behavior.codev.openBacklogSearch(this panel) andcodev.searchBacklog(Quick Pick) live in the tree now — verified only the panel is in the title bar (one 🔍); the Quick Pick is palette-only. Both appear in the command palette with near-adjacent titles ("Search Backlog" vs "Search Backlog…") — acceptable, but a candidate for a future title tweak.extension.tsis tab-indented (the file's pre-existing style, repo-wide outlier); edits matched it deliberately — not a conversion. No formatter exists in the repo.How to Test Locally
pir-920→ View Diffcd .builders/pir-920 && pnpm -w run local-install— rebuilds + restarts Tower so it serves/api/issue-searchand resolves theissue-searchconcept.↪references it in the architect chat; footerN matches found · by-area breakdown; re-invoking focuses the single instance; theme sweep across dark / light / high-contrast (CSS variables only).Flaky Tests
None skipped. (The 13 pre-existing skips in the codev suite are unrelated to this change and were not touched.)