Skip to content

feat(vscode): Agent Manager PR View Panel - #12961

Merged
cosi-conda merged 57 commits into
mainfrom
feature/am-pr-view
Aug 10, 2026
Merged

feat(vscode): Agent Manager PR View Panel#12961
cosi-conda merged 57 commits into
mainfrom
feature/am-pr-view

Conversation

@cosi-conda

@cosi-conda cosi-conda commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Issue

Agent Manager - PR View Panel — Phase 1

Adds a PR details panel to the Agent Manager worktree view, displayed alongside the existing code diff panel.

Context

Features

  • PR panel accessible from a new pull-request icon button in the tab bar, positioned before the code diff (layers) button
  • Panel shows PR title, state, description, file changes (+X/−Y), CI checks with status and duration, review comments (copy-able), and reviewers
  • External link to open the PR in browser
  • PR badge on worktree sidebar items shows state (open, draft, merged, closed) with CI check status indicator
  • Code diff (layers) button shows the PR's +X/−Y line changes
  • GitHub authentication error toast with instructions when gh CLI auth is missing
  • PR status auto-recovers after re-authenticating via gh auth login
  • PR status polled via the existing gh CLI polling infrastructure (PRStatusPoller) — no new polling mechanism introduced. PR status polled via gh CLI (15s interval, full sync every 2 min)

Phase 2 (not in this PR)

  • Actions: merge, approve, restart workflows, auto-resolve comments, and add code diff by comments for better context

Primary Use Case

The agent creates a PR during a session. The user wants to monitor it — CI status, review comments, checks — without leaving Agent Manager. The PR panel opens automatically (or via a toolbar button) tied to that session, for both worktree and local branch workflows.

Implementation

This implementation leverages the existing Github poller functionality in Agent Manager to obtain PR data associated with a worktree, and render it in the side panel.

Screenshots / Video

Before:
image

After:
Screenshot 2026-08-06 at 10 49 46 AM
Screenshot 2026-08-05 at 9 10 41 AM
Screenshot 2026-08-05 at 9 11 43 AM
Screenshot 2026-08-06 at 11 30 05 AM
Screenshot 2026-08-05 at 9 10 50 AM

Update based on PR feedback:

The reviewer status now shows at the top instead of a count, since the reviewers could also be unassigned commenters, or also more than the required minimum, which would make the total count confusing in different contexts. This solution solves that:
Screenshot 2026-08-07 at 10 17 51 AM
Screenshot 2026-08-07 at 10 17 59 AM

Removed the file changes section to include them in the top of the summary, as we didn't pull the code diff in this pr panel (it's in the code diff panel):
Screenshot 2026-08-07 at 10 26 59 AM

Addressed button style:
Screenshot 2026-08-07 at 10 34 37 AM
Screenshot 2026-08-07 at 10 34 42 AM
Screenshot 2026-08-07 at 10 35 08 AM

Show a toast if missing gh auth:
Screenshot 2026-08-06 at 10 48 15 AM

How to Test

Manual/local verification

  1. bun run extension
  2. Open Agent Manager
  3. Ensure you have gh auth via gh auth login
  4. Create a worktree if none exist, and import a PR
  5. Click "Open" on import, or click on an existing worktree to see the associate PR button on the right-hand-side, which opens the panel in the screenshot.

Checklist

  • Issue linked above, or exception explained
  • Tests/verification described
  • Screenshots/video included for visual changes, or marked N/A
  • Changeset considered for user-facing changes
  • I personally reviewed the diff and can explain the changes, including any AI-assisted work.

Comment thread packages/kilo-vscode/webview-ui/agent-manager/default-base-branch.tsx Outdated
Comment thread packages/kilo-vscode/webview-ui/src/context/session-merge.ts
@cosi-conda
cosi-conda marked this pull request as ready for review August 6, 2026 22:29
Comment thread packages/kilo-vscode/src/agent-manager/PRStatusPoller.ts Outdated
Comment thread packages/kilo-vscode/src/agent-manager/PRStatusPoller.ts Outdated
Comment thread packages/kilo-vscode/src/agent-manager/pr-status-bridge.ts
Comment thread packages/kilo-vscode/src/agent-manager/pr-status-bridge.ts
Comment thread packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx
Comment thread packages/kilo-vscode/webview-ui/agent-manager/pr/PRPanel.tsx Outdated
Comment thread packages/kilo-vscode/webview-ui/agent-manager/pr/PRChecks.tsx Outdated
Comment thread packages/kilo-vscode/webview-ui/agent-manager/pr/CopyButton.tsx
Comment thread packages/kilo-vscode/tests/unit/am-pr-status-bridge.test.ts
@kilo-code-bot

kilo-code-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 8 Issues Found | Recommendation: Address before merge

Incremental review at e532519 (previous: 95c361e). The new commits resolve six open findings, all verified against current code: the change-detection hash now covers title and the full body (PRStatusPoller.ts), reviewer fetch uses reviews(last: 20) and logs failures (PRStatusPoller.ts), togglePRPanel now routes through closeReviewTab() (AgentManagerApp.tsx), the dead check link is now a working openExternal button with tooltip and aria-label (PRChecks.tsx), and the redundant nested MarkedProvider was removed (PRPanel.tsx — markdown consumers remain covered by the root provider in provider-shell.tsx). No new issues in the changed code. The 8 remaining findings sit in code untouched by this round and stay open.

Overview

Severity Count
CRITICAL 0
WARNING 3
SUGGESTION 5

One non-blocking note: the PR still adds no .changeset for the feature itself (user-facing; suggest minor for kilo-code).

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 2663 Switching selection to a target without a PR leaves an empty, unclosable side panel
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 2668 PR panel fully remounts on every PR-status message for any worktree (scroll reset, markdown re-parse)
packages/kilo-vscode/webview-ui/agent-manager/pr/CopyButton.tsx 8 Clipboard write not awaited/caught (false success + unhandled rejection); reset timer leaks on unmount and stacks on re-click

SUGGESTION

File Line Issue
packages/kilo-vscode/src/agent-manager/pr-status-bridge.ts 84 Webview-supplied url passed to openExternal unvalidated (no typeof/scheme check)
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 577 open_pull_request metric fires when closing the panel; event name now ambiguous across two actions
packages/kilo-vscode/webview-ui/agent-manager/pr/PRSummary.tsx 45 file/+/− stats hidden for PRs with no checks, review decision, or comments (gated by rows().length > 0)
packages/kilo-vscode/webview-ui/src/types/messages/extension-messages.ts 1052 "fetch_failed" admitted by the type but has no i18n keys — a future send would render raw key strings
packages/kilo-vscode/tests/unit/am-pr-status-bridge.test.ts 24 updateWorktreePR noop never asserted — success-path call could regress undetected
Files Reviewed (5 files this round)

Changed this round:

  • packages/kilo-vscode/src/agent-manager/PRStatusPoller.ts - hash covers title+full body, reviews(last: 20), reviewer fetch failures logged (3 previous findings resolved); no new issues
  • packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx - togglePRPanel uses closeReviewTab() (previous WARNING resolved); no new issues
  • packages/kilo-vscode/webview-ui/agent-manager/pr/PRChecks.tsx - dead link replaced with accessible openExternal button (previous WARNING resolved); no new issues
  • packages/kilo-vscode/webview-ui/agent-manager/pr/PRPanel.tsx - redundant nested MarkedProvider removed (previous WARNING resolved); no new issues
  • packages/kilo-vscode/webview-ui/src/context/provider-shell.tsx - comment documenting root MarkedProvider requirement; no issues

Carried findings (still open, unchanged code, re-verified): see Issue Details above.

Previous Review Summaries (6 snapshots, latest commit 95c361e)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 95c361e)

Status: 14 Issues Found | Recommendation: Address before merge

Incremental review at 95c361e (previous: cc397bb). The new commits resolve both open backend findings: the change-detection hash now covers reviewer login+state and body length (PRStatusPoller.ts), and lastErrorNotified is cleared on the first successful poll after an outage (pr-status-bridge.ts) — both verified against current code. One residual gap in the new hash raised as a suggestion. The 13 remaining findings sit in files untouched by this round and stay open.

Overview

Severity Count
CRITICAL 0
WARNING 6
SUGGESTION 8

One non-blocking note: the PR still adds no .changeset for the feature itself (user-facing; suggest minor for kilo-code).

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 2663 Switching selection to a target without a PR leaves an empty, unclosable side panel
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 2668 PR panel fully remounts on every PR-status message for any worktree (scroll reset, markdown re-parse)
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 570 togglePRPanel bypasses closeReviewTab() — skips focus restore and leaves a stale Review tab
packages/kilo-vscode/webview-ui/agent-manager/pr/PRPanel.tsx 26 Nested MarkedProvider permanently accumulates duplicate tokenizers on the global marked singleton per mount
packages/kilo-vscode/webview-ui/agent-manager/pr/PRChecks.tsx 41 Check link is dead (preventDefault with no handler; webviews drop anchor navigation) and has no accessible name
packages/kilo-vscode/webview-ui/agent-manager/pr/CopyButton.tsx 8 Clipboard write not awaited/caught (false success + unhandled rejection); reset timer leaks on unmount and stacks on re-click

SUGGESTION

File Line Issue
packages/kilo-vscode/src/agent-manager/PRStatusPoller.ts 276 NEW: hash covers body by length only and omits title — same-length body edits and PR renames never reach the webview
packages/kilo-vscode/src/agent-manager/PRStatusPoller.ts 446 reviews(first: 20) reads the oldest 20 reviews — stale reviewer states on heavily-reviewed PRs
packages/kilo-vscode/src/agent-manager/PRStatusPoller.ts 472 fetchReviewers swallows errors silently, unlike fetchComments which logs — failures invisible
packages/kilo-vscode/src/agent-manager/pr-status-bridge.ts 84 Webview-supplied url passed to openExternal unvalidated (no typeof/scheme check)
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 577 open_pull_request metric fires when closing the panel; event name now ambiguous across two actions
packages/kilo-vscode/webview-ui/agent-manager/pr/PRSummary.tsx 45 file/+/− stats hidden for PRs with no checks, review decision, or comments (gated by rows().length > 0)
packages/kilo-vscode/webview-ui/src/types/messages/extension-messages.ts 1052 "fetch_failed" admitted by the type but has no i18n keys — a future send would render raw key strings
packages/kilo-vscode/tests/unit/am-pr-status-bridge.test.ts 24 updateWorktreePR noop never asserted — success-path call could regress undetected
Files Reviewed (2 files this round)

Changed this round:

  • packages/kilo-vscode/src/agent-manager/PRStatusPoller.ts - hash now covers reviewer login+state and body length (previous WARNING resolved); 1 new suggestion on residual gaps
  • packages/kilo-vscode/src/agent-manager/pr-status-bridge.ts - lastErrorNotified cleared on successful poll (previous WARNING resolved); no new issues

Carried findings (still open, files unchanged this round): see Issue Details above.

Previous review (commit cc397bb)

Status: 15 Issues Found | Recommendation: Address before merge

Incremental review at cc397bb (previous: d074e0e). The only new commit moves the three Kilo-added icons (circle-x-outline, pull-request, refresh) out of shared upstream packages/ui into the Kilo-owned packages/kilo-ui registry — good fork hygiene. Verified: every consumer of these names imports Icon from @kilocode/kilo-ui/icon, no direct @opencode-ai/ui/icon consumer references them, path data and viewBox are identical (rendering unchanged), and the kilo-ui IconProps name union is preserved. No new issues found. The 15 previous findings sit in files untouched by this round and remain open.

Overview

Severity Count
CRITICAL 0
WARNING 8
SUGGESTION 7

One non-blocking note: the PR still adds no .changeset for the feature itself (user-facing; suggest minor for kilo-code).

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-vscode/src/agent-manager/PRStatusPoller.ts 275 Hash covers only reviewers.length — reviewer state/content and body changes never pushed to the webview
packages/kilo-vscode/src/agent-manager/pr-status-bridge.ts 104 lastErrorNotified never cleared on recovery — stale error toasts replay on webview remount; future same-type outages muted
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 2663 Switching selection to a target without a PR leaves an empty, unclosable side panel
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 2668 PR panel fully remounts on every PR-status message for any worktree (scroll reset, markdown re-parse)
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 570 togglePRPanel bypasses closeReviewTab() — skips focus restore and leaves a stale Review tab
packages/kilo-vscode/webview-ui/agent-manager/pr/PRPanel.tsx 26 Nested MarkedProvider permanently accumulates duplicate tokenizers on the global marked singleton per mount
packages/kilo-vscode/webview-ui/agent-manager/pr/PRChecks.tsx 41 Check link is dead (preventDefault with no handler; webviews drop anchor navigation) and has no accessible name
packages/kilo-vscode/webview-ui/agent-manager/pr/CopyButton.tsx 8 Clipboard write not awaited/caught (false success + unhandled rejection); reset timer leaks on unmount and stacks on re-click

SUGGESTION

File Line Issue
packages/kilo-vscode/src/agent-manager/PRStatusPoller.ts 445 reviews(first: 20) reads the oldest 20 reviews — stale reviewer states on heavily-reviewed PRs
packages/kilo-vscode/src/agent-manager/PRStatusPoller.ts 471 fetchReviewers swallows errors silently, unlike fetchComments which logs — failures invisible
packages/kilo-vscode/src/agent-manager/pr-status-bridge.ts 84 Webview-supplied url passed to openExternal unvalidated (no typeof/scheme check)
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 577 open_pull_request metric fires when closing the panel; event name now ambiguous across two actions
packages/kilo-vscode/webview-ui/agent-manager/pr/PRSummary.tsx 45 file/+/− stats hidden for PRs with no checks, review decision, or comments (gated by rows().length > 0)
packages/kilo-vscode/webview-ui/src/types/messages/extension-messages.ts 1052 "fetch_failed" admitted by the type but has no i18n keys — a future send would render raw key strings
packages/kilo-vscode/tests/unit/am-pr-status-bridge.test.ts 24 updateWorktreePR noop never asserted — success-path call could regress undetected
Files Reviewed (2 files this round)

Changed this round:

  • packages/kilo-ui/src/components/icon.tsx - adds circle-x-outline, pull-request, refresh to the Kilo-owned registry; no issues
  • packages/ui/src/components/icon.tsx - removes the same three kilocode_change icons from the shared upstream file; no issues

Carried findings (still open, files unchanged this round): see Issue Details above.

Previous review (commit d074e0e)

Status: 15 Issues Found | Recommendation: Address before merge

Incremental review at d074e0e (previous: 2dc7442). The branch merged main in; the only PR-specific commit is d074e0e, which ports main's withoutResolvedSessionErrors handling into the PR-extracted mergeMessages in session-merge.ts. The ported logic is identical to main's inline version (verified line-by-line against main), and the sole call site only passes "prepend"/"reconcile", so the new kept computation is always used. No new issues found. The 15 previous findings sit in files untouched by this round (extension-messages.ts received an unrelated eventID line from the main merge; its carried finding was re-verified at HEAD) and remain open.

Overview

Severity Count
CRITICAL 0
WARNING 8
SUGGESTION 7

One non-blocking note: the PR still adds no .changeset for the feature itself (user-facing; suggest minor for kilo-code).

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-vscode/src/agent-manager/PRStatusPoller.ts 275 Hash covers only reviewers.length — reviewer state/content and body changes never pushed to the webview
packages/kilo-vscode/src/agent-manager/pr-status-bridge.ts 104 lastErrorNotified never cleared on recovery — stale error toasts replay on webview remount; future same-type outages muted
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 2663 Switching selection to a target without a PR leaves an empty, unclosable side panel
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 2668 PR panel fully remounts on every PR-status message for any worktree (scroll reset, markdown re-parse)
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 570 togglePRPanel bypasses closeReviewTab() — skips focus restore and leaves a stale Review tab
packages/kilo-vscode/webview-ui/agent-manager/pr/PRPanel.tsx 26 Nested MarkedProvider permanently accumulates duplicate tokenizers on the global marked singleton per mount
packages/kilo-vscode/webview-ui/agent-manager/pr/PRChecks.tsx 41 Check link is dead (preventDefault with no handler; webviews drop anchor navigation) and has no accessible name
packages/kilo-vscode/webview-ui/agent-manager/pr/CopyButton.tsx 8 Clipboard write not awaited/caught (false success + unhandled rejection); reset timer leaks on unmount and stacks on re-click

SUGGESTION

File Line Issue
packages/kilo-vscode/src/agent-manager/PRStatusPoller.ts 445 reviews(first: 20) reads the oldest 20 reviews — stale reviewer states on heavily-reviewed PRs
packages/kilo-vscode/src/agent-manager/PRStatusPoller.ts 471 fetchReviewers swallows errors silently, unlike fetchComments which logs — failures invisible
packages/kilo-vscode/src/agent-manager/pr-status-bridge.ts 84 Webview-supplied url passed to openExternal unvalidated (no typeof/scheme check)
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 577 open_pull_request metric fires when closing the panel; event name now ambiguous across two actions
packages/kilo-vscode/webview-ui/agent-manager/pr/PRSummary.tsx 45 file/+/− stats hidden for PRs with no checks, review decision, or comments (gated by rows().length > 0)
packages/kilo-vscode/webview-ui/src/types/messages/extension-messages.ts 1052 "fetch_failed" admitted by the type but has no i18n keys — a future send would render raw key strings
packages/kilo-vscode/tests/unit/am-pr-status-bridge.test.ts 24 updateWorktreePR noop never asserted — success-path call could regress undetected
Files Reviewed (1 file this round)

Changed this round:

  • packages/kilo-vscode/webview-ui/src/context/session-merge.ts - ports main's withoutResolvedSessionErrors into the extracted mergeMessages; identical to main's logic, no issues

Carried findings (still open, files unchanged this round): see Issue Details above.

Previous review (commit 2dc7442)

Status: 15 Issues Found | Recommendation: Address before merge

Incremental review at 2dc7442 (previous: c313dc4). The single new commit adds required kilocode_change markers to three Kilo-added icon entries (circle-x-outline, pull-request, refresh) in the shared packages/ui icon registry — comment-only, no logic change, correct fork hygiene. No new issues found. The 15 previous findings sit in files untouched by this round; anchors spot-reverified at HEAD and still open.

Overview

Severity Count
CRITICAL 0
WARNING 8
SUGGESTION 7

One non-blocking note: the PR still adds no .changeset for the feature itself (user-facing; suggest minor for kilo-code).

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-vscode/src/agent-manager/PRStatusPoller.ts 275 Hash covers only reviewers.length — reviewer state/content and body changes never pushed to the webview
packages/kilo-vscode/src/agent-manager/pr-status-bridge.ts 104 lastErrorNotified never cleared on recovery — stale error toasts replay on webview remount; future same-type outages muted
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 2663 Switching selection to a target without a PR leaves an empty, unclosable side panel
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 2668 PR panel fully remounts on every PR-status message for any worktree (scroll reset, markdown re-parse)
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 570 togglePRPanel bypasses closeReviewTab() — skips focus restore and leaves a stale Review tab
packages/kilo-vscode/webview-ui/agent-manager/pr/PRPanel.tsx 26 Nested MarkedProvider permanently accumulates duplicate tokenizers on the global marked singleton per mount
packages/kilo-vscode/webview-ui/agent-manager/pr/PRChecks.tsx 41 Check link is dead (preventDefault with no handler; webviews drop anchor navigation) and has no accessible name
packages/kilo-vscode/webview-ui/agent-manager/pr/CopyButton.tsx 8 Clipboard write not awaited/caught (false success + unhandled rejection); reset timer leaks on unmount and stacks on re-click

SUGGESTION

File Line Issue
packages/kilo-vscode/src/agent-manager/PRStatusPoller.ts 445 reviews(first: 20) reads the oldest 20 reviews — stale reviewer states on heavily-reviewed PRs
packages/kilo-vscode/src/agent-manager/PRStatusPoller.ts 471 fetchReviewers swallows errors silently, unlike fetchComments which logs — failures invisible
packages/kilo-vscode/src/agent-manager/pr-status-bridge.ts 84 Webview-supplied url passed to openExternal unvalidated (no typeof/scheme check)
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 577 open_pull_request metric fires when closing the panel; event name now ambiguous across two actions
packages/kilo-vscode/webview-ui/agent-manager/pr/PRSummary.tsx 45 file/+/− stats hidden for PRs with no checks, review decision, or comments (gated by rows().length > 0)
packages/kilo-vscode/webview-ui/src/types/messages/extension-messages.ts 1051 "fetch_failed" admitted by the type but has no i18n keys — a future send would render raw key strings
packages/kilo-vscode/tests/unit/am-pr-status-bridge.test.ts 24 updateWorktreePR noop never asserted — success-path call could regress undetected
Files Reviewed (1 file this round)

Changed this round:

  • packages/ui/src/components/icon.tsx - kilocode_change markers added to three Kilo-added icon entries; comment-only, no issues

Carried findings (still open, files unchanged this round): see Issue Details above.

Previous review (commit c313dc4)

Status: 15 Issues Found | Recommendation: Address before merge

Incremental review at c313dc4 (previous: baf5685). The single new commit changes the checkStatus default for unrecognized states from "cancelled" to "pending" — resolving the previous am-pr-utils.ts suggestion (unknown states now aggregate to pending instead of success, and the change matches the existing test at am-pr-utils.test.ts:180). No new issues found. The remaining 15 findings sit in files untouched by this round and remain open.

Overview

Severity Count
CRITICAL 0
WARNING 8
SUGGESTION 7

One non-blocking note: the PR still adds no .changeset for the feature itself (user-facing; suggest minor for kilo-code).

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-vscode/src/agent-manager/PRStatusPoller.ts 275 Hash covers only reviewers.length — reviewer state/content and body changes never pushed to the webview
packages/kilo-vscode/src/agent-manager/pr-status-bridge.ts 104 lastErrorNotified never cleared on recovery — stale error toasts replay on webview remount; future same-type outages muted
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 2663 Switching selection to a target without a PR leaves an empty, unclosable side panel
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 2668 PR panel fully remounts on every PR-status message for any worktree (scroll reset, markdown re-parse)
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 570 togglePRPanel bypasses closeReviewTab() — skips focus restore and leaves a stale Review tab
packages/kilo-vscode/webview-ui/agent-manager/pr/PRPanel.tsx 26 Nested MarkedProvider permanently accumulates duplicate tokenizers on the global marked singleton per mount
packages/kilo-vscode/webview-ui/agent-manager/pr/PRChecks.tsx 41 Check link is dead (preventDefault with no handler; webviews drop anchor navigation) and has no accessible name
packages/kilo-vscode/webview-ui/agent-manager/pr/CopyButton.tsx 8 Clipboard write not awaited/caught (false success + unhandled rejection); reset timer leaks on unmount and stacks on re-click

SUGGESTION

File Line Issue
packages/kilo-vscode/src/agent-manager/PRStatusPoller.ts 445 reviews(first: 20) reads the oldest 20 reviews — stale reviewer states on heavily-reviewed PRs
packages/kilo-vscode/src/agent-manager/PRStatusPoller.ts 471 fetchReviewers swallows errors silently, unlike fetchComments which logs — failures invisible
packages/kilo-vscode/src/agent-manager/pr-status-bridge.ts 84 Webview-supplied url passed to openExternal unvalidated (no typeof/scheme check)
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 577 open_pull_request metric fires when closing the panel; event name now ambiguous across two actions
packages/kilo-vscode/webview-ui/agent-manager/pr/PRSummary.tsx 45 file/+/− stats hidden for PRs with no checks, review decision, or comments (gated by rows().length > 0)
packages/kilo-vscode/webview-ui/src/types/messages/extension-messages.ts 1051 "fetch_failed" admitted by the type but has no i18n keys — a future send would render raw key strings
packages/kilo-vscode/tests/unit/am-pr-status-bridge.test.ts 24 updateWorktreePR noop never asserted — success-path call could regress undetected
Files Reviewed (1 file this round)

Changed this round:

  • packages/kilo-vscode/src/agent-manager/am-pr-utils.ts - checkStatus default for unknown states changed "cancelled""pending"; resolves the previous suggestion, no new issues

Carried findings (still open, files unchanged this round): see Issue Details above.

Previous review (commit baf5685)

Status: 16 Issues Found | Recommendation: Address before merge

Incremental review at baf5685 (previous: db13315). New commits: skipped checks are now excluded from the checks total, checkStatus gains NEUTRAL→success / ACTION_REQUIRED→failure mappings and a pendingcancelled default change, and two dead files (default-base-branch.tsx, PRFileChanges.tsx) were deleted — verified zero remaining imports and the am-default-base-branch CSS is still used by DefaultBaseBranchDialog.tsx/ProjectBranchDialog.tsx. One new suggestion raised on the changed checkStatus default. All 15 previous findings re-verified against current HEAD (the three PRStatusPoller.ts findings were re-read directly; the rest sit in files untouched by this round).

Overview

Severity Count
CRITICAL 0
WARNING 8
SUGGESTION 8

One non-blocking note: the PR still adds no .changeset for the feature itself (user-facing; suggest minor for kilo-code).

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-vscode/src/agent-manager/PRStatusPoller.ts 275 Hash covers only reviewers.length — reviewer state/content and body changes never pushed to the webview
packages/kilo-vscode/src/agent-manager/pr-status-bridge.ts 104 lastErrorNotified never cleared on recovery — stale error toasts replay on webview remount; future same-type outages muted
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 2663 Switching selection to a target without a PR leaves an empty, unclosable side panel
packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx 2668 PR panel fully remounts on every PR-status message for any worktree (scroll reset, markdown re-parse)
`packages/kilo-vscode/webview-ui/agent-manager/AgentManager

[Snapshot truncated.]

Additional previous summary content was truncated to keep this comment within platform limits.


Reviewed by kimi-k3 · Input: 51.7K · Output: 21.2K · Cached: 2.2M

Review guidance: REVIEW.md from base branch main

@marius-kilocode

Copy link
Copy Markdown
Collaborator

@cosi-conda looks really good and useful, I gave this a quick spin and here a few suggestion:

1 bug:

If you open the pr overview then switch to a worktree without PR, the PR view shows empty and cannot be untoggled.

A couple of suggestions regarding the UI:

The cards on the worktrees look like a regression, they are missing now the PR number, or was that intentional?

image dyn-720c1199c8d78a5b2550cf064fe37aa8 image It would be nice if the color theme of the pr button on the top right was more consistent with our other buttons there. I think I recently added a skill for that, maybe that can help. Colors and size seem different. We can change the size of all buttons if you want but then we should do it consistently. We also show the PR icon now 3 times but in each of the appearances the button has a different color. It would be great if users had one consistent button or ui that indicates the status. Existing PR badges on worktrees show 2 stati: Review status and PR status currently.

Cmd shift R was changed to now open the pr overview instead of linking the PR -> that makes sense

image image

These icons are a bit inconsistent with the rest (size wise).

Why do I need 2 approvals
image
when Github shows only 1?

image

I find we can remove this:
image
We show this already on the top and it's kind of duplicate. If we really want this it should be on the top like in Github.

The comments are hard to understand without code, we should add this later.

@cosi-conda

cosi-conda commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@cosi-conda looks really good and useful, I gave this a quick spin and here a few suggestion:

1 bug:

If you open the pr overview then switch to a worktree without PR, the PR view shows empty and cannot be untoggled.

A couple of suggestions regarding the UI:

The cards on the worktrees look like a regression, they are missing now the PR number, or was that intentional?

image dyn-720c1199c8d78a5b2550cf064fe37aa8 image It would be nice if the color theme of the pr button on the top right was more consistent with our other buttons there. I think I recently added a skill for that, maybe that can help. Colors and size seem different. We can change the size of all buttons if you want but then we should do it consistently. We also show the PR icon now 3 times but in each of the appearances the button has a different color. It would be great if users had one consistent button or ui that indicates the status. Existing PR badges on worktrees show 2 stati: Review status and PR status currently.
Cmd shift R was changed to now open the pr overview instead of linking the PR -> that makes sense

image image
These icons are a bit inconsistent with the rest (size wise).

Why do I need 2 approvals image when Github shows only 1?

image I find we can remove this: image We show this already on the top and it's kind of duplicate. If we really want this it should be on the top like in Github.

The comments are hard to understand without code, we should add this later.

Thanks, I'll check the panel without a PR as well as the approvals edge case. The PR number removal was a request/intentional, but I can add it back in. A lot of the colors were hardcoded so I updated them to use theme variables. I will look into the skill. The badge links out to the PR (existing functionality), but the button on the right hand side opens the panel, so they aren't for the same functionality. Were you referring to another button? I believe those other arrow buttons are unrelated to this update, but it's hard to tell from the screenshot.

Comment thread packages/kilo-vscode/webview-ui/agent-manager/pr/PRSummary.tsx
Comment thread packages/kilo-vscode/src/agent-manager/am-pr-utils.ts Outdated
Comment thread packages/kilo-vscode/src/agent-manager/PRStatusPoller.ts Outdated
@cosi-conda

Copy link
Copy Markdown
Contributor Author

Addressed bot comments

@cosi-conda
cosi-conda enabled auto-merge August 10, 2026 18:47
@cosi-conda
cosi-conda merged commit 07a5049 into main Aug 10, 2026
53 of 59 checks passed
@cosi-conda
cosi-conda deleted the feature/am-pr-view branch August 10, 2026 19:00
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
feat(vscode): Agent Manager PR View Panel
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.

3 participants