Skip to content

fix: keep below-threshold label only on cards#5829

Closed
nimrodkra wants to merge 6 commits intomainfrom
feat/card-only-upvote-label-visibility
Closed

fix: keep below-threshold label only on cards#5829
nimrodkra wants to merge 6 commits intomainfrom
feat/card-only-upvote-label-visibility

Conversation

@nimrodkra
Copy link
Copy Markdown
Member

Summary

  • Keep belowThresholdLabel rendering on card surfaces only.
  • Remove label fallback rendering from post page, repost modal, and extension companion while preserving numeric upvote behavior.
  • Add focused regression tests for non-card surfaces to ensure New never appears there.

Test plan

  • node ./scripts/typecheck-strict-changed.js
  • NODE_ENV=test pnpm --filter shared exec jest src/components/post/PostUpvotesCommentsCount.spec.tsx src/components/modals/RepostListItem.spec.tsx
  • NODE_ENV=test pnpm --filter extension exec jest src/companion/CompanionEngagements.spec.tsx

Made with Cursor

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
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 31, 2026

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

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview Mar 31, 2026 8:22pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
storybook Ignored Ignored Mar 31, 2026 8:22pm

Request Review

@nimrodkra
Copy link
Copy Markdown
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.

@nimrodkra nimrodkra closed this Mar 31, 2026
@nimrodkra nimrodkra deleted the feat/card-only-upvote-label-visibility branch March 31, 2026 21:12
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