From 937b8e2210ea848b8cd6575dbbc2c27f6a36fdfd Mon Sep 17 00:00:00 2001 From: Thomas Petersen Date: Mon, 13 Apr 2026 13:17:48 -0400 Subject: [PATCH] fix(desktop): keep sidebar replies at current layer Stop sending sidebar replies through the agent reply-parent override path and keep same-branch replies visually flat so plain in-thread sends stay at the current drilled level. Made-with: Cursor --- desktop/src/features/channels/ui/ChannelScreen.tsx | 2 -- desktop/src/features/messages/lib/threadBranch.ts | 7 ++++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/desktop/src/features/channels/ui/ChannelScreen.tsx b/desktop/src/features/channels/ui/ChannelScreen.tsx index fc31dace7..8d313fa54 100644 --- a/desktop/src/features/channels/ui/ChannelScreen.tsx +++ b/desktop/src/features/channels/ui/ChannelScreen.tsx @@ -397,11 +397,9 @@ export function ChannelScreen({ if (!parentEventId) { return; } - const agentReplyParentId = currentThreadHeadId ?? null; const branchHeadId = currentThreadHeadId ?? null; await sendMessageMutation.mutateAsync({ - agentReplyParentId, branchHeadId, content, mentionPubkeys, diff --git a/desktop/src/features/messages/lib/threadBranch.ts b/desktop/src/features/messages/lib/threadBranch.ts index 68fbb3aee..8a98db53e 100644 --- a/desktop/src/features/messages/lib/threadBranch.ts +++ b/desktop/src/features/messages/lib/threadBranch.ts @@ -74,7 +74,12 @@ export function collectThreadBranch( ) .map((message) => ({ ...message, - depth: Math.max(0, message.depth - depthOffset), + // Keep normal replies in the drilled branch visually flat. + // Only explicitly drilled nested branches get their own branchHeadId and collapse link. + depth: + message.branchHeadId === branchHeadId + ? 0 + : Math.max(0, message.depth - depthOffset), })); return {