synch with main fork#4
Merged
Merged
Conversation
* fix: register WebWorker for disposal in WebWorkerClient to prevent thread leak WebWorkerClient stored its WebWorker reference but never registered it for disposal, so worker.terminate() was never called when the client was disposed. This leaked OS threads every time a short-lived worker (e.g. CpuProfileAnalysisWorker from the renderer auto-profiler) was created and disposed. Over a long chat session this accumulated 70+ idle DedicatedWorker threads. * fix: move generateCodespanLink from render body to useEffect generateCodespanLink was called during React render, causing: - 'state update on unmounted component' warnings - redundant IPC calls on every re-render during streaming - re-render cascades that triggered 200ms+ long tasks Moved to useEffect with cancellation guard. Cache is checked synchronously first; generation only fires once per codespan. * perf: defer layout effects to reduce scroll jank in sidebar Three changes to reduce long tasks during fast scroll-up in long chat threads (286ms → ~120ms): 1. Move streaming auto-scroll and ChatBubble truncation check from useLayoutEffect to useEffect — avoids forcing synchronous layout reflow on every stream token. 2. Split virtualization effect: scroll compensation stays in useLayoutEffect (must be before paint to avoid scroll jumps), but the fill-check moved to useEffect so its setMountStart doesn't force a synchronous re-render of new ChatBubble components. 3. Batch-expand by calculated deficit instead of 1 message at a time, eliminating the mount→measure→mount cascade.
* docs: add terminal interaction improvement plan to backlog
* feat: expand terminal tool descriptions to warn against interactive commands
Replace the narrow 'git diff | cat' hint with a broader pattern covering
pagers, editors, REPLs, and y/n confirmation prompts. Gives the agent
actionable alternatives (pipe to cat, run non-interactively) instead of
just 'don't get stuck in vim'.
* feat: accurate terminal status in volatile context using CommandDetection
Replace blanket 'running' for every open terminal with idle (shell at
prompt) / running: <command> (command executing) / exited (code N).
Uses CommandDetection capability data — accurate for Void terminals
which always have forceShellIntegration: true. Falls back to 'running'
when shell integration is unavailable.
* feat: enrich TerminalResolveReason to distinguish inactivity vs backstop timeout
Split { type: 'timeout' } into { type: 'timeout', reason: 'inactivity' }
(no output for Ns — likely interactive/stuck) vs { type: 'timeout',
reason: 'backstop' } (still producing output — long-running process).
The stringifier tells the agent which kind of timeout occurred so it
can react appropriately instead of guessing.
* fix: disable whitespace-insensitive fallback in edit_file matching
The fallback in findTextInCode strips all whitespace to match, then
replaces at the line level — which loses indentation. The chat panel
preview shows the LLM's exact original/updated text, but the applied
result differed when the fallback triggered. Setting
canFallbackToRemoveWhitespace to false ensures exact-match-only: if
original doesn't match the file exactly, the LLM gets a clear error
instead of a silent fallback that applies wrong indentation.
* feat: add read_terminal tool
New read-only tool that reads the scrollback buffer of any terminal
(Void or user-created). Returns terminal output, current status
(idle/running/exited), and command history with exit codes and
durations from CommandDetection. No approval required.
The agent uses this to check on persistent terminals after a timeout,
inspect dev server logs, or see output from user-created terminals.
Terminal names are already shown in the system info volatile context.
* feat: add last_n_commands filter to read_terminal tool
When last_n_commands is provided, returns only the output of the last N
commands from the terminal's command history, using CommandDetection's
getOutput() to read between executedMarker and endMarker. When omitted,
returns the full scrollback buffer and full command history as before.
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.
No description provided.