Skip to content

Add editable recovery calendar dates and fix notification persistence on friend request actions#50

Merged
JustinhSE merged 3 commits intomainfrom
copilot/edit-calendar-dates-notifications
Feb 25, 2026
Merged

Add editable recovery calendar dates and fix notification persistence on friend request actions#50
JustinhSE merged 3 commits intomainfrom
copilot/edit-calendar-dates-notifications

Conversation

Copy link
Contributor

Copilot AI commented Feb 25, 2026

The recovery calendar was read-only, and friend request accept/decline actions removed notifications entirely instead of marking them as read.

Calendar date editing

  • Added updateCalendarDay(userId, date, markAsRelapse, triggers?, notes?) to firebase.ts — rewrites the user's relapses array for the target date (remove existing entry, optionally insert new one)
  • Added editable?: boolean prop to RelapseCalendar; when true, days are clickable and open a dialog to toggle clean/relapse with trigger + notes fields
  • Analytics.tsx passes editable={true} since it always renders the current user's own calendar
<RelapseCalendar userId={currentUser?.uid} editable={true} />

Notification read behavior

  • Accepting or declining a friend request now calls markNotificationAsRead() and updates local state (read: true) instead of pushing the ID into a dismissedIds set
  • Read friend-request notifications render dimmed (opacity-60) with accept/decline buttons hidden — consistent with standard app notification UX
  • Removed the now-unused dismissedIds state

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: JustinhSE <84724234+JustinhSE@users.noreply.github.com>
Copilot AI changed the title [WIP] Add ability to edit calendar dates and manage notifications Add editable recovery calendar dates and fix notification persistence on friend request actions Feb 25, 2026
@JustinhSE JustinhSE marked this pull request as ready for review February 25, 2026 22:03
@JustinhSE JustinhSE merged commit 268587f into main Feb 25, 2026
2 of 3 checks passed
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