vscode: show issue # + title in Open Builder Terminal & Send Message pickers#951
Merged
Conversation
amrmelsayed
added a commit
that referenced
this pull request
May 31, 2026
amrmelsayed
added a commit
that referenced
this pull request
May 31, 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: Show issue # + title in the two outlier builder Quick Picks
Fixes #925
Summary
Two VSCode command-palette pickers — Codev: Open Builder Terminal and Codev: Send Message to Builder — rendered each builder as its bare internal id (
pir-1333), while the other seven builder pickers show#<issueId> <issueTitle>. The fix brings the two outliers in line. The non-obvious part: the two outliers readclient.getWorkspaceState(→Builder, which has noissueId/issueTitle), whereas the seven correct pickers readclient.getOverview(→OverviewBuilder, which has them) — so the issue's proposed one-line field swap would not have compiled. The implementation mirrors the existingrun-worktree-dev.tspattern: source display fields fromgetOverview, join back to the workspaceBuilder(forterminalIdand the canonical id the action needs) viaresolveAgentName, behind one shared pure helper.Files Changed
git diff --statvs merge-base (code only):packages/vscode/src/builder-pick-rows.ts(+75 / -0) — new pure helperbuildBuilderPickRows+ typespackages/vscode/src/__tests__/builder-pick-rows.test.ts(+95 / -0) — new, 6 unit testspackages/vscode/src/extension.ts(+10 / -7) —openBuilderTerminalpicker rewiredpackages/vscode/src/commands/send.ts(+11 / -6) —sendMessagepicker rewiredPlus protocol artifacts:
codev/plans/925-…md,codev/state/pir-925_thread.md,codev/projects/925-…/status.yaml.Commits
git log main..HEAD --oneline(excluding porch chore commits):e521c3cd[PIR vscode: 'Open Builder Terminal' and 'Send Message' Quick Picks show internal builder id instead of issue # + title #925] Plan draft991d311e[PIR vscode: 'Open Builder Terminal' and 'Send Message' Quick Picks show internal builder id instead of issue # + title #925] Render issue # + title in Open Terminal & Send Message pickersTest Results
tsc --noEmit+eslint+esbuild --production): ✓ passpnpm test:unit): ✓ 119 passed (6 new inbuilder-pick-rows.test.ts)porch done, implement phase): build ✓, tests ✓dev-approvalgate.Architecture Updates
No
arch.mdchanges needed. This reuses an existing pattern rather than introducing one: a picker that needs bothgetOverviewdisplay fields and agetWorkspaceState-only runtime field already exists (run-worktree-dev.ts), usinggetOverviewas the display source joined to the workspaceBuilderviaresolveAgentName(tail-match, becauseOverviewBuilder.idandBuilder.iddiffer in shape). The only new surface is a small pure helper that factors that join out of the two call sites — no module boundary or data-flow change.Lessons Learned Updates
No new entry added to
codev/resources/lessons-learned.md— the lesson here is a concrete instance of an existing one rather than a new principle:This PR is a textbook case: the issue body asserted both outliers sourced builders "from the same
getWorkspaceStateendpoint the seven correct pickers use, so the fields should already be populated." In fact the seven usegetOverview, andgetWorkspaceState'sBuildertype carries noissueId/issueTitle— so the proposed drop-inb.issueIdwas a compile error, not a mechanical swap. The audit table in a well-researched issue can still mis-state the data source; confirm the actual endpoint/type before trusting a "~10 LOC mechanical" framing. Recording the specifics here keeps the curated lessons file from accumulating a near-duplicate of 0059.(Also relevant: memory
reference_overview_builder_dual_type— the overview-builder shape is defined twice. The helper sidesteps this by accepting structural minimal interfaces rather than importing a concrete type, so it couples to neither definition.)Things to Look At During PR Review
codev/plans/925-…mdlacked the repo's approved-plan YAML frontmatter (approved:/validated:); it explicitly confirmed the implementation itself is sound (passed its localpnpm check-types+pnpm lint). Fixed by adding the frontmatter to the plan, matching the Needs Attention: surface PRs via the universal pr gate; delete gateless builder-derived fallbacks #927 precedent on main. Not a code defect, so no regression test applies. PIR is single-pass — this fix was not independently re-reviewed by the models; flagged to the architect for verification at theprgate.resolveAgentNamejoin (builder-pick-rows.ts) is the crux. It matches an overview id (pir-925) to a workspace id (builder-pir-925) by tail-match, not===. A builder that fails to join, or whose joinedBuilderhas noterminalId, is dropped from the picker — this intentionally preserves the outliers' originalfilter(b => b.terminalId)"only builders with a live terminal" semantics. Verified by the "excludes no-terminal" and "excludes no-match" unit tests.openBuilderis still passedCodev: ${name}(the builder name), not the new friendly label — so only the picker row changes, the resulting tab name is unchanged. vscode: 'Open Builder Terminal' and 'Send Message' Quick Picks show internal builder id instead of issue # + title #925 scopes the picker row only.getOverview+getWorkspaceStateconcurrently viaPromise.all.getOverviewis served from a 30s-TTL cache (overview.ts), so the common case is a cache hit; the picker is a cold, user-initiated path regardless. This matches whatrun-worktree-dev.tsalready does (it issues both, sequentially).How to Test Locally
For reviewers pulling the branch:
pir-925→ View Diffafx devdoes not apply — use the Extension Development Host): open the worktree in VSCode, press F5 ("Run Codev Extension"), and in the dev-host window open your main Codev checkout (the workspace Tower tracks, so the picker is populated).Codev: Open Builder Terminal…→ rows read#<id> <title>with<phase>in the description; picking opens the right terminal (tab titleCodev: <name>).Codev: Send Message(or Cmd+K D) → same row format; sending reaches the right builder.Codev: Cleanup Builderstill renders the same format (no regression to the seven).issueIdfalls back to#<id>.