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(homepage): make capability badges read as a response (#91484)

posthog[bot]ff34d8270911
diff --git a/frontend/src/scenes/max/components/TopicBadges.tsx b/frontend/src/scenes/max/components/TopicBadges.tsx
index edbd6500415d..69e714417aa5 100644
--- a/frontend/src/scenes/max/components/TopicBadges.tsx
+++ b/frontend/src/scenes/max/components/TopicBadges.tsx
@@ -74,6 +74,7 @@ export function TopicBadges({ topics, selectedKey, onSelect, className }: TopicB
size="small"
type="secondary"
active={selectedKey === topic.key}
+ aria-pressed={selectedKey === topic.key}
icon={badgeIcon(topic)}
onClick={() => onSelect(selectedKey === topic.key ? null : topic.key)}
data-attr={`capability-badge-${topic.key}`}
diff --git a/frontend/src/scenes/project-homepage/ai-first/HomepageInput.tsx b/frontend/src/scenes/project-homepage/ai-first/HomepageInput.tsx
index e0d2463947f6..29f6e8600f9f 100644
--- a/frontend/src/scenes/project-homepage/ai-first/HomepageInput.tsx
+++ b/frontend/src/scenes/project-homepage/ai-first/HomepageInput.tsx
@@ -592,9 +592,16 @@ function IdleGrid(): JSX.Element {
onKeyDown={handleGridKeyDown}
>
{/* Suggestions list, or the selected topic's suggestions in the same slot */}
+ {/* The key remounts the column on every topic change, so the fade replays and the swap
+ reads as an answer to the badge click. Deselecting remounts without the class. */}
<div
+ key={selectedTopic ?? 'default'}
role="rowgroup"
- className={cn('flex-[2] min-w-0 flex flex-col gap-px', COLORFUL_ICONS)}
+ className={cn(
+ 'flex-[2] min-w-0 flex flex-col gap-px',
+ COLORFUL_ICONS,
+ selectedTopic && 'animate-fade-in motion-reduce:animate-none'
+ )}
data-attr="homepage-grid-column-suggestion"
style={{ minHeight: SUGGESTION_CARDS_HEIGHT_PX }}
>