-
Notifications
You must be signed in to change notification settings - Fork 4
566 expiresAt should be null on party creation, only set once duel starts #603
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
Conversation
|
/deploy |
|
The command to deploy to staging for the commit fe75603 has been triggered. View action run |
Greptile SummaryChanged party lifecycle so Key changes:
Issues found:
|
| Filename | Overview |
|---|---|
| src/main/java/com/patina/codebloom/common/components/duel/PartyManager.java | Changed expiresAt to null on party creation; removed unused import |
| src/main/java/com/patina/codebloom/common/components/duel/DuelManager.java | Sets expiresAt to 30 minutes when duel starts; adds null check in endDuel |
Sequence Diagram
sequenceDiagram
participant User
participant PartyManager
participant DuelManager
participant Lobby
participant LobbyRepository
Note over User,LobbyRepository: Party Creation Flow
User->>PartyManager: createParty(userId)
PartyManager->>LobbyRepository: createLobby(lobby)
Note over Lobby: expiresAt = null
Note over Lobby: status = AVAILABLE
LobbyRepository-->>PartyManager: success
PartyManager-->>User: joinCode
Note over User,LobbyRepository: Duel Start Flow
User->>DuelManager: startDuel(playerId)
DuelManager->>LobbyRepository: findLobbyById(lobbyId)
LobbyRepository-->>DuelManager: lobby
DuelManager->>Lobby: setStatus(ACTIVE)
DuelManager->>Lobby: setExpiresAt(now + 30 minutes)
DuelManager->>LobbyRepository: updateLobby(lobby)
LobbyRepository-->>DuelManager: success
DuelManager-->>User: duel started
Note over User,LobbyRepository: Join Party Flow
User->>PartyManager: joinParty(userId, partyCode)
PartyManager->>LobbyRepository: findAvailableLobbyByJoinCode(partyCode)
LobbyRepository-->>PartyManager: lobby
alt expiresAt != null AND expired
PartyManager-->>User: DuelException: lobby expired
else valid
PartyManager->>LobbyRepository: updateLobby(lobby)
PartyManager-->>User: joined successfully
end
Note over User,LobbyRepository: End Duel Flow
User->>DuelManager: endDuel(lobbyId, isDuelCleanup)
DuelManager->>LobbyRepository: findLobbyById(lobbyId)
LobbyRepository-->>DuelManager: lobby
alt expiresAt != null AND not expired AND not cleanup
DuelManager-->>User: DuelException: not ready for expiration
else can end
DuelManager->>Lobby: setStatus(COMPLETED)
DuelManager->>LobbyRepository: updateLobby(lobby)
DuelManager-->>User: duel ended
end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 files reviewed, 1 comment
src/main/java/com/patina/codebloom/common/components/duel/PartyManager.java
Outdated
Show resolved
Hide resolved
Commit Validation FailedThe following commits do not start with the required Notion ID Please rebase and update your commit messages. |
53b45d3 to
6c995c4
Compare
|
/deploy |
|
The command to deploy to staging for the commit 6c995c4 has been triggered. View action run |
Commit Validation FailedThe following commits do not start with the required Notion ID Please rebase and update your commit messages. |
2b73c68 to
7e5113f
Compare
|
/deploy |
|
The command to deploy to staging for the commit 7e5113f has been triggered. View action run |
|
|
7e5113f to
9a5d1e0
Compare
|
/deploy |
|
The command to deploy to staging for the commit 9a5d1e0 has been triggered. View action run |
Commit Validation FailedThe following commits do not start with the required Notion ID Please rebase and update your commit messages. |
2dbb85a to
03a7ba3
Compare
|
/deploy |
|
The command to deploy to staging for the commit 03a7ba3 has been triggered. View action run |
|
03a7ba3 to
48224b4
Compare
|
/deploy |
|
The command to deploy to staging for the commit 48224b4 has been triggered. View action run |
1716814 to
4c9a85e
Compare
|
/deploy |
|
The command to deploy to staging for the commit 4c9a85e has been triggered. View action run |
4c9a85e to
b76be29
Compare
|
/deploy |
|
The command to deploy to staging for the commit b76be29 has been triggered. View action run |
b76be29 to
c031856
Compare
|
/deploy |
|
The command to deploy to staging for the commit c031856 has been triggered. View action run |
c031856 to
2b7b0e2
Compare
|
/deploy |
|
The command to deploy to staging for the commit 2b7b0e2 has been triggered. View action run |
|
src/main/java/com/patina/codebloom/common/components/duel/PartyManager.java
Outdated
Show resolved
Hide resolved
2b7b0e2 to
b6ad08a
Compare
… once duel starts spotless test errors bug fix spotless changes forgot db migration had to update lobby repo
same thing Naming changes
changes changes spotless testing changes test changes spotless pr changes
b6ad08a to
7e2a8d8
Compare
|
|
566
566
changed so expire at is null when creating and then sets a expire at when starts
Description of changes
Checklist before review
Screenshots
Staging
When Create Party:


When Started