Skip to content

refactor: rename mostRecentCompletionDate to lastActivity#152

Merged
owengretzinger merged 1 commit intomainfrom
01-11-refactor_rename_mostrecentcompletiondate_to_lastactivity
Jan 27, 2025
Merged

refactor: rename mostRecentCompletionDate to lastActivity#152
owengretzinger merged 1 commit intomainfrom
01-11-refactor_rename_mostrecentcompletiondate_to_lastactivity

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.

@graphite-app
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.

Copy link

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 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),

@owengretzinger owengretzinger merged commit ece42b5 into main Jan 27, 2025
2 checks passed
Copy link
Collaborator Author

Merge activity

  • Jan 27, 2:45 AM EST: A user merged this pull request with Graphite.

@owengretzinger owengretzinger deleted the 01-11-refactor_rename_mostrecentcompletiondate_to_lastactivity branch January 27, 2025 07:45
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.

3 participants