fix(worktree): defer isolation until first prompt - #1820
Merged
Conversation
Collaborator
Author
|
CI follow-up: the first Ubuntu full-core run exposed that an omitted workspace locator was being synthesized from the loaded session and re-resolved against ambient storage settings. Commit Reverification after the fix:
|
1688mengdie
pushed a commit
to 1688mengdie/BitFun
that referenced
this pull request
Jul 28, 2026
* fix(worktree): defer isolation until first prompt * fix(core): preserve loaded session storage binding
1688mengdie
pushed a commit
to 1688mengdie/BitFun
that referenced
this pull request
Jul 28, 2026
* fix(worktree): defer isolation until first prompt * fix(core): preserve loaded session storage binding
1688mengdie
pushed a commit
to 1688mengdie/BitFun
that referenced
this pull request
Jul 28, 2026
* fix(worktree): defer isolation until first prompt * fix(core): preserve loaded session storage binding
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
/worktreecommand arm an empty-session preference without running Git I/OType and Areas
Type: regression fix / UI/UX
Areas: Rust core, desktop/Tauri, Web UI, CLI/TUI, Peer Host adapter
Motivation / Impact
Checking worktree isolation previously performed synchronous worktree creation. The following prompt then passed the worktree execution path as a session-storage locator, causing
Session ID is already bound to another workspaceand preventing the message from being sent.After this change, checking the control is immediate. Worktree creation starts only after prompt submission, and session persistence continues to resolve through the owning project root on Windows, macOS, and Linux. Remote-workspace support remains explicitly unchanged.
Verification
pnpm run type-check:webpnpm --dir src/web-ui run test:run src/flow_chat/utils/sessionWorktree.test.ts src/flow_chat/components/ChatInputWorkspaceStrip.test.tsx src/flow_chat/store/FlowChatStore.test.ts— 79 passedpnpm run lint:webpnpm run i18n:audit— 0 warningscargo check --workspacecargo test -p bitfun-core worktree_execution_root_is_a_legacy_alias_for_project_storage --libcargo test -p bitfun-core unrelated_workspace_is_not_rewritten_to_the_project_storage_root --libcargo test -p bitfun-core dialog_port_preserves_invalid_request_for_wrong_workspace --libcargo test -p bitfun-cli— all unit and integration tests passedcargo test -p bitfun-desktop— 226 passed, 2 pre-existing permission-gated tests ignorednode scripts/check-core-boundaries.mjspnpm run check:repo-hygienegit diff --checkReviewer Notes
The storage-locator fallback intentionally rewrites only the loaded session own execution root to its project root. Unrelated workspace paths are preserved and still rejected by the existing session identity guard. No screenshot is included because the UI shape is unchanged; the visible behavior change is that the checked state is immediate and reports a pending state until first send.
This change was AI-assisted and fully tested with the commands above.
Checklist