feat(web): move branch selector into the toolbar breadcrumb - #4556
Closed
guitavano wants to merge 2 commits into
Closed
feat(web): move branch selector into the toolbar breadcrumb#4556guitavano wants to merge 2 commits into
guitavano wants to merge 2 commits into
Conversation
guitavano
force-pushed
the
guitavano/abuja-v1
branch
from
July 14, 2026 20:50
a8d786f to
b93c5d0
Compare
Relocate the GitHub branch picker from the chat composer's ChatModeRow to the shell breadcrumb, rendering it as `org › agent › branch`. It shows only inside a thread whose agent is a sandbox agent (GitHub repo with an attached connection); non-sandbox agents have no branch crumb. The breadcrumb lives above ChatContextProvider, so BranchCrumb resolves the active thread's branch + lock state from the ThreadManager store (`harness_id != null` => locked). Reuses BranchPill with placement="header", now styled ghost to match the agent crumb. ChatModeRow keeps only the RuntimeSwitcher / locked-runtime chip; its BranchPill composition and the ChatModeRowPure layout helper are gone. BranchPill tests moved to their own file. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nt path) - BranchCrumb: gate on the active thread being resolved in the panel store. It read the paginated (page-0) store while the chat sourced its branch from the useEnsureTask-resolved task, so older/archived threads rendered an unlocked, branch-less picker — and picking a branch prepended a phantom "New chat" row via applyPatch. Off-list threads are always locked; render nothing until resolved (fresh unlocked threads are always in page 0). - Remove the now-dead placement="chat" path from BranchPill/BranchPicker (the only caller is the breadcrumb, always header) and its stale doc comment. - Update the stale ChatModeRow reference in the locked-thread e2e comment. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
guitavano
force-pushed
the
guitavano/abuja-v1
branch
from
July 14, 2026 21:27
9e1a98b to
8416e38
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
Moves the GitHub branch selector out of the chat composer and into the shell breadcrumb, so the toolbar reads
deco › org › agent › branch.BranchCrumbinshell-breadcrumb.tsx, rendered after the agent crumb. Shows only inside a thread whose agent is a sandbox agent (GitHub repo with an attached connection). Non-sandbox agents (e.g. Decopilot) get no branch crumb.ChatContextProvider, so it can't read the chat task context —BranchCrumbresolves the active thread's branch + lock state from theThreadManagerstore instead (harness_id != null⇒ runtime pinned ⇒ branch locked, matchingChatTaskContextValue.isThreadLocked).BranchPillwithplacement="header", restyled ghost (no border/bg,hover:bg-accent/60) to match the agent crumb.ChatModeRowwrapper: the chat composer (input.tsx) and agent home (agent-home.tsx) now renderModePickerdirectly.BranchPilltests moved to their ownbranch-pill.test.tsx.Testing
bun run check✅bun run lint✅ (0 errors)bun test apps/mesh/src/web/components/chat/✅ (366 pass)Notes / follow-up
harness_idis pinned (first send). There's a brief window where the branch stays editable until the runtime is actually pinned — which is arguably the more correct semantic.max-w-[200px].🤖 Generated with Claude Code
Summary by cubic
Moved the GitHub branch selector from the chat composer into the toolbar breadcrumb so it reads “org › agent › branch”. It shows only in sandbox-agent threads and avoids rendering for off-list/archived threads.
New Features
BranchCrumbinshell-breadcrumb.tsxthat rendersBranchPill. Lock state comes from the ThreadManager store (harness_id != null), and updates useuseThreadActions.setBranch.BranchCrumbgates on the active thread being present in the panel store; off-list/archived threads render nothing to avoid an unlocked, branch-less picker and phantom “New chat” rows.Refactors
placementfromBranchPill/BranchPicker; always render a ghost, header-styled chip with a visible label. Simplified styles and removed responsive label collapse.ChatModeRownow only renders theRuntimeSwitcheror the locked-runtime chip; removed branch pill composition andChatModeRowPure. Callers ininput.tsxandagent-home.tsxupdated.Written for commit 8416e38. Summary will update on new commits.