fix(cli): stabilize Kilo Console worktree flows - #11279
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 file changed, 22 total from full diff)
Other Observations (carried forward from previous review)The
If intentional, no action needed. If accidental (e.g., a merge artifact), it should be reverted. Previous Review Summaries (4 snapshots, latest commit 3395131)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 3395131)Status: No Issues Found | Recommendation: Merge The incremental diff contains a single test assertion update that aligns the worktree list test with the updated API response shape ( Files Reviewed (1 file changed, 22 total)
Other Observations (carried forward from previous review)The
If intentional, no action needed. If accidental (e.g., a merge artifact), it should be reverted. Previous review (commit fbdcc75)Status: No Issues Found | Recommendation: Merge The incremental diff (0c0b95f..HEAD) contains formatting-only changes: line-break reformatting, comment placement, and auto-generated SDK reordering. No behavioral changes. Other Observations (not blocking, from previous review)The
If intentional, no action needed. If accidental (e.g., a merge artifact), it should be reverted. Files Reviewed (22 files)
Previous review (commit 0c0b95f)Status: No Issues Found | Recommendation: Merge A single minor observation about the atomic-chat icon change is noted below — no inline comments were posted. Other Observations (not blocking)The
If intentional, no action needed. If accidental (e.g., a merge artifact), it should be reverted. Files Reviewed (18 files)
Previous review (commit 4e5ee56)Status: No Issues Found | Recommendation: Merge Files Reviewed (27 files)
Reviewed by deepseek-v4-pro-20260423 · 330,064 tokens Review guidance: REVIEW.md from base branch |
4e5ee56 to
0c0b95f
Compare
…nsole-persist fix(cli): stabilize Kilo Console worktree flows
Issue
No linked issue. This is follow-up work from local branch review findings and Kilo Console/TUI regressions found on this branch.
Context
This PR stabilizes Kilo Console and TUI flows around worktrees, sessions, console preferences, and development-shell directory handling. It also addresses local review findings that external Git worktrees were being exposed to Kilo-managed destructive actions and that custom-channel DB users could lose visible persistence after the channel DB filename change.
Implementation
Kilo Console now lists Git worktrees through the experimental worktree endpoint while the endpoint marks whether each worktree is Kilo-managed. The console keeps external worktrees visible for session startup and review, but only shows reset/delete actions for managed worktrees.
The TUI sessions dialog now defaults to current-worktree scope and uses the server-side current/all worktree filtering path so the scope toggle works even when a scope has no sessions. Console global preference updates can hot-apply without disposing active instances, and mounted console views refetch on
global.config.updatedwhile avoiding resize-driven terminal refetch churn.kilo-devnow preserves the caller directory while running the CLI frompackages/opencode, and custom channel DB paths usekilo-${channel}.dbwhile falling back to existingopencode-${channel}.dbfiles when the new DB does not exist. SDK/OpenAPI artifacts were regenerated for the new worktree list response shape.Screenshots / Video
N/A. The visual impact is limited to conditionally hiding existing Reset/Delete controls for unmanaged external worktrees; reviewer steps below cover that state.
How to Test
Manual/local verification
bun test ./test/kilocode/server/worktree-list.test.ts ./test/kilocode/storage/db.test.ts ./test/storage/db.test.tsfrompackages/opencodepassed.bun run typecheckfrompackages/opencodepassed.bun run typecheckfrompackages/kilo-consolepassed.bun run script/check-opencode-annotations.tsfrom the repo root passed.bun turbo typecheckpassed duringgit push.Reviewer test steps
opencode-${channel}.db, confirm the CLI still opens that DB whenkilo-${channel}.dbis not present.Checklist