Repository navigation
Refactor desktop runtime, project persistence and model/tool execution - #2
Merged
Merged
Conversation
zerobudian
marked this pull request as ready for review
October 11, 2026 11:13
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.
Problem and behavior
The desktop did not start its Sidecar, HTTP bodies could be truncated, and shared streaming state let requests interfere. Project controls and attachment handling were placeholders, while model retries, tool parsing and resource ownership could duplicate work or leave background processes running.
This change establishes one runnable root application and authenticated, owned Sidecar lifecycle; separates HTTP/runtime/project/provider services; isolates chat runs and confirmation/cancellation; and preserves native tool calls, usage, history and partial output. Todo/Pin, file previews, actual text/image uploads and provider management now persist through their APIs. Context budgeting preserves complete tool exchanges and full disk history.
The engine uses explicit imports and instance-owned background state. Tool dispatch has a registry and 109 native schemas; bounded JSON parsing replaces fragile regular expressions. Atomic project/history writes, exact task matching, symlink/path checks, reviewer restrictions, hook failure handling, detached memory snapshots and terminal cleanup correct data-loss and execution failures. MCP sessions now enter/exit in the same owning task, LSP transport reads complete frames promptly, and the legacy Qt interface initializes its reasoning animation correctly.
Validation
Scope and limits
See
docs/DELIVERY.mdfor the source baseline, reproduced defects, module evidence and remaining work. Real provider credentials, Windows/macOS native runs, installers/signing/updates, neural embeddings and every third-party server/tool/subagent scenario were not available for validation. Desktop attachments support UTF-8 text and PNG/JPEG/GIF/WebP; binary documents are explicitly rejected. Context estimation is heuristic and does not guarantee 1M provider support. Current system tools did not expose historical analysis memory, so historical conclusions are not assumed to be recovered.