Add visual compaction review and OpenCode desktop launch - #5
Conversation
Download this PR buildSigned and notarized macOS preview for commit |
yoavf
left a comment
There was a problem hiding this comment.
Review of the compaction-review + OpenCode desktop launch changes. The core logic checks out (budget model chain agrees between prepareResume and the renderers, latestUserMessageID parenting is correct, sampling math is safe), and the full test suite passes on the head commit. Findings below, ordered by severity — two moderate items worth addressing, the rest are low-severity accuracy/consistency notes.
| process.standardOutput = Pipe() | ||
| process.standardError = Pipe() | ||
| try process.run() | ||
| process.waitUntilExit() |
There was a problem hiding this comment.
Minor — pipes attached but never drained before waitUntilExit().
This attaches stdout/stderr pipes and calls waitUntilExit() without draining, while this file's own run() helper drains first with a comment explaining the pipe-buffer deadlock that avoids. /usr/bin/open output is tiny so there's no realistic hang, but consider reusing run() or draining for consistency.
There was a problem hiding this comment.
Fixed in a648a18: launchOpenCodeDesktop now drains stdout/stderr before waitUntilExit(), matching the pattern in run().
- latestMirror now filters by kind (default .full), so a full resume after turns were continued in a bookends/handoff mirror renders a fresh full mirror instead of reopening the compacted session under a full ticket - Backing out to the session list clears the prepared conversion instead of restoring stale launch choices when the session is reopened - Target-model resolution is shared (AgentSyncConfiguration.resumeTargetModel) across the popover, AppModel, and SyncEngine, and mostRecentModel is memoized for 15s so SwiftUI body passes stop spawning sqlite3 children - Bookends/handoff tickets now report omittedEventCount - The result card's transferred label uses the ticket's payload estimate for full conversions too - CLI usage documents that --mode full errors instead of trimming - launchOpenCodeDesktop drains its pipes before waitUntilExit - Deep-link stamping comment no longer overstates the "latest session" guarantee
What changed
/Applications/OpenCode.appexplicitly when opening desktop linksWhy
Conversion previously opened a new session without making the compaction decision or result legible. The new flow makes the tradeoff visible before conversion and lets the user review what was produced before leaving Continuo.
OpenCode fixes
End-to-end testing against OpenCode 1.18.5 exposed two import defects:
The renderer now supplies reasoning timestamps and parents every assistant/tool message to the user turn it answers.
User impact
Users can understand and choose how a task is compacted, see the conversion result before opening it, and choose whether OpenCode resumes in a terminal or its desktop app. Imported OpenCode sessions now load correctly in Desktop.
Validation
swift test— 51 tests passedgit diff --checkGreptile Summary
The PR adds an explicit conversion-review workflow and improves OpenCode launch/import behavior.
Confidence Score: 3/5
The PR is not yet safe to merge because ordinary popover and panel dismissal can still preserve a stale prepared conversion.
Cleanup is attached only to ContinueView's explicit navigation callback, while status-popover closure, Settings navigation, and quick-picker window dismissal close their presentation directly and leave the shared prepared conversion intact.
Files Needing Attention: Sources/AgentSyncApp/SessionPickerView.swift, Sources/AgentSyncApp/AppDelegate.swift, Sources/AgentSyncApp/QuickPicker.swift
Important Files Changed
Reviews (2): Last reviewed commit: "Address review: mirror-kind reuse, stale..." | Re-trigger Greptile