Skip to content

feat(vscode): render submitted review comments across chat surfaces - #11173

Merged
marius-kilocode merged 2 commits into
mainfrom
functional-submarine
Jun 12, 2026
Merged

feat(vscode): render submitted review comments across chat surfaces#11173
marius-kilocode merged 2 commits into
mainfrom
functional-submarine

Conversation

@marius-kilocode

@marius-kilocode marius-kilocode commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Submitted review comments are currently serialized into the model prompt as Markdown, which makes subsequent session messages show implementation-oriented prompt text instead of the interactive review UI users started from.

This applies across the Kilo VS Code extension's shared chat experience, including both the sidebar chat and Agent Manager sessions. It preserves a validated, size-bounded review-comment payload alongside the existing model-visible Markdown and reuses the prompt's review cards when rendering user messages. The cards remain clickable for comment details and file navigation after optimistic submission, session reload, and cloud-session continuation, while failed sends restore both the editable prompt and its review comments.

Review-bearing input uses the normal message path rather than expanding slash commands, keeping the backend command API unchanged while making persisted review feedback consistent across extension chat surfaces.

file-6c80683f90910d1cb2dd53b39465e5f6

@marius-kilocode
marius-kilocode enabled auto-merge (squash) June 12, 2026 16:24
@marius-kilocode marius-kilocode changed the title feat(vscode): render submitted review comments interactively feat(vscode): render submitted review comments across chat surfaces Jun 12, 2026
if (data.comments.length === 0 || data.comments.length > LIMIT) return undefined

const comments: ReviewCommentData[] = []
for (const value of data.comments) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Variable value in the for loop shadows the outer value parameter of the view function.

The outer value is no longer needed past line 80, so this isn't a functional bug, but it's a style guideline violation (no-shadow) and could confuse readers. Consider using a different name like entry or raw.

Suggested change
for (const value of data.comments) {
for (const entry of data.comments) {

Reply with @kilocode-bot fix it to have Kilo Code address this issue.

mime: file.mime,
dataUrl: file.url,
}))
if (images.length === 0) return

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Early return when images.length === 0 is fine for skipping image restore, but it means if a failed message has review comments AND empty user text (review-only send), control reaches this point with review comments already restored but the textarea never gets focused (the textareaRef.focus() call on line 354 is only reached when draft is truthy). The user would need to manually click into the input.

Consider adding a focus call after the image block, or at least after replaceReviewComments:

if (failed.review) {
  replaceReviewComments(failed.review.comments)
  textareaRef?.focus()
}

Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-vscode/webview-ui/src/components/chat/PromptInput.tsx 365 After restoring review comments from a failed review-only send, textareaRef is never focused since draft is "" (falsy). User must click manually.

SUGGESTION

File Line Issue
packages/kilo-vscode/src/shared/review-comments.ts 85 for (const value of data.comments) shadows the outer value parameter of the view function.
Other Observations (not in diff)

No additional issues found in unchanged code.

Files Reviewed (11 files)
  • .changeset/calm-cats-review.md - no issues
  • packages/kilo-vscode/src/KiloProvider.ts - no issues
  • packages/kilo-vscode/src/kilo-provider/handlers/cloud-session.ts - no issues
  • packages/kilo-vscode/src/shared/review-comments.ts - 1 issue (variable shadowing)
  • packages/kilo-vscode/tests/unit/review-comments.test.ts - no issues
  • packages/kilo-vscode/webview-ui/src/components/chat/PromptInput.tsx - 1 issue (missing focus after review-only restore)
  • packages/kilo-vscode/webview-ui/src/components/chat/ReviewComments.tsx - no issues
  • packages/kilo-vscode/webview-ui/src/components/chat/TranscriptRow.tsx - no issues
  • packages/kilo-vscode/webview-ui/src/components/chat/VscodeUserMessage.tsx - no issues
  • packages/kilo-vscode/webview-ui/src/context/session.tsx - no issues
  • packages/kilo-ui/src/components/message-part.tsx - no issues

Fix these issues in Kilo Cloud


Reviewed by claude-4.6-sonnet-20260217 · 1,340,672 tokens

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit 555dc23 into main Jun 12, 2026
23 checks passed
@marius-kilocode
marius-kilocode deleted the functional-submarine branch June 12, 2026 16:45
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…ilo-Org#11173)

* feat(vscode): render submitted review comments interactively

* chore: update kilo-vscode visual regression baselines

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants