Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(desktop): keep inbox reviewer avatars separate on hover (#102746)

posthog[bot]fc38ab0cd019
diff --git a/products/desktop/packages/ui/src/features/inbox/components/InboxCardChrome.tsx b/products/desktop/packages/ui/src/features/inbox/components/InboxCardChrome.tsx
index 281a91f95e9d..dd25620fdb54 100644
--- a/products/desktop/packages/ui/src/features/inbox/components/InboxCardChrome.tsx
+++ b/products/desktop/packages/ui/src/features/inbox/components/InboxCardChrome.tsx
@@ -7,6 +7,10 @@ import type { ReactNode } from "react";
* [body | actions rail] row from `@lg` up. Requires an `@container` ancestor,
* which the list shells own. The card root is `relative` so the timestamp and
* top-right badge slots can pin to its corners in the row layout.
+ *
+ * The background comes from the `--inbox-row-surface` variable, because the
+ * overlapping reviewer avatars ring themselves in the current surface color.
+ * A background set directly here makes them merge on hover and on selection.
*/
export function inboxCardClassName(options: {
dashed?: boolean;
@@ -15,13 +19,13 @@ export function inboxCardClassName(options: {
}): string {
return cn(
"group relative flex w-full flex-col gap-2.5 @lg:flex-row @lg:items-stretch @lg:gap-3",
- "rounded-(--radius-2) border bg-(--color-panel-solid) px-4 py-3.5 transition duration-150 hover:bg-(--gray-2)",
+ "rounded-(--radius-2) border bg-(--inbox-row-surface) px-4 py-3.5 transition duration-150 [--inbox-row-surface:var(--color-panel-solid)] hover:[--inbox-row-surface:var(--gray-2)]",
options.dashed
? "border-(--gray-6) border-dashed hover:border-(--gray-7)"
: "border-border hover:border-(--gray-6) hover:shadow-sm",
options.dimmed && "opacity-90",
options.isSelected &&
- "border-(--accent-8) bg-(--accent-2) ring-(--accent-8) ring-2 ring-inset",
+ "border-(--accent-8) ring-(--accent-8) ring-2 ring-inset [--inbox-row-surface:var(--accent-2)]",
);
}
diff --git a/products/desktop/packages/ui/src/features/inbox/components/InboxReportRowView.tsx b/products/desktop/packages/ui/src/features/inbox/components/InboxReportRowView.tsx
index 50d4c5c54b0a..154da5cf1ea4 100644
--- a/products/desktop/packages/ui/src/features/inbox/components/InboxReportRowView.tsx
+++ b/products/desktop/packages/ui/src/features/inbox/components/InboxReportRowView.tsx
@@ -78,7 +78,7 @@ export function InboxReportRowView({
onOpen();
}
}}
- className={`flex w-full cursor-pointer items-center gap-3 rounded-(--radius-2) border bg-(--color-panel-solid) px-3 py-2 text-left transition-[background-color,border-color,box-shadow,opacity] duration-150 hover:bg-(--gray-3) hover:shadow-sm focus-visible:bg-(--gray-3) focus-visible:outline-none focus-visible:ring-(--gray-8) focus-visible:ring-1 ${borderClass} ${isTerminal ? "opacity-55 hover:opacity-100 focus-visible:opacity-100" : ""}`}
+ className={`flex w-full cursor-pointer items-center gap-3 rounded-(--radius-2) border bg-(--inbox-row-surface) px-3 py-2 text-left transition-[background-color,border-color,box-shadow,opacity] duration-150 [--inbox-row-surface:var(--color-panel-solid)] hover:shadow-sm focus-visible:outline-none focus-visible:ring-(--gray-8) focus-visible:ring-1 hover:[--inbox-row-surface:var(--gray-3)] focus-visible:[--inbox-row-surface:var(--gray-3)] ${borderClass} ${isTerminal ? "opacity-55 hover:opacity-100 focus-visible:opacity-100" : ""}`}
>
<div className="flex min-w-0 flex-1 flex-col gap-0.5">
<span className="truncate font-medium text-[14px] text-gray-12">
diff --git a/products/desktop/packages/ui/src/features/inbox/components/SuggestedReviewerAvatarStack.tsx b/products/desktop/packages/ui/src/features/inbox/components/SuggestedReviewerAvatarStack.tsx
index 25bc36aa6e8c..b444004ccb28 100644
--- a/products/desktop/packages/ui/src/features/inbox/components/SuggestedReviewerAvatarStack.tsx
+++ b/products/desktop/packages/ui/src/features/inbox/components/SuggestedReviewerAvatarStack.tsx
@@ -83,6 +83,11 @@ export function SuggestedReviewerAvatarStack({
const visible = reviewers.slice(0, MAX_VISIBLE);
const overflow = reviewers.length - visible.length;
const reviewerCountLabel = `${reviewers.length} suggested reviewer${reviewers.length === 1 ? "" : "s"}`;
+ // The avatars overlap, so each one needs a ring in the color of the surface
+ // behind it to keep an apparent gap. Rows publish that color as
+ // `--inbox-row-surface`; anything else falls back to the panel background.
+ // The overflow badge fills in `--gray-4`, which no row state uses, so it
+ // keeps its shape when its ring matches the row behind it.
const avatarStack = (
<span className="-space-x-1.5 flex items-center">
<span className="sr-only">{reviewerCountLabel}</span>
@@ -91,11 +96,11 @@ export function SuggestedReviewerAvatarStack({
key={reviewer.github_login}
githubLogin={reviewer.github_login}
size="sm"
- className="ring-(--color-panel-solid) ring-2"
+ className="ring-2 ring-[var(--inbox-row-surface,var(--color-panel-solid))]"
/>
))}
{overflow > 0 ? (
- <span className="inline-flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-(--gray-3) px-1 font-semibold text-[9px] text-gray-11 leading-none ring-(--color-panel-solid) ring-2">
+ <span className="inline-flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-(--gray-4) px-1 font-semibold text-[9px] text-gray-11 leading-none ring-2 ring-[var(--inbox-row-surface,var(--color-panel-solid))]">
+{overflow}
</span>
) : null}
diff --git a/products/desktop/packages/ui/src/features/inbox/components/utils/SuggestedReviewerAvatar.tsx b/products/desktop/packages/ui/src/features/inbox/components/utils/SuggestedReviewerAvatar.tsx
index 6afd17e5f078..c827b3059cb3 100644
--- a/products/desktop/packages/ui/src/features/inbox/components/utils/SuggestedReviewerAvatar.tsx
+++ b/products/desktop/packages/ui/src/features/inbox/components/utils/SuggestedReviewerAvatar.tsx
@@ -36,7 +36,11 @@ export function SuggestedReviewerAvatar({
<img
src={posthogIcon}
alt=""
- className={cn("shrink-0 object-contain", config.className, className)}
+ className={cn(
+ "shrink-0 rounded-full object-contain",
+ config.className,
+ className,
+ )}
/>
);
}
@@ -44,7 +48,7 @@ export function SuggestedReviewerAvatar({
return (
<span
aria-hidden
- className={cn("shrink-0", config.className, className)}
+ className={cn("shrink-0 rounded-full", config.className, className)}
/>
);
}