fix: keep below-threshold label only on cards#5829
Closed
Conversation
Refine the upvote-threshold experiment so below-threshold labels render only for recent posts while preserving numeric counts for user-upvoted and at-threshold content across all surfaces. Made-with: Cursor
Document recency edge-case behavior in the shared helper and add missing edge-case tests for undefined createdAt, old at-threshold posts, and disabled-threshold zero-upvote behavior. Made-with: Cursor
Align below-threshold label visibility with the same calendar-day rule used by post date labels so posts labeled Yesterday no longer show the New label. Made-with: Cursor
Use Date.now as the single source of current time in upvote label day checks so mocked time in tests and CI stays consistent. Made-with: Cursor
Remove below-threshold label rendering from post page, repost modal, and extension companion while preserving card surfaces and adding focused non-card regression tests. Made-with: Cursor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
|
Superseded by #5830, which contains the same card-only change on a clean branch from main. Closing this PR to avoid conflict noise. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
belowThresholdLabelrendering on card surfaces only.Newnever appears there.Test plan
node ./scripts/typecheck-strict-changed.jsNODE_ENV=test pnpm --filter shared exec jest src/components/post/PostUpvotesCommentsCount.spec.tsx src/components/modals/RepostListItem.spec.tsxNODE_ENV=test pnpm --filter extension exec jest src/companion/CompanionEngagements.spec.tsxMade with Cursor