Rizz
2026-08-25 16:11:03 -07:00
parent 0ec8f1636d
commit 20f32f5a4b
4 changed files with 17 additions and 6 deletions

View File

@@ -151,6 +151,7 @@ export function CompactMessageSummary({
? "text-xs leading-4"
: "text-sm leading-relaxed",
shouldClampBubble && "relative max-h-36 overflow-hidden",
isConversation && "relative",
canOpenMessage &&
"group/bubble cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
isCompactPreview

View File

@@ -64,7 +64,20 @@ test("conversation renders the prompt as a filled right-aligned bubble with an a
// soft tint, borderless surface, and `px-4 py-2` spacing.
const bubble = row.querySelector(".rounded-2xl");
assert.ok(bubble, "the prompt should match Buzz's chat-bubble radius");
assert.match(bubble.className, /relative/);
assert.match(bubble.className, /bg-muted\/60/);
const openInChatCue = bubble.querySelector('[aria-hidden="true"]');
assert.ok(openInChatCue, "linked prompts should retain the hover cue");
assert.match(
openInChatCue.className,
/top-1\.5/,
"the sender hover cue uses its native inset once the bubble is its containing block",
);
assert.doesNotMatch(
openInChatCue.className,
/top-3/,
"the cue should not be pushed into the prompt text to compensate for the old containing-block bug",
);
assert.doesNotMatch(
bubble.className,
/(?<!\/)bg-muted(?!\/)/,

View File

@@ -398,6 +398,7 @@ test("the same relay post outside a work block keeps its message bubble", async
bubble,
"outside a block a posted message is a destination the reader can open — the bubble stays",
);
assert.match(bubble.className, /relative/);
assert.doesNotMatch(
bubble.className,
/max-h-36/,

View File

@@ -185,7 +185,7 @@ export function UserMessageBubble({
// `leading-normal` overrides the `leading-relaxed` base, as berd
// does, so the prompt sits tighter than the agent's prose.
isConversation &&
"rounded-2xl border-0 bg-muted/60 px-4 py-2 leading-normal",
"relative rounded-2xl border-0 bg-muted/60 px-4 py-2 leading-normal",
bubbleClassName,
)}
ref={bubbleRef}
@@ -206,11 +206,7 @@ export function UserMessageBubble({
{hasBubbleOverflow ? (
<span className="pointer-events-none absolute inset-x-0 bottom-0 h-8 rounded-b-2xl bg-linear-to-b from-transparent to-background" />
) : null}
{messageLink ? (
<MessageLinkHoverCue
className={isConversation ? "top-3" : undefined}
/>
) : null}
{messageLink ? <MessageLinkHoverCue /> : null}
</div>
{isConversation && footer ? (
// Timestamp/context row is chrome, not content: focus mode keeps it