Repository navigation
fix(projects): preserve sessions when replacing a moved folder - #2473
Merged
vastsa merged 5 commits intoNov 21, 2026
Merged
Conversation
Owner
|
Thanks — the bug in #2469 is real and the transaction/rollback handling looks correct, but two gaps block landing:
Minor: the relocation switches the live workspace with |
Relocation moved sessions, memory and scheduled tasks even when the replaced folder still existed, so swapping an existing folder for an unrelated one silently rebound its data. It now requires the old primary to be gone from disk; otherwise the edit keeps the existing detach semantics. The two-step repair from vastsa#1869 (save the replacement next to the stale root, then drop the stale root) went through the multi-root path and still orphaned sessions. When exactly one removed root is missing and owns data and the remaining root's project is empty, it is relocated in the same transaction. The live workspace switch now mirrors workspace.set, including dropping hashline state. fixes vastsa#2469
Owner
|
Addressed the review in cbd0e0c (on top of your work, no force-push):
Also merged latest origin/main. |
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.
Fixes #2469.
Summary
workspacePath, including supported non-canonical path spellings.Multi-root detachment is unchanged: removed roots with chats remain standalone projects. No automatic move detection or non-empty project merge is introduced.
Documentation
Updated the project-group RPC contract, data-storage semantics, project-editor behavior, and
E2E-PROJECT-relocate-single-root-with-existing-sessions. No schema, RPC-shape, or UI changes.Validation
cargo test -p host-core --locked db::— 70 passed.cargo test -p host-core --locked project_group_update_rpc— 3 passed.node scripts/e2e-project-edit.mjs— passed.pnpm build:js— passed.pnpm docs:check— passed.cargo fmt --all -- --check— passed.pnpm check:pr-base— passed against currentorigin/main.A full Host run passed 1341 tests with 1 skipped and 2 unrelated local-environment failures: the plugin snapshot sees the installed AIE application plugins, and the login-PATH probe rejects this shell's relative entry. The affected suites above pass on the latest upstream base.
The full native UI journey in the new E2E scenario remains Draft; the existing project-edit Electron probe passed.