Skip to content

Fix misleading weekly reward previews - #80

Merged
XxFran10xX merged 1 commit into
mainfrom
fix/reward-preview-ranges
Sep 30, 2026
Merged

XxFran10xX merged 1 commit into
mainfrom
fix/reward-preview-ranges

Conversation

@XxFran10xX

@XxFran10xX XxFran10xX commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

The weekly reward tooltip lists every weighted entry, making alternative payouts look cumulative. Summarize amounts by item as a range (for example x2–8 Ignitium), and explicitly label the number of independent random draws and their alternatives.

The planned Act 1 pool fits in three material lines, with per-draw ranges of 20–80 Ignitium, 2–8 raw tin and 2–8 abyssalite fragments. Draw counts follow the multiplier pool whitelist; fixed rewards retain their multiplied amount. Command/bundle outcomes retain their descriptions, and large pools show at most four options plus a remaining count. No reward pools, probabilities or payouts change.

Validation:

  • Reviewed the complete diff and passed Java 21 mvn clean verify: 786 tests, no failures or skips.
  • Development CI passed at commit 12453c6 (run 36746234251); inspected the timestamped JAR and its embedded version.
  • Installed that CI artifact on TFMCDev01 (Paper 1.21.10-130), restarted the empty dev server and verified Activity enabled with its integrations.
  • A protocol test client opened the actual GUI and verified the tooltip says One random reward from: and x2–8 Ignitium, with the raw tier lines removed. Existing messages.yml works via packaged defaults.
  • Mixed Act 1 ranges, skin pool whitelist, claim prompts, empty/large pools, bundles/commands, and item-based bounds are covered by tests. The Act 1 proposal remains unapplied.

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: b481f8fb-0346-4972-9ae7-6d69b1df943f

📥 Commits

Reviewing files that changed from the base of the PR and between 7b73655 and 12453c6.

📒 Files selected for processing (4)
  • src/main/java/net/tfminecraft/activitytf/gui/ActivityGui.java
  • src/main/java/net/tfminecraft/activitytf/gui/RewardPreview.java
  • src/main/resources/messages.yml
  • src/test/java/net/tfminecraft/activitytf/gui/ActivityGuiTest.java

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


📝 Walkthrough

Walkthrough

Weekly-reward lore now summarizes reward-pool options and shows previews for the next milestone. It uses configured pool eligibility to determine draw counts, limits the displayed options, and provides messages for unavailable previews and undisplayed options.

Changes

Weekly Reward Preview

Layer / File(s) Summary
Summarize reward options
src/main/java/net/tfminecraft/activitytf/gui/RewardPreview.java
RewardPreview.summarize skips entries with nonpositive weight. It groups eligible single-item entries by item path and normalized label, tracks amount bounds, and preserves other display options in insertion order with duplicate labels removed.
Show previews in weekly-reward lore
src/main/java/net/tfminecraft/activitytf/gui/ActivityGui.java, src/main/resources/messages.yml, src/test/java/net/tfminecraft/activitytf/gui/ActivityGuiTest.java
ActivityGui passes configured multiplier pools to weeklyRewardLore. The lore uses summarized options and shows up to four displays, with messages for empty previews and undisplayed options. Tests cover quantity ranges, distinct items, reward descriptions, preview limits, and empty pools.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: drefvelin

Merge Risk: ⚪ Minimal · up to 12453

The previews summarize alternative rewards without an established payout change. The reported null lookup is unreachable; this change is mergeable subject to normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 3 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: correcting misleading weekly reward previews.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 3 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


A rabbit counts the prizes bright,
And groups the carrots by their size.
Four choices hop into the light,
More wait beyond the preview’s eyes.
The weekly page now tells the tale.

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

@XxFran10xX
XxFran10xX merged commit 408b99a into main Sep 30, 2026
2 checks passed
@XxFran10xX
XxFran10xX deleted the fix/reward-preview-ranges branch September 30, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant