fix(desktop): loosen inbox selected message highlight

Render the temporary inbox focus highlight as an expanded background layer so it has breathing room without shifting message layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Thomas Petersen
2026-05-18 08:25:59 -04:00
parent 2228220156
commit c9b7f3a381

View File

@@ -63,14 +63,8 @@ export function InboxMessageRow({
<div className="px-6 py-2">
<article
className={cn(
"group/message relative flex items-start gap-2.5 px-2 py-1 transition-colors duration-1000",
message.isSelected
? cn(
isFocusHighlightVisible
? "bg-primary/[0.07]"
: "bg-transparent",
)
: "hover:bg-muted/20",
"group/message relative flex items-start gap-2.5 px-2 py-1",
!message.isSelected && "hover:bg-muted/20",
)}
data-testid={
message.isSelected
@@ -78,6 +72,18 @@ export function InboxMessageRow({
: "home-inbox-context-message"
}
>
{message.isSelected ? (
<div
aria-hidden="true"
className={cn(
"pointer-events-none absolute -inset-x-2 -inset-y-1 rounded-xl transition-opacity duration-1000",
isFocusHighlightVisible
? "bg-primary/[0.07] opacity-100"
: "bg-primary/[0.07] opacity-0",
)}
/>
) : null}
{canReply || canToggleReactions ? (
<div className="absolute right-2 top-1 z-10">
<MessageActionBar