Conversation
Two bugs fixed: 1. AdminStore: getInvitedPlayerIds was silently discarding the status filter due to Kysely's immutable builder pattern. Changed const to let and reassigned the builder to properly apply the filter. 2. GameSession: #scheduleJoinRemindersTask was scheduling 24h from the current time (DO startup) rather than from session creation time. After the initial reminder fired and the task was deleted, a DO restart would reschedule another reminder 24h in the future, causing repeated notifications with ever-increasing 'days ago' counts. Fixed to always schedule relative to sessionData.createdAt, and skip if that time has already passed. Agent-Logs-Url: https://github.com/a-type/rout/sessions/8bb42897-cd20-46ff-acff-fabe64647b99 Co-authored-by: a-type <2829772+a-type@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix join reminder notification date
Fix join reminder notifications firing repeatedly with stale dates
Mar 28, 2026
a-type
requested changes
Mar 28, 2026
Owner
a-type
left a comment
There was a problem hiding this comment.
Please change the game join reminder to be scheduled for 8 am every day, until the game session is no longer pending.
…er pending Instead of a one-shot 24h reminder, the join reminder now fires every day at 8 AM (in the session's timezone) as long as there are still pending invitees. After sending, #sendJoinReminders reschedules for 8 AM the next day (mirroring the turn-reminder pattern). Also removes unused addHours import. Agent-Logs-Url: https://github.com/a-type/rout/sessions/6cf1b1ce-9199-4a4f-8d22-f3a0e46cb8a7 Co-authored-by: a-type <2829772+a-type@users.noreply.github.com>
Contributor
Author
Done in 7228a10. Join reminders now fire at 8 AM every day in the session's timezone. After each send, |
Copilot
AI
changed the title
Fix join reminder notifications firing repeatedly with stale dates
Fix join reminder notifications: status filter bug and daily 8 AM scheduling
Mar 28, 2026
a-type
approved these changes
Mar 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two bugs caused join reminder notifications to show incorrect dates and be sent to the wrong recipients. Additionally, the reminder scheduling has been changed to a daily cadence.
Bugs fixed
AdminStore.getInvitedPlayerIds— status filter silently droppedKysely builders are immutable; the
.where(statusFilter)result was never reassigned, so{ statusFilter: 'pending' }was ignored and all invitations (including accepted/declined) were returned.GameSession.#scheduleJoinRemindersTask— reminder rescheduled on every DO wake-upThe reminder was scheduled as
addHours(new Date(), 24). After the initial reminder fired (deleting the task from the scheduler), any subsequent DO hibernation/wake cycle with the game stillpendingwould schedule another reminder 24h from that new wake time — producing repeated notifications with ever-increasing "N days ago" counts.Scheduling change
Join reminders now fire at 8 AM every day (in the session's timezone) instead of once 24 hours after session creation. After each send,
#sendJoinRemindersreschedules itself for 8 AM the next day — mirroring the existing turn-reminder pattern. Rescheduling stops automatically when the game session is no longer pending or when there are no remaining pending invitees.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.