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
This commit is contained in:
Thomas Petersen
2026-04-13 13:17:48 -04:00
parent c3d4807002
commit 937b8e2210
2 changed files with 6 additions and 3 deletions
@@ -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,
@@ -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 {