feat(web): add guarded branch switching to chat input - #2670
Merged
bobleer merged 2 commits intoAug 29, 2026
Conversation
bobleer
force-pushed
the
bob/chat-input-branch-switcher
branch
from
August 29, 2026 10:23
02ad5ed to
9b84d4c
Compare
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
Type and Areas
Type: Feature / UI/UX / test
Areas: Web UI, Git tooling, internationalization
Motivation / Impact
Users can switch ordinary workspace branches directly from the chat input strip. When checkout would overwrite local changes, the UI explains which files block the switch and offers a safe commit-and-retry path without creating duplicate commits on retry.
Verification
npx --yes node@22.23.2 /Users/liwenbo/.npm-global/lib/node_modules/pnpm/bin/pnpm.mjs --dir src/web-ui run test:run— 579 test files and 4184 tests passed.pnpm --dir src/web-ui exec vitest run --maxWorkers=50% src/flow_chat/components/ChatInputWorkspaceStripLayout.test.ts src/tools/git/components/branchSwitchFailure.test.ts src/tools/git/components/BranchQuickSwitch.test.tsx src/flow_chat/components/ChatInputWorkspaceStrip.test.tsx— 61 tests passed.pnpm run check:web— passed.pnpm run i18n:audit— passed with 0 warnings.git diff --check— passed.Reviewer Notes
Rebased onto
upstream/1.0.0-exploreatcb87d9c6e. Local UI behavior was exercised. Remote workspace and Peer Device Mode were not exercised end to end; the implementation uses the existing routed Git service rather than direct host APIs. Managed worktrees and detached dispatches remain explicitly read-only in this surface.Checklist