feat: improve Kilo Console worktree review - #11147
Conversation
| window.addEventListener("resize", updateViewport) | ||
|
|
||
| onCleanup(() => { | ||
| if (events.timer) window.clearTimeout(events.timer) |
There was a problem hiding this comment.
WARNING: resize.timer is not cleared in onCleanup, but events.timer is. If the component unmounts while a resize debounce is in flight, the setTimeout callback will fire after cleanup and call patchConfig with stale closure data.
Add if (resize.timer) window.clearTimeout(resize.timer) here alongside the events.timer cleanup.
| * Width of the Kilo Console project context sidebar in pixels | ||
| */ | ||
| context_sidebar_width?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN" | ||
| diff_style?: "unified" | "split" |
There was a problem hiding this comment.
SUGGESTION: The generated type includes duplicate and semantically misleading string literals: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN". The duplicates ("Infinity", "-Infinity", "NaN" appear twice each) are a code-gen artifact from Effect's Schema.Number union with its special-value serialization.
Since Config.Info uses Schema.Number.check(isGreaterThanOrEqualTo(250), isLessThanOrEqualTo(800)) which effectively rejects NaN and Infinity at runtime anyway, consider wrapping the schema with Schema.Int or Schema.Finite so the codegen produces a clean number type here. Otherwise this is cosmetic — it won't cause a runtime bug.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge All previous issues remain resolved. The sole change since Files Reviewed (1 file, incremental)
Reviewed by claude-4.6-sonnet-20260217 · 176,856 tokens Review guidance: REVIEW.md from base branch |
|
I wonder if we should rather have a common kilo diff logic that is being reused here. This primarily uses the OpenCode components. What is the reasoning behind this? |
Hey @marius-kilocode , I'm utilizing the shared components as-is. I am unclear about the diff logic you mentioned, because the diff comes from the SDK and the UI comes from the UI library |
…nsole-ui-improvements feat: improve Kilo Console worktree review
Issue
No linked issue; this is a scoped Kilo Console UI improvement.
Context
Improve project worktree management and review inside Kilo Console. Native browser prompts and raw patch output made routine worktree actions feel disconnected from the rest of the console and made larger diffs difficult to inspect.
Implementation
Worktree create, rename, reset, and delete actions now use accessible console dialogs. The project details area uses the shared session review UI with lazy per-file diff loading, syntax highlighting, unified/split layouts, and a resizable sidebar. Global Console UI settings persist the default sidebar width and diff layout through the CLI config schema and generated SDK.
Screenshots / Video
How to Test
Manual/local verification
bun run typecheckinpackages/kilo-consolepassed.bun test src/routes/config/state/console.test.tsinpackages/kilo-consolepassed (3 tests).bun run typecheckinpackages/opencodepassed.bun test test/kilocode/config/console-ui.test.tsinpackages/opencodepassed (2 tests).bun turbo typechecksuccessfully across 17 tasks.bun run script/check-opencode-annotations.tspassed.Reviewer test steps
bun dev -- consoleand open Global Settings > Console > UI.Checklist