Skip to content

fix: hide new quest badge for users created less than 24 hours ago#5880

Merged
AmarTrebinjac merged 2 commits intomainfrom
eng-1263-dont-show-new-on-quests-for-users-made-in-the-last-24-hours
Apr 19, 2026
Merged

fix: hide new quest badge for users created less than 24 hours ago#5880
AmarTrebinjac merged 2 commits intomainfrom
eng-1263-dont-show-new-on-quests-for-users-made-in-the-last-24-hours

Conversation

@AmarTrebinjac
Copy link
Copy Markdown
Contributor

@AmarTrebinjac AmarTrebinjac commented Apr 16, 2026

Summary

  • Added an account age check to QuestButton so the "new" quest rotation badge is hidden for users whose account is less than 24 hours old
  • The check gates the existing hasNewQuestRotations flag with isAccountOlderThan24Hours, which means the markQuestRotationsViewed mutation also won't fire for new users
  • Added two test cases (new user < 24h, established user > 24h) and updated the existing rotation test to use an established user fixture

Key decisions

  • Single frontend check at the hasNewQuestRotations derivation point — all downstream consumers (badge, aria labels, mark-as-viewed effect) automatically benefit
  • No new imports needed; uses native Date.now() and new Date() for the 24-hour comparison
  • Refactored renderComponent in tests to use named parameters for better readability when passing auth

Test plan

  • New test: "new" indicator hidden when user.createdAt < 24h ago
  • New test: "new" indicator shown when user.createdAt > 24h ago
  • Existing quest rotation tests updated and passing
  • All 1328 tests pass, lint clean

Closes ENG-1263


Created by Huginn 🐦‍⬛

Preview domain

https://eng-1263-dont-show-new-on-quests.preview.app.daily.dev

Users who just registered see everything as new, making the "new" quest
rotation badge confusing and distracting from onboarding. This adds an
account age check so the badge only appears for accounts older than 24h.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 16, 2026

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

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview Apr 19, 2026 1:56pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
storybook Ignored Ignored Apr 19, 2026 1:56pm

Request Review

@AmarTrebinjac AmarTrebinjac merged commit 9d0dd6f into main Apr 19, 2026
13 checks passed
@AmarTrebinjac AmarTrebinjac deleted the eng-1263-dont-show-new-on-quests-for-users-made-in-the-last-24-hours branch April 19, 2026 13:57
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