Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rename mostRecentCompletionDate to lastActivity #152

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

owengretzinger
Copy link
Collaborator

@owengretzinger owengretzinger commented Jan 11, 2025

TL;DR

Renamed mostRecentCompletionDate to lastActivity and added participant ID to habit data structure.

What changed?

  • Renamed mostRecentCompletionDate field to lastActivity across all habit-related files
  • Added participant ID to the habit data structure
  • Added use-habit-completions export
  • Updated participant schema to include ID in the record type

Why make this change?

The rename from mostRecentCompletionDate to lastActivity better reflects the field's purpose, as it tracks general user activity rather than just completions. Adding participant IDs improves data consistency and makes it easier to reference specific participants throughout the application.

Copy link
Collaborator Author

owengretzinger commented Jan 11, 2025

Copy link

graphite-app bot commented Jan 11, 2025

Graphite Automations

"Request reviewers once CI passes" took an action on this PR • (01/11/25)

1 reviewer was added to this PR based on Owen Gretzinger's automation.

Choose a reason for hiding this comment

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

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

Files not reviewed (2)
  • src/api/habits/types.ts: Evaluated as low risk
  • src/api/habits/use-create-habit.tsx: Evaluated as low risk
Comments suppressed due to low confidence (1)

src/api/habits/use-habits.tsx:34

  • Redundant conversion of lastActivity to a Date object. If participant.lastActivity is already a Date object, this conversion is unnecessary and could introduce a bug if lastActivity is not a valid date string.
lastActivity: new Date(participant.lastActivity),
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