Skip to content

fix: send an empty compound with keyboard clicks - #24

Merged
JustinasLa merged 1 commit into
mainfrom
fix/keyboard-click-payload
Oct 10, 2026
Merged

JustinasLa merged 1 commit into
mainfrom
fix/keyboard-click-payload

Conversation

@JustinasLa

Copy link
Copy Markdown
Contributor

nightcore 2.13.2 PaperDialogListener parses the payload of every PlayerCustomClickEvent as a compound tag. The keyboard sent "0b", so each note, chord or options click logged Expected compound tag at position 2: 0b with a stack trace (815 times on main on 2026-10-10).

The keyboard ignores the payload (it only reads the click key), so this sends "{}" instead. Tests assert the payload on every cell and the options button.

  • mvn verify: tests and coverage checks pass.

nightcore parses every custom click payload as a compound tag, so the
"0b" payload logged a stack trace for each keyboard press on main.
The keyboard never reads the payload; "{}" keeps the clicks the same.
@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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: 062df6fe-6316-4dc4-93f2-36f5bca322ad

📥 Commits

Reviewing files that changed from the base of the PR and between 7442c80 and 54ef011.


📒 Files selected for processing (2)
  • src/main/java/net/tfminecraft/musicalinstruments/keyboard/KeyboardView.java
  • src/test/java/net/tfminecraft/musicalinstruments/keyboard/KeyboardViewTest.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
    • Click events for the options button, notes and chords now use an empty payload.

Walkthrough

Keyboard options-button, note-cell, and chord-cell click events now use "{}" as their custom payload. The grid and options-button tests now check for that payload.

Changes

Keyboard click payloads

Layer / File(s) Summary
Set and test click payloads
src/main/java/net/tfminecraft/musicalinstruments/keyboard/KeyboardView.java, src/test/java/net/tfminecraft/musicalinstruments/keyboard/KeyboardViewTest.java
The options-button, note-cell, and chord-cell click events use "{}" instead of "0b". The grid and options-button tests check for "{}".

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix


Merge Risk: ⚪ Minimal · up to 54ef0

Click routing remains unchanged, and no concrete merge-blocking issue was established. The exact NightCore parser behavior could not be confirmed from this repository.

  • 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.

@JustinasLa

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 10, 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.

@JustinasLa
JustinasLa merged commit 46c3778 into main Oct 10, 2026
2 checks passed
@JustinasLa
JustinasLa deleted the fix/keyboard-click-payload branch October 10, 2026 20:25
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