Skip to content

In feed agents highlight#5797

Open
tomeredlich wants to merge 9 commits intomainfrom
in-feed-agents-highlight
Open

In feed agents highlight#5797
tomeredlich wants to merge 9 commits intomainfrom
in-feed-agents-highlight

Conversation

@tomeredlich
Copy link
Copy Markdown
Contributor

Changes

Events

Did you introduce any new tracking events?

Experiment

Did you introduce any new experiments?

Manual Testing

Caution

Please make sure existing components are not breaking/affected by this PR

Add a dark-style highlights module to My Feed top content using post highlights data, with inline row interactions and an agents footer link. Gate rollout behind a feature flag and log impression/click analytics for engagement tracking.

Made-with: Cursor
Apply formatting and accessibility-safe link updates for the new feed highlights top module and its feed wiring so changed-file lint checks pass cleanly.

Made-with: Cursor
Refresh the in-feed agents highlights module with a more contemporary dark panel style, stronger hierarchy, and improved row affordance while preserving inline interaction behavior and agents footer link.
EOF && git status --short

Made-with: Cursor
Move highlights to the first feed card slot and align header controls with existing card hover-actions, including subscribe and hide options. Polish visual density, footer placement, and staggered notification-style bubble entrance animation.

Made-with: Cursor
Apply the previewed feed highlights updates so the module layout, CTA behavior, and gradient styling match the intended in-product design refinements.

Made-with: Cursor
Deliver the new floating/minimized highlights experience with dismiss/minimize behavior, unread/new-item signaling, and refreshed styling so live feed updates are noticeable without being intrusive.

Made-with: Cursor
…ling

Improve the highlights module UX by restoring hover actions in the header menu, gating subscribe based on real follow state, and aligning list-layout visuals with feed patterns. This also adds a brief skeleton phase to signal fresh updates while keeping UI2 disabled.

Made-with: Cursor
Remove feed highlights load-entry/skeleton animations, tighten card spacing, and add explicit now/viewed/pressed/read states so item status is clear during a session.

Made-with: Cursor
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview Mar 25, 2026 8:50am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
storybook Ignored Ignored Mar 25, 2026 8:50am

Request Review

@tomeredlich
Copy link
Copy Markdown
Contributor Author

@claude check pr

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Mar 25, 2026

Claude finished @tomeredlich's task in 2m 18s —— View job


PR Review: In feed agents highlight

  • Gathering context
  • Reading changed files
  • Analyzing code
  • Posting review

Summary

This PR adds a "Happening Now" highlights module to the top of My Feed, backed by a POST_HIGHLIGHTS_QUERY GraphQL query and gated behind a featureFeedHighlightsModule feature flag (+ development override). The component also ships scaffolding for a "v2" floating widget/minimizable popover that is never activated.


Issues

🔴 Dead code: isFeedHighlightsUi2Enabled = false

FeedHighlightsTopModule.tsx:40 has this hardcoded:

const isFeedHighlightsUi2Enabled = false;

This constant gates a very large block of code that never executes: the entire floating popover section (~90 lines), the collapsed button section (~30 lines), unreadCount state, isPopoverOpen state, isDismissed state, the scroll listener effect, the simulate event listener, the minimize cooldown localStorage logic, and three useEffect hooks. Per the CLAUDE.md "Delete dead code" guideline, this should be removed if the feature isn't being shipped in this PR, or activated and tested if it is.

Fix this →

🔴 Dead CSS: .feed-highlights-menu-content never applied

utilities.css:678-686 defines:

.feed-highlights-menu-content {
  min-width: 12rem;
  ...
}
.feed-highlights-menu-content .DropdownMenuItem {
  height: 1.5rem;
  ...
}

But className="feed-highlights-menu-content" is never applied to <DropdownMenuContent> in FeedHighlightsTopModule.tsx (line 396). These styles have no effect. Either apply the class or remove the CSS.

Similarly, the notification-bubble-enter keyframe animation added to utilities.css:112-123 is never referenced anywhere in the component.

Fix this →


Observations

🟡 highlightAsNew is always index === 0

FeedHighlightsTopModule.tsx:413:

highlightAsNew={index === 0}

The first highlight always shows "Now" as the timestamp regardless of its actual age. This is probably intentional UX but worth confirming — if a highlight is 3 hours old it would still show "Now".

🟡 markHighlightViewed / markHighlightRead defined inside render

These functions at lines 354-375 are recreated on every render. They don't need to be defined inside the render body since they only call setState. They could be useCallback hooks or at minimum defined outside the if check block. Minor since HighlightRow isn't memoized, but inconsistent with the pattern used for callbacks in Feed.tsx.

🟡 No staleTime on the highlights query

Feed.tsx:344-351 — TanStack Query defaults to staleTime: 0, meaning the highlights will refetch every time the window regains focus. For a "Happening Now" module this may be intentional (always fresh data), but it's worth explicitly documenting or setting a staleTime if refetching on focus isn't desired.

🟡 digestSource as Source unsafe cast

FeedHighlightsTopModule.tsx:145:

const { isFollowing, toggleFollow } = useSourceActions({
  source: digestSource as Source,
});

digestSource may be undefined (query is loading or errored), and the cast bypasses TypeScript's null safety. Confirm useSourceActions handles an undefined source gracefully.

🟢 Good patterns

  • Feature flag gated with shouldEvaluate: isMyFeed to avoid unnecessary GrowthBook evaluations ✓
  • isDevelopment override for local dev testing ✓
  • Impression tracking with ref guard to avoid double-firing ✓
  • prefers-reduced-motion respected for gradient animations ✓
  • type="button" set on all buttons ✓
  • Proper RequestKey.PostHighlights used for query key ✓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant