feat(chat): support local, worktree, and remote branches - #2
Open
xukaaaa wants to merge 1 commit into
Open
Conversation
brandlll-lee
requested changes
Jul 14, 2026
Owner
There was a problem hiding this comment.
Thanks again for the contribution🤗 The main branch has now advanced, and this PR currently conflicts with the latest code.
Please update the PR branch with the latest upstream main first. Be careful not to resolve the conflicts by accepting either side wholesale, because main now contains significant Git Review, IPC, cancellation, and performance improvements.
After synchronizing, please address the following review items:
- Preserve chat creation for non-Git workspaces and repositories without an initial commit.
- Ensure a local chat cannot silently resume on a different branch than the branch shown for that session.
- Move managed worktree cleanup into the authoritative main-process session lifecycle, stopping the runtime before deleting its working directory.
- Handle managed worktrees when deleting all project chats or removing a project, preventing orphaned directories and branches.
- Reset branch selection when switching workspaces so a branch from the previous repository cannot leak into the next workspace.
- Reuse or extend the existing branch-selection implementation instead of maintaining a second full branch menu.
- Preserve the latest scalable Git Review and IPC changes from
mainwhile resolving conflicts. - Add regression tests for non-Git workspaces, cross-session branch switching, active worktree deletion, and bulk project cleanup.
- Run the desktop typecheck and complete test suite after resolving the conflicts.
You can update the existing PR without opening a new one:
git remote add upstream https://github.com/brandlll-lee/modus.git
git fetch upstream
git checkout main
git rebase upstream/main
# Resolve conflicts carefully
git add .
git rebase --continue
git push --force-with-lease origin mainOnce the branch is updated and these issues are addressed, I’ll review the refreshed diff again!
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
Adds flexible chat environment selection.
Users can now:
The
Local / Worktreeselector follows the existing workspace and branch selector UI patterns.