Conversation
…ath is missing FlowChatStore.deleteSession kept a stale workspace-path guard, so the ID-first backend delete was never invoked and the session reappeared after reload. Refs GCWing#3150
…spaces Assistant workspace records left at the legacy BitFun root (~/.bitfun/personal_assistant/) by the brand migration, and orphaned records whose directory is already gone, can now be deleted or reset. Existing directories outside the managed layouts are still refused. The legacy_hidden_data_directory() constant now comes from core-types, replacing the private copy in legacy-migration. Fixes GCWing#3150
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 #3150
Summary
Two related fixes so items whose workspace directory is unavailable can still be deleted.
1. Assistant workspaces with legacy or missing directories (desktop)
delete_assistant_workspace,reset_assistant_workspace, andreset_workspace_persona_filesrejected any assistant whose registry record still points at the legacy BitFun root~/.bitfun/personal_assistant/workspace-<id>(directories the brand migration never relocated), and there was no path for records whose directory is already gone — the assistant could never be deleted from the UI.WorkspaceService::is_manageable_assistant_workspace_pathaccepts both the current layout (~/.openbitfun/personal_assistant/workspace[-<id>]) and the legacy layout (~/.bitfun/personal_assistant/workspace[-<id>]). The legacy root name comes from the newlegacy_hidden_data_directory()incore-types; the private constant inlegacy-migrationnow reuses it.delete_assistant_workspace: managed paths delete the directory as before; unmanaged records whose directory no longer exists fall back to a registry-only cleanup (logged in English); existing directories outside both managed layouts are still refused — the deletion safety boundary is unchanged.reset_assistant_workspaceandreset_workspace_persona_filesaccept both layouts.2. Sessions whose workspace path is missing (web-ui)
FlowChatStore.deleteSessionstill required a workspace path before calling the backend, so sessions whose workspace directory is missing never reached the ID-firstdelete_sessioncommand; failures were swallowed and the session reappeared after reload.LocalSessionDrivercleanup moved into try/finally so local state is cleared even when backend cleanup fails.Verification
cargo test -p openbitfun-core --no-default-features --features agent-runtime,git --lib service::workspace::service::tests— 20 passedcargo test -p openbitfun-desktop --lib api::commands::assistant_workspace_delete_tests— 3 passedcargo test -p openbitfun-legacy-migration --test migration_engine_contracts— 10 passedcargo check -p openbitfun-desktopon this branchRemote scenarios
Deletion and reset are local registry + local filesystem operations invoked through existing Tauri commands; no remote-surface contract changed and no new commands were added.