Repository navigation
vscode: spec/plan review comments — polish pass (placeholders, reviews/ coverage, author identity, panel discoverability) #857
Description
Context
packages/vscode/src/comments/plan-review.ts wires the native VS Code Comments API for codev/plans/*.md and codev/specs/*.md files. The primitive ships and works; this issue is a polish bundle that closes four small gaps in one PR.
Gaps
1. VS Code's default input placeholders surface instead of Codev wording
createCommentController(...) is called without options. The "+" input box shows VS Code defaults like Start discussion / Reply... — generic, doesn't reflect that this is a Codev review surface.
Fix: Set controller.options at construction time in plan-review.ts:41-44:
controller.options = {
prompt: 'Add review comment',
placeHolder: 'Type your review comment, then Submit',
};2. codev/reviews/*.md files are excluded
ELIGIBLE_PATH_REGEX = /\/codev\/(plans|specs)\// at plan-review.ts:33 — review files don't get the gutter +, so post-implementation review docs can't be commented on inline.
Fix: Extend regex to /\/codev\/(plans|specs|reviews)\//. No other code change needed; the existing refreshDoc / submitReviewComment / deleteReviewCommentByThread paths are path-agnostic.
3. Comment author is hardcoded to @architect
Both entry points hardcode the author:
plan-review.ts:144—<!-- REVIEW(@architect): ${body} -->commands/review.ts:22—syntax.wrap('REVIEW(@architect): ')
This is wrong for shared workspaces (multiple humans reviewing) and is also a footgun if/when builders get a parallel write surface (no convention exists for @builder handles, but at minimum the architect-side path shouldn't pretend everyone is the same person).
Fix: Read git config user.name once at activation and use it. Fall back to architect if unset.
const author = (await execFile('git', ['config', 'user.name'])).stdout.trim() || 'architect';Apply to both plan-review.ts:144 and commands/review.ts:22. Keep the snippet at snippets/review.json as-is (snippets can't expand shell commands; @architect stays as the template default).
4. Verify Comments panel discoverability
VS Code has a built-in Comments panel (bottom panel) that aggregates threads from all registered controllers. Verify that codev-review threads show up there by default. If they do, no action — document in the issue closure. If they don't, fix the controller wiring so they do (likely a small controller.commentingRangeProvider adjustment).
Acceptance criteria
-
controller.options.promptandcontroller.options.placeHolderset to Codev-specific strings; VS Code defaults no longer appear -
codev/reviews/*.mdfiles show the gutter+and accept REVIEW markers via the same flow as specs/plans - New REVIEW markers use the git-config user.name as the author (or fall back to
architect); no inline hardcoded@architectremains inplan-review.tsorcommands/review.ts - Existing
<!-- REVIEW(@architect): -->markers in committed files render unchanged (back-compat — the regex matches any@<name>, not just@architect) - Comments panel aggregation: confirmed working, or fixed if not
- No regression to existing review-comment workflow (add, delete, refresh-on-edit)
Out of scope
- Replies / threading (
canReplystaysfalse— separate design decision; see follow-up) - Resolve state (separate, depends on storage-format decision)
- Builder-side write convention (
@builderhandle, protocol-prompt updates — separate) - Gate integration ("Request Changes" path — separate, this issue is polish only)
- Any change to the snippet at
snippets/review.json
Related
- Review comment commands missing 'Codev:' prefix in Feature Contributions tab #839 — separate filed issue to rename
Submit review comment→Codev: Submit Review Comment(title fix; bundle into the same PR if convenient) - Existing wiring:
packages/vscode/src/comments/plan-review.ts,packages/vscode/src/commands/review.ts,packages/vscode/snippets/review.json
Activity
amrmelsayed commentedon May 27, 2026
On it! Working on this with the PIR protocol (plan + dev-approval gates before PR).
[PIR #857] Plan draft
[PIR #857] Plan revised — use OverviewData.currentUser for author
[PIR #857] Implement vscode review-comment polish
[PIR #857] Implement: thread log update
[PIR #857] Review + retrospective
[PIR #857] Update stale extension.ts comment for reviews/+dynamic author
docs(vscode-changelog): add #857 review-comment polish under [Unrelea…
Merge docs/vscode-changelog: vscode CHANGELOG entries for #793, #799, #…
[Spec 945][Phase: implement] feat: Phase 4 — e2e contract proof, exam…
[Spec 945][Phase: implement] feat: Phase 4 — e2e contract proof, exam…