refactor(agent-manager): extract project-scoped diff/review routing - #13538
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Reviewed by grok-4.6 · Input: 72.2K · Output: 11.3K · Cached: 677.8K Review guidance: REVIEW.md from base branch |
marius-kilocode
enabled auto-merge
August 28, 2026 10:04
WebReflection
approved these changes
Aug 28, 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.
What Problem This Solves
Seven Agent Manager diff/review response routes repeat the same project guard inside the main subscription. This makes the applied-project boundary harder to test in isolation.
Why This Change Was Made
Extract only these routes into a small typed, runtime-independent helper that uses the existing
isCurrentcheck and handlers. KeepcurrentProjectId(the project whose state has been applied), notactiveProjectId, as the routing boundary. Preserve the subscription, dispatch position, stale-message early return, and accepted/unrelated-message fall-through.User Impact
No intended behavior change. Legacy unqualified messages remain accepted. State ownership, session selection, rendering, and protocols are unchanged.
Evidence
packages/kilo-vscode:bun test tests/unit/agent-manager-review-routing.test.ts,bun run lint,bun run typecheck,bun run knip,bun run check-kilocode-change, andbun run compile.bun run script/check-opencode-annotations.ts --worktreeandgit diff --check.Isolated smoke-test screenshots
Multi-project disabled, worktree review:
Two projects, selected Beta project review: