Skip to content

feat(chat): support local, worktree, and remote branches - #2

Open
xukaaaa wants to merge 1 commit into
brandlll-lee:mainfrom
xukaaaa:main
Open

feat(chat): support local, worktree, and remote branches#2
xukaaaa wants to merge 1 commit into
brandlll-lee:mainfrom
xukaaaa:main

Conversation

@xukaaaa

@xukaaaa xukaaaa commented Jul 14, 2026

Copy link
Copy Markdown

Summary

Adds flexible chat environment selection.

Users can now:

  • Start a chat on a selected local branch.
  • Create an isolated worktree chat from a local branch.
  • Create a worktree chat from a remote-tracking branch.
  • See the session branch and folder path in the Sidebar.

The Local / Worktree selector follows the existing workspace and branch selector UI patterns.

@brandlll-lee brandlll-lee left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 main while 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 main

Once the branch is updated and these issues are addressed, I’ll review the refreshed diff again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants