feat(restore): persist Yolo and session expansion state - #611
Merged
Conversation
Persist server-owned Yolo state in OpenCode session metadata and hydrate it before permission events are processed. Serialize CodeNomad metadata writes, preserve unrelated metadata, migrate changing family roots, and route worktree slug updates through the same server-owned path. Capture expanded session IDs in the desktop snapshot and reconcile them with live selection, deletion, pagination, and explicit expansion authority. Legacy snapshots keep their active child visible without overriding newer user choices. Add focused coverage for metadata merge and scope behavior, concurrent toggles, cleanup and ancestry races, snapshot normalization, and restoration merging. Validated with targeted server and UI tests plus both workspace typechecks.
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/29663049868 Artifacts expire in 7 days.
|
pascalandr
commented
Jul 19, 2026
pascalandr
left a comment
Contributor
Author
There was a problem hiding this comment.
Gatekeeper review: PASS
Reviewed the complete origin/dev...a1e71bb9 diff: 26 files, 1 commit. This is a full-PR review, not a latest-file spot check.
Findings
No merge-blocking correctness, data-loss, security, or behavioral findings remain.
The final review covered:
- server ownership and startup hydration of persisted Yolo state;
- OpenCode metadata ownership, merge preservation, workspace scope, and serialized Yolo/worktree writes;
- concurrent toggles, persistence failures, cleanup generations, and repeated family-root migration races;
- expanded/collapsed session capture, legacy snapshots, pagination/unavailable IDs, explicit collapse authority, deletion, and instance cleanup;
- current user expansion priority at the snapshot codec boundary.
Validation
- Focused server permission/metadata suite: 39 passed.
- Focused client snapshot/restoration suite: 66 passed.
- Server TypeScript typecheck: passed.
- UI TypeScript typecheck: passed.
git diff --check: passed.- GitHub tests and all Linux, macOS, Windows, Electron, and Tauri build jobs: passed.
- PR reports MERGEABLE.
Accepted non-blocking limits
- Project session hydration follows the existing 10,000-session ceiling.
- Expanded-session persistence is capped at 256 IDs and the shared snapshot string budget.
- The metadata adapter has focused concurrency coverage; the HTTP worktree metadata route does not yet have a dedicated integration test.
Final decision: PASS.
Contributor
Author
|
@shantur LGTM |
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.
Summary
Yolo persistence
Expansion restoration
Validation
Limits
Closes #607
Depends on anomalyco/opencode#23068.