Repository navigation
fix(agent-manager): keep latest project selection - #14675
Merged
Merged
Conversation
A delayed project readiness completion could activate an older sidebar selection and override a newer click. Ignore a selection when a newer one has started.
13 tasks
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Previous Review Summary (commit 5b336a9)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 5b336a9)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (3 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
Record the latest-selection token only for an actionable target so a click on an unavailable project cannot discard a pending valid selection.
marius-kilocode
enabled auto-merge
September 30, 2026 08:13
WebReflection
approved these changes
Sep 30, 2026
This was referenced Oct 1, 2026
This was referenced Oct 7, 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
When a project is loading, clicking it and then selecting a ready worktree in another project could end with the loading project selected anyway. The first click awaited project readiness, and when that work finished it activated its older target, overriding the newer selection.
This is a reproduced defect from the #13963 investigation. It is not the full original report.
Why This Change Was Made
activateSelectionawaitsdeps.ready(ctx)before it commits the active project. A second, later click can complete during that await. The handler then committed the earlier target with no check for a newer request.The fix records the newest selection token per deps object and drops a completion when a newer selection has started. It is five lines and does not change validation, routing, or persistence.
User Impact
The last sidebar selection wins. A slow project can no longer pull the UI back to an older click after the user has already moved on.
Evidence
bun teston the focused suites: 124 passed.packages/kilo-vscode/:bun run compile(typecheck, webview typecheck, lint, bundle) passed.Scope
Races that need wider changes are not included: stale per-project session listings after movement or deletion, and session creation completing after a project switch. Both need ownership and route changes beyond a few lines.