Handle tab-close paths where the shell dies without forwarding SIGHUP/SIGTERM, which left `bun run ...` alive as an orphan. Add a parent-liveness watchdog in the TUI thread and route shutdown through a single idempotent `shutdownAndExit` path. Also guard the normal `process.exit(0)` path so signal/parent-exit codes are not overridden.
Pierre destroys and rebuilds the DOM on annotation changes, resetting
scrollTop. Wrap all comment mutations (add, update, delete, cancel draft,
send all) with a preserveScroll helper that captures and restores the
scroll position across animation frames.
Rename 'Open Worktree' to 'New Worktree' (dialog title) and
'Create Workspace' to 'Create Worktree' (submit button) across
all 16 locales for consistent naming throughout the UI flow.
* fix: resolve diff viewer race condition and add diagnostics for Agent Manager
onRequestWorktreeDiff now awaits stateReady before resolving the diff
target, preventing a race where startDiffWatch fires before state loads
from disk. Added diagnostic logging to resolveDiffTarget, diff polling,
and the server-side /experimental/worktree/diff endpoint so silent
failures become visible in the output channel.
* fix: guard stateReady await so rejection doesn't break diff polling
* docs: clarify why .catch() is required on stateReady await
Wrap originalClose() and child-process cleanup in try/finally so that
delete processes[key] always executes. Previously, if originalClose()
threw, the process map entry would be left stale, risking incorrect
PID references in later lifecycle operations.
The setTimeout fallback in terminateWorker can keep the event loop open
even when the worker exits promptly, delaying shutdown paths triggered
by signals. Unref the timer so normal fast shutdown is not blocked by
this fallback.
* perf: filter tool diagnostics to only edited files
Tools (edit, write, apply_patch) stored LSP diagnostics for ALL project
files in their metadata. In large projects this adds 100-500KB of
unrelated diagnostics per tool call, bloating session payloads by
50-77%.
The UI only renders diagnostics for the edited file(s), so the rest is
dead weight. Extract a filterDiagnostics utility that keeps only the
relevant files' diagnostics and use it in all three tools.
* add kilocode_change marker to diagnostics filter test
Replace the flat issue list in the migration plan with 37 detailed doc
files, one per issue, grouped into ui-polish/, features/, migration/,
error-handling/, performance/, infrastructure/, and cli-side/ directories.
Each doc describes the problem, what remains to be done, and implementation
notes — readable without opening the GitHub issue. The migration plan tables
now link to these docs instead of bare issue references.
Cross-referenced all open items from the GitHub project board
(https://github.com/orgs/Kilo-Org/projects/25) with the existing plan.
Added 37 open issues not previously tracked, grouped by category:
UI polish/bugs, features, migration, error handling, performance,
infrastructure, and CLI-side items.
Previously, connect() called create() (which spawns a new child process
and writes processes[key]) before closing the existing client. The old
client's close handler would then delete processes[key], removing the
*new* process entry from the map — losing track of the new child.
Move the existing client close to before create(), matching the pattern
already used in add().