Skip to content

Add /tigl games command for ongoing TIGL games by rank#4481

Merged
wholton merged 5 commits intomasterfrom
codex/add-ongoing-tigl-games-ranking-feature
Feb 27, 2026
Merged

Add /tigl games command for ongoing TIGL games by rank#4481
wholton merged 5 commits intomasterfrom
codex/add-ongoing-tigl-games-ranking-feature

Conversation

@wholton
Copy link
Collaborator

@wholton wholton commented Feb 27, 2026

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new /tigl games command that displays ongoing TIGL (Twilight Imperium Global League) games grouped by rank tier. The command helps moderators and players quickly see how many active league games exist at each progression level without manually scanning channels.

Changes:

  • Added a new Games subcommand class implementing /tigl games with an optional show_game_ids boolean parameter
  • Introduced SHOW_GAME_IDS constant in Constants.java for the new option
  • Registered the new subcommand in TiglCommand

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/main/java/ti4/helpers/Constants.java Added SHOW_GAME_IDS constant for the new command option
src/main/java/ti4/commands/tigl/TiglCommand.java Registered the new Games subcommand in the command stream
src/main/java/ti4/commands/tigl/Games.java Implemented the complete /tigl games command logic, filtering ongoing TIGL games and grouping them by rank

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Replace wildcard static import with specific StringUtils methods, tidy up StringBuilder append formatting, and simplify conditional logic. UnfiledButtonHandlers: replace wildcard import with capitalize/countMatches/isNotBlank and remove the redundant netGain == properGain check so PromissoryNoteHelper.resolvePNPlay runs when netGain > 2 && cyber. Games: reformat chained sb.append calls for readability. ListTitlesGivenService: collapse multi-line sb.append chains into single-line appends and remove an extra blank line. Primarily cleanup and readability changes, with a deliberate behavioral change in the PN resolution condition.
Introduce TIGLHelper.getSortedRanks() to centralize rank filtering and ordering, using Stream API. Update Games to use ManagedGame::getGame, call the new getSortedRanks() helper, remove an unused Comparator import, and make the Games constructor package-private. These changes simplify rank handling and tidy up imports/constructors.
Introduce TiglGamesInfoService to build the ongoing TIGL games-by-rank message from the database and replace in-memory aggregation in the Games command. Persist a new twilightImperiumGlobalLeagueRank field on GameEntity (and set it in PersistAllEntitiesService) and add a repository method to fetch active TIGL games. Update Games command to call the service. This moves TIGL game listing logic to a transactional Spring service and removes direct dependency on in-memory GameManager for that view.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Games: when the showGameIds option is true, post the detailed message into a thread titled "Ongoing TIGL games" instead of the main channel; otherwise keep existing channel behavior. TIGLHelper: add null/blank guard in fromString to avoid NPEs, add Lombok @Getter for the name field and remove the manual getter, and include a static import for isBlank. These changes improve UI noise control for game IDs and add minor cleanup and null safety.
@wholton wholton merged commit 1637675 into master Feb 27, 2026
2 checks passed
@wholton wholton deleted the codex/add-ongoing-tigl-games-ranking-feature branch February 27, 2026 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants