Skip to content

vscode: spec/plan review comments — polish pass (placeholders, reviews/ coverage, author identity, panel discoverability) #857

Description

@amrmelsayed

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:22syntax.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.prompt and controller.options.placeHolder set to Codev-specific strings; VS Code defaults no longer appear
  • codev/reviews/*.md files 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 @architect remains in plan-review.ts or commands/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 (canReply stays false — separate design decision; see follow-up)
  • Resolve state (separate, depends on storage-format decision)
  • Builder-side write convention (@builder handle, 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

Metadata

Metadata

Assignees

Labels

area/vscodeArea: VS Code extension

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions