Skip to content

Conversation

@DylanDevelops
Copy link
Owner

This pull request introduces changes to the convex module to add and utilize a new lastPlayTimestamp field in the user schema, which helps in tracking the last time a user played. The most important changes include modifications to the schema definition and updates to the finishDailyChallenge and updateStreak mutations to use this new field.

Schema updates:

  • convex/schema.ts: Added lastPlayTimestamp as an optional number field in the user schema.

Mutation updates:

  • convex/users.ts: Updated the finishDailyChallenge mutation to set lastPlayTimestamp to the current time when a daily challenge is completed.
  • convex/users.ts: Modified the updateStreak mutation to use lastPlayTimestamp instead of lastDailyChallengeCompletion for determining the last play time. [1] [2]

@DylanDevelops DylanDevelops requested a review from Copilot April 10, 2025 05:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

convex/users.ts:130

  • [nitpick] Both lastDailyChallengeCompletion and lastPlayTimestamp are updated in finishDailyChallenge. Please confirm if updating the legacy field is still required or if it can be removed to avoid potential data inconsistency.
lastPlayTimestamp: now,

@DylanDevelops DylanDevelops merged commit ca77828 into main Apr 10, 2025
3 checks passed
@DylanDevelops DylanDevelops deleted the fix-to-timestamps branch April 10, 2025 05:54
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.

2 participants