fix(desktop): Branch button silently does nothing inside a branched chat tile - #71969
Merged
austinpickett merged 2 commits intoJul 27, 2026
Merged
Conversation
session-tile.tsx wired onBranchInNewChat to () => undefined for tiled/branched sessions (nested branching isn't supported there), but the button in AssistantMessage's action bar rendered unconditionally regardless of whether a real handler was supplied. The button looked clickable but silently did nothing, with no visual feedback. - AssistantMessage now only renders the Branch button when onBranchInNewChat is actually provided, matching the existing pattern used for onDismissError/onRestoreToMessage. - session-tile.tsx no longer passes a no-op handler; the prop is simply omitted so the button doesn't render in tiles. - onBranchInNewChat is now optional on ChatViewProps, and the latestChatActions passthrough wrapper uses the existing latestOptional helper instead of an unconditional call.
Adds coverage for the bug NousResearch#2 fix: renders Thread with and without an onBranchInNewChat handler and asserts the Branch in new chat button is shown only when a real handler is supplied, hidden otherwise - covering both the normal open-chat case and the session-tile (branched chat) case that used to leave a dead, clickable button.
austinpickett
approved these changes
Jul 27, 2026
austinpickett
left a comment
Collaborator
There was a problem hiding this comment.
Review — approved
Verified the fix end to end. It's a clean, minimal fix that extends the codebase's existing conventions rather than inventing anything.
What it does right
AssistantActionBarnow gates the Branch button on{onBranchInNewChat && (...)}, matching the exact pattern already used foronDismissError(assistant-message.tsx:114). Presence-gating is the established contract for these action-bar children.latest-actions.tsswitchesonBranchInNewChatto the existinglatestOptional()helper, consistent with every other optional handler (onDismissError,onRestoreToMessage,onTranscribeAudio, ...).session-tile.tsxdrops the() => undefinedno-op instead of faking a handler, andChatViewProps.onBranchInNewChatbecomes optional to make omission a legitimate state. The chain is internally consistent.- Tooltip
copy.branchNewChatresolves to'Branch in new chat', matching the test'sgetByRolename.
Verification performed
mergeable: MERGEABLE/CLEAN— no conflicts.- The 4 changed source files typecheck with zero errors.
- New test passes (2/2). Confirmed non-vacuous: reverting the conditional render makes the "button hidden when no handler" case fail as expected, then passes again once restored.
No blocking issues. LGTM.
Reviewed by Hermes Agent
This was referenced Jul 28, 2026
randlee
pushed a commit
to randlee/hermes-agent
that referenced
this pull request
Aug 11, 2026
…hat tile (NousResearch#71969) * fix: Branch button is a dead no-op inside a branched chat tile session-tile.tsx wired onBranchInNewChat to () => undefined for tiled/branched sessions (nested branching isn't supported there), but the button in AssistantMessage's action bar rendered unconditionally regardless of whether a real handler was supplied. The button looked clickable but silently did nothing, with no visual feedback. - AssistantMessage now only renders the Branch button when onBranchInNewChat is actually provided, matching the existing pattern used for onDismissError/onRestoreToMessage. - session-tile.tsx no longer passes a no-op handler; the prop is simply omitted so the button doesn't render in tiles. - onBranchInNewChat is now optional on ChatViewProps, and the latestChatActions passthrough wrapper uses the existing latestOptional helper instead of an unconditional call. * test: assert Branch button visibility matches handler presence Adds coverage for the bug #2 fix: renders Thread with and without an onBranchInNewChat handler and asserts the Branch in new chat button is shown only when a real handler is supplied, hidden otherwise - covering both the normal open-chat case and the session-tile (branched chat) case that used to leave a dead, clickable button.
33hodl
pushed a commit
to 33hodl/hermes-agent
that referenced
this pull request
Aug 12, 2026
…hat tile (NousResearch#71969) * fix: Branch button is a dead no-op inside a branched chat tile session-tile.tsx wired onBranchInNewChat to () => undefined for tiled/branched sessions (nested branching isn't supported there), but the button in AssistantMessage's action bar rendered unconditionally regardless of whether a real handler was supplied. The button looked clickable but silently did nothing, with no visual feedback. - AssistantMessage now only renders the Branch button when onBranchInNewChat is actually provided, matching the existing pattern used for onDismissError/onRestoreToMessage. - session-tile.tsx no longer passes a no-op handler; the prop is simply omitted so the button doesn't render in tiles. - onBranchInNewChat is now optional on ChatViewProps, and the latestChatActions passthrough wrapper uses the existing latestOptional helper instead of an unconditional call. * test: assert Branch button visibility matches handler presence Adds coverage for the bug NousResearch#2 fix: renders Thread with and without an onBranchInNewChat handler and asserts the Branch in new chat button is shown only when a real handler is supplied, hidden otherwise - covering both the normal open-chat case and the session-tile (branched chat) case that used to leave a dead, clickable button.
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.
What does this PR do?
Fixes a dead-button UX bug: inside a session opened as a tile (i.e. a chat that was itself created via Branch in new chat), the Branch button on assistant replies is fully visible and looks clickable — but clicking it does absolutely nothing, with no error, no toast, no feedback of any kind.
Nested branching from a tile isn't supported by design (
session-tile.tsxintentionally wiresonBranchInNewChatto a no-op), but the button itself rendered unconditionally regardless of whether a real handler existed, so the "unsupported here" state was invisible to the user. This is the same class of problem as an earlier fixed bug where a dead Refresh button gave no feedback either.Related Issue
Fixes #
Type of Change
Changes Made
apps/desktop/src/components/assistant-ui/thread/assistant-message.tsx: the Branch button inAssistantActionBarnow only renders whenonBranchInNewChatis actually provided ({onBranchInNewChat && (...)}), matching the existing pattern already used foronDismissErrorandonRestoreToMessage— both of which are conditionally rendered for the same reason (per the comment inlatest-actions.ts: presence, not just callability, is what these children gate on).apps/desktop/src/app/chat/session-tile.tsx: no longer passes a no-oponBranchInNewChat={() => undefined}for tiled/branched chats; the prop is simply omitted, so the button now doesn't render there at all instead of rendering dead.apps/desktop/src/app/chat/index.tsx:onBranchInNewChatonChatViewPropsis now optional (?), since omitting it is now a legitimate, intentional state rather than something every caller had to fake with a no-op.apps/desktop/src/app/contrib/latest-actions.ts: thelatestChatActionspassthrough wrapper now uses the existinglatestOptionalhelper foronBranchInNewChatinstead of an unconditional call, consistent with howonDismissError/onRestoreToMessageare already wrapped.apps/desktop/src/components/assistant-ui/thread/assistant-message.test.tsx(new): covers both states — button visible when a handler is passed, button absent when it isn't.How to Test
npx vitest run src/components/assistant-ui/thread/assistant-message.test.tsxChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs