Repository navigation
Feat/streak pause - #11
Merged
Merged
Conversation
…lers and database support [danke claude]
There was a problem hiding this comment.
Pull request overview
Adds “streak pauses” so login streaks can survive planned downtime/maintenance windows, and introduces admin tooling + microservice storage/handlers to manage these pauses and (re)calculate streaks accordingly.
Changes:
- Extend join-time streak progression to allow gaps fully covered by configured pause ranges.
- Add admin commands to manage streak pauses and to recalculate streaks (single player / all).
- Add microservice persistence + RabbitMQ request handlers for streak pauses, and update streak calculation to be pause-aware (including new recalc endpoints).
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| surf-playtime-paper/src/main/kotlin/dev/slne/surf/playtime/paper/listener/PlayerJoinListener.kt | Uses streak-pause ranges to keep streaks alive across covered gaps. |
| surf-playtime-paper/src/main/kotlin/dev/slne/surf/playtime/paper/command/PlaytimeAdminCommand.kt | Adds admin commands for streak recalculation and streak-pause CRUD/listing. |
| surf-playtime-microservice/src/main/kotlin/dev/slne/surf/playtime/microservice/table/PlaytimeStreakPausesTable.kt | Introduces DB table for storing streak pause ranges. |
| surf-playtime-microservice/src/main/kotlin/dev/slne/surf/playtime/microservice/repository/PlaytimeStreakRepository.kt | Makes streak calculation pause-aware and adds recalc operations (single/all). |
| surf-playtime-microservice/src/main/kotlin/dev/slne/surf/playtime/microservice/repository/PlaytimeStreakPauseRepository.kt | Adds repository operations for listing/creating/deleting pause ranges. |
| surf-playtime-microservice/src/main/kotlin/dev/slne/surf/playtime/microservice/PlaytimeMicroservice.kt | Registers new pause table and Rabbit handler at service startup. |
| surf-playtime-microservice/src/main/kotlin/dev/slne/surf/playtime/microservice/handler/PlaytimeStreakPauseHandler.kt | Adds RabbitMQ handlers for pause list/create/delete. |
| surf-playtime-microservice/src/main/kotlin/dev/slne/surf/playtime/microservice/handler/PlaytimeStreakHandler.kt | Adds RabbitMQ handlers for streak recalculation endpoints. |
| surf-playtime-core/surf-playtime-core-paper/src/main/kotlin/dev/slne/surf/playtime/core/paper/service/PlaytimeStreakServiceImpl.kt | Exposes new pause + recalc requests via the Paper service implementation. |
| surf-playtime-core/surf-playtime-core-common/src/main/kotlin/dev/slne/surf/playtime/core/common/service/PlaytimeStreakService.kt | Extends the service contract with pause + recalc APIs. |
| surf-playtime-core/surf-playtime-core-common/src/main/kotlin/dev/slne/surf/playtime/core/common/rabbit/packet/response/PlaytimeStreakPausesResponsePacket.kt | Adds response packet for pause listing. |
| surf-playtime-core/surf-playtime-core-common/src/main/kotlin/dev/slne/surf/playtime/core/common/rabbit/packet/response/PlaytimeStreakPauseResponsePacket.kt | Adds response packet for pause creation. |
| surf-playtime-core/surf-playtime-core-common/src/main/kotlin/dev/slne/surf/playtime/core/common/rabbit/packet/request/RecalculatePlaytimeStreakRequestPacket.kt | Adds request packet for per-player recalculation. |
| surf-playtime-core/surf-playtime-core-common/src/main/kotlin/dev/slne/surf/playtime/core/common/rabbit/packet/request/RecalculateAllPlaytimeStreaksRequestPacket.kt | Adds request packet for global recalculation. |
| surf-playtime-core/surf-playtime-core-common/src/main/kotlin/dev/slne/surf/playtime/core/common/rabbit/packet/request/LoadPlaytimeStreakPausesRequestPacket.kt | Adds request packet for pause listing. |
| surf-playtime-core/surf-playtime-core-common/src/main/kotlin/dev/slne/surf/playtime/core/common/rabbit/packet/request/DeletePlaytimeStreakPauseRequestPacket.kt | Adds request packet for pause deletion. |
| surf-playtime-core/surf-playtime-core-common/src/main/kotlin/dev/slne/surf/playtime/core/common/rabbit/packet/request/CreatePlaytimeStreakPauseRequestPacket.kt | Adds request packet for pause creation. |
| surf-playtime-api/surf-playtime-api-common/src/main/kotlin/dev/slne/surf/playtime/api/common/session/PlaytimeStreakPause.kt | Adds shared API model for a streak pause range. |
| gradle.properties | Bumps project version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Keviro
approved these changes
Jul 19, 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.
No description provided.