You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds a "Time control" entry to the player-vs-bot create-game modal so users can pick a time control before starting a PvB game. Backend wiring is partial: the API DTO accepts the new fields, but DB persistence and clock enforcement are not yet implemented.
Changes Made
Merged master into the branch (it had been updated recently).
PvB modal (webapp/src/main/resources/modals/play-bot.html): added a "Time control" row whose button toggles the modal body to a sub-panel listing time controls — No time control (default) / 1m / 2m+1s / 3m / 5m / 10m / 30m. A "back" button in the modal footer returns to the main panel.
Modal handler (webapp/src/main/resources/public/js/modal-handlers/play-bot-modal-handler.js): added the bot-tc-option-button-div exclusion group, click handlers for show/hide of the sub-panel, selection-to-label sync, and inclusion of timeControlBase / timeControlIncrement in the /api/botgame/create request body.
CreateBotGameRequest: added nullable timeControlBase and timeControlIncrement fields.
PlayerVsBotGameService.create: basic validation rejecting non-positive base, negative increment, or increment without a base.
Design notes
Confirmed in PR thread: the bot will also have a time limit (even though responses are near-instant). Per the request, the time-control selection lives behind a button on the modal rather than inline.
Not yet in this PR (intended follow-ups)
Persist time control on bot_game (Liquibase migration + DAO).
Server-side per-move clock computation and TIME_LOSS outcome (for both human and bot clocks).
Clock UI on the PvB game page (decrement loop, display).
TimeControl PGN tag in buildPgnMetadata.
Tests mirroring the PvP time-control suite.
Selecting a time control therefore currently has no in-game effect — it is plumbed only as far as the create request.
@copilot The bot will have time limit too (even though its response time is more or less instantaneous). On the PvB modal (merge master into the branch cause it's been updated recently), add a "Time control" button which leads to a separate bit of the of the modal with a list of Time control.
@copilot The bot will have time limit too (even though its response time is more or less instantaneous). On the PvB modal (merge master into the branch cause it's been updated recently), add a "Time c...
Merged master into the branch and added a "Time control" row to the PvB modal that toggles a sub-panel listing time controls (None / 1m, 2m+1s / 3m, 5m / 10m, 30m). Selecting one updates the label on the main panel; "back" returns without changing the selection. The chosen TC is sent in the create-game request body, and the backend DTO accepts it with basic validation — but DB persistence, per-move clock enforcement (incl. the bot's clock), and the on-page clock UI are not in this commit yet, so picking a time control currently has no in-game effect. Want me to continue with those next?
CopilotAI
changed the title
Clarification needed: scope of "pvb with time control"
Add Time control button + sub-panel to PvB modal
Jun 2, 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
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.
Adds a "Time control" entry to the player-vs-bot create-game modal so users can pick a time control before starting a PvB game. Backend wiring is partial: the API DTO accepts the new fields, but DB persistence and clock enforcement are not yet implemented.
Changes Made
masterinto the branch (it had been updated recently).webapp/src/main/resources/modals/play-bot.html): added a "Time control" row whose button toggles the modal body to a sub-panel listing time controls —No time control(default) /1m/2m+1s/3m/5m/10m/30m. A "back" button in the modal footer returns to the main panel.webapp/src/main/resources/public/js/modal-handlers/play-bot-modal-handler.js): added thebot-tc-option-button-divexclusion group, click handlers for show/hide of the sub-panel, selection-to-label sync, and inclusion oftimeControlBase/timeControlIncrementin the/api/botgame/createrequest body.CreateBotGameRequest: added nullabletimeControlBaseandtimeControlIncrementfields.PlayerVsBotGameService.create: basic validation rejecting non-positive base, negative increment, or increment without a base.Design notes
Confirmed in PR thread: the bot will also have a time limit (even though responses are near-instant). Per the request, the time-control selection lives behind a button on the modal rather than inline.
Not yet in this PR (intended follow-ups)
bot_game(Liquibase migration + DAO).TIME_LOSSoutcome (for both human and bot clocks).TimeControlPGN tag inbuildPgnMetadata.Selecting a time control therefore currently has no in-game effect — it is plumbed only as far as the create request.