From 67ebd547488bdbc41fee2551b1cea94d88424888 Mon Sep 17 00:00:00 2001 From: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> Date: Tue, 25 Aug 2026 15:56:51 -0700 Subject: [PATCH] Refine focus-mode message bubbles Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> Signed-off-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> (cherry picked from commit 0ec8f1636de1c89c5a1fda57d984a8776ceab483) Signed-off-by: ss-dev-00 --- .../CompactMessageSummary.tsx | 14 +++++++++--- ...essionTranscriptList.conversation.test.mjs | 5 +++++ .../AgentSessionWorkBlock.orphaned.test.mjs | 22 ++++++++++++++++--- .../UserMessageBubble.tsx | 6 ++++- 4 files changed, 40 insertions(+), 7 deletions(-) diff --git a/desktop/src/features/agents/ui/AgentSessionToolItem/CompactMessageSummary.tsx b/desktop/src/features/agents/ui/AgentSessionToolItem/CompactMessageSummary.tsx index 4b5ed0c59f..33fd1e4416 100644 --- a/desktop/src/features/agents/ui/AgentSessionToolItem/CompactMessageSummary.tsx +++ b/desktop/src/features/agents/ui/AgentSessionToolItem/CompactMessageSummary.tsx @@ -52,10 +52,13 @@ export function CompactMessageSummary({ const { goChannel } = useAppNavigation(); const { openProfilePanel } = useProfilePanel(); const isCompactPreview = variant === "compactPreview"; - const shouldClampBubble = !isCompactPreview; + const isConversation = variant === "conversation"; + // Focus mode is a reading view, so sent messages remain fully visible there. + // The default activity surface keeps the compact clamp. + const shouldClampBubble = !isCompactPreview && !isConversation; const [bubbleRef, hasBubbleOverflow] = useTranscriptBubbleOverflow(shouldClampBubble); - const canOpenMessage = shouldClampBubble && messageLink !== null; + const canOpenMessage = !isCompactPreview && messageLink !== null; const mutedTone = compactSummaryTone(); const avatarClassName = cn( "mr-2 mt-1 shrink-0", @@ -135,7 +138,12 @@ export function CompactMessageSummary({ testId="transcript-agent-sent-avatar" /> )} -
+
{ diff --git a/desktop/src/features/agents/ui/activityRenderClasses/UserMessageBubble.tsx b/desktop/src/features/agents/ui/activityRenderClasses/UserMessageBubble.tsx index fcac60b1de..02b7da614d 100644 --- a/desktop/src/features/agents/ui/activityRenderClasses/UserMessageBubble.tsx +++ b/desktop/src/features/agents/ui/activityRenderClasses/UserMessageBubble.tsx @@ -206,7 +206,11 @@ export function UserMessageBubble({ {hasBubbleOverflow ? ( ) : null} - {messageLink ? : null} + {messageLink ? ( + + ) : null}
{isConversation && footer ? ( // Timestamp/context row is chrome, not content: focus mode keeps it