You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Read through the full diff (git diff origin/main...HEAD) and traced all postHighlight/hero usages across the codebase. This is a clean rename of the feed-level post.postHighlight field to post.hero, plus two new significance values (breakout, evergreen). Tests, fragment, col-span logic and impression logging are all updated consistently. 👍
Findings
1. Dead code left behind in posts.ts (should remove)
The Post.postHighlight field and the PostHighlight interface in packages/shared/src/graphql/posts.ts are now unreferenced — every consumer (ArticleFeaturedWideGridCard, feedHighlightColSpan, useLogImpression) reads post.hero, and FEED_POST_FRAGMENT no longer requests postHighlight. So:
posts.ts:322 — postHighlight?: PostHighlight | null; has no readers
posts.ts:250-256 — interface PostHighlight is now unused
Per CLAUDE.md ("Delete dead code — don't leave code for later"), these should be removed. Keep PostHighlightSignificance (posts.ts:239) — it's still the base for PostHeroSignificance.
2. Naming collision (pre-existing, but worth a note)
PostHighlight and PostHighlightSignificance are defined in bothgraphql/posts.ts and graphql/highlights.ts (the unrelated highlights-feed page). CLAUDE.md flags duplicate names in different locations as confusing. Removing the dead posts.tsPostHighlight (finding #1) also eliminates half of this collision for free.
Minor / optional
New significance values untested:feedHighlightColSpan.spec.ts and ArticleFeaturedWideGridCard.spec.tsx still only cover breaking/major/notable/routine. Since the whole point of the PR is breakout (→ colSpan 4, "Breaking out") and evergreen (→ colSpan 3, "Evergreen"), consider adding those to the it.each tables to lock in the new mappings.
Significance nullability:PostHero.significance is non-nullable (posts.ts:329), whereas the old PostHighlight.significance was … | null. Consumers use post.hero?.significance ?? null so this is safe — just confirm the API (daily-api#3925) never returns hero with a null significance.
Nothing blocking — the core change is correct and consistent. The dead postHighlight/PostHighlight cleanup is the only thing I'd ask for before merge.
· branch post-hero
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
API dailydotdev/daily-api#3925
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
Preview domain
https://post-hero.preview.app.daily.dev