Skip to content

fix: label battle-hour votes in CET/EST, not UTC - #205

Merged
XxFran10xX merged 2 commits into
mainfrom
battle-hour-message
Oct 24, 2026
Merged

XxFran10xX merged 2 commits into
mainfrom
battle-hour-message

Conversation

@XxFran10xX

Copy link
Copy Markdown
Contributor

Picking a battle hour in the campaign menu replied "Added 21:00 UTC to your availability". Battle hours are schedule hours in Europe/Paris (BattleWindowService.SCHEDULE_ZONE, and the comment in ConfigLoader), so "21:00 UTC" was an hour or two off. The hour items in the same menu already say "21:00 CET / 15:00 EST" through CampaignUiTimeFormatter.formatUtcHour.

The add and remove replies now use that same formatter, for example "Added 21:00 CET / 15:00 EST to your availability."

Found in the wiki audit for TFMCWeb #305. Tests: CampaignMenusCoverageTest (86) and CampaignUiTimeFormatterTest pass locally. No new branches, so coverage is unchanged.

🤖 Generated with Claude Code

Battle hours are Europe/Paris schedule hours, but the chat reply said
"20:00 UTC". It now uses the same CET / EST label as the vote items.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 252392d8-acf2-4917-ab5e-91d6696a619c
Commits

Reviewing files that changed from the base of the PR and between 759e662 and c8f686c.

Files selected for processing: 2
  • src/main/java/net/tfminecraft/simplefactions/managers/inventory/CampaignView.java
  • src/test/java/net/tfminecraft/simplefactions/managers/inventory/CampaignMenusCoverageTest.java

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Battle-hour vote confirmation messages now display the selected hour in the campaign’s formatted local time, rather than showing a fixed UTC time.
    • The same time format is used when confirming that a vote has been added or removed.

Added and removed battle-hour vote confirmations now use a formatted time label based on the war’s battle day and hour. The vote-toggle test checks the label and both confirmation messages.

Changes: Campaign vote labels

Layer / File(s) Summary
Format battle-hour vote confirmations
src/main/java/net/tfminecraft/simplefactions/managers/inventory/CampaignView.java, src/test/java/net/tfminecraft/simplefactions/managers/inventory/CampaignMenusCoverageTest.java
Added and removed vote messages now use the formatted battle-hour label and hex formatting. The test checks that the label starts with 20:00 CET and verifies both confirmation messages.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: ryanbarlow97

Merge Risk: Minimal · up to c8f68

The PR correctly aligns vote confirmations with the campaign’s CET/EST time labels.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the size:XS 0-9 effective changed lines (tests excluded in mixed PRs). label Oct 24, 2026
The CET / EST label dims the New York date with a hex colour when it
falls on the previous day; run the reply through formatHex like the vote
items so chat never shows the raw code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@XxFran10xX

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@XxFran10xX
XxFran10xX merged commit 2dd360f into main Oct 24, 2026
3 checks passed
@XxFran10xX
XxFran10xX deleted the battle-hour-message branch October 24, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant