Conversation
Gate new collection card behavior behind the `collection_card_enhancements` GrowthBook flag: - Show number of sources after the read time on grid and list cards - Use `updatedAt` with an "Updated" label when the post was edited after creation - Surface a `HIGHLIGHT` raised label on cards featured in Happening Now - Mirror the same source count, "Last updated" prefix, and "Featured in Happening Now" pill on the collection post page The flag is evaluated once in `Feed.tsx` and propagated through `FeedCardContext` so feed cards do not re-evaluate per render. The `majorHeadlines` query only runs when the flag is enabled. Made-with: Cursor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@claude please review this pr |
|
Claude finished @nimrodkra's task in 3m 6s —— View job PR Review: feat/collection-card-enhancementsTasks
Overall this is a clean, well-scoped implementation. The flag propagation pattern via Issues1. Logic duplication: The same expression appears independently in const wasUpdated =
collectionEnhancementsEnabled &&
!!post.updatedAt &&
post.updatedAt !== post.createdAt;Per the codebase's no-duplication guideline this should be a shared utility. Consider adding 2. Duplicated description string
3. Arbitrary Tailwind value 'feed-highlights-title-gradient text-[0.5rem] leading-none'This uses an arbitrary value outside the design system token set. The Observations / non-blocking4. Copy inconsistency between card and post page Cards show 5. Dual-source The set is populated from both 6. The What looks good ✓
|
Resolve pre-existing strict-mode errors in files modified by the collection card enhancements so `typecheck_strict_changed` passes on CI. Made-with: Cursor
- Remove featureCollectionCardEnhancements flag; collection card/date/source enhancements are always on. - Drop highlight cross-referencing in Feed.tsx and the majorHeadlines query on the collection post page. This removes two extra API calls. - Remove RaisedLabelType.Highlight variant and the "Featured in Happening Now" pill on the collection post page. - Extract isPostUpdated helper in graphql/posts for the updated-date check. - Reuse shared pluralize helper for the "N source(s)" label. Made-with: Cursor
Made-with: Cursor
Use comment-style short format (e.g. "11h ago", "45m ago") for collection "Updated" timestamps that fall on today or yesterday. Older updates keep the absolute date format. Applies to collection grid/list cards and the collection post page. Made-with: Cursor
Summary
Updatedlabel usingupdatedAtinstead ofcreatedAt.11h ago,45m ago,1d ago). Older updates keep the absolute date (e.g.Mar 15).Last updatedprefix.Shared helpers
isPostUpdated(graphql/posts.ts) and a newTimeFormatType.PostUpdated/postUpdatedDateFormat(lib/dateFormat.ts) keep the logic in one place across cards and the post page.Test plan
/and/sources/collections, collection cards showN source(s)after read time.updatedAt !== createdAt, the date label becomesUpdated <…>; otherwise the original created date is shown with no prefix.Updated 11h ago/Updated 1d ago; older updates renderUpdated Mar 15.Last updated <…>only when edited, with the relative format for today/yesterday, plusN source(s)next to it.Preview domain
https://feat-collection-card-enhancement.preview.app.daily.dev