Skip to content

Offer every special button action, including Battery level - #9

Merged
SusieeTheLinuxUser merged 2 commits into
mainfrom
fix/bug-hunt-glm
Nov 7, 2026
Merged

SusieeTheLinuxUser merged 2 commits into
mainfrom
fix/bug-hunt-glm

Conversation

@SusieeTheLinuxUser

@SusieeTheLinuxUser SusieeTheLinuxUser commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

What

Action::choices (src/mouse.rs:74) used 1..SPECIALS.len() - 1, which skips the last entry. So "Battery level" was never offered for a button that supports special actions. Index 0 ("Unknown") is still left out on purpose.

Checked and not changed

A bug hunt also flagged two other things. Both match upstream, so they're left alone:

  • set_active on the Resolution interface: ratbagd defines SetActive there (ratbagd/ratbagd-resolution.c:358).
  • memory_offset overlap test: liquidctl's _get_bucket_memory_offset has the same endByte > startByte check.

Tests

  • New mouse::tests::special_choices_cover_every_entry.
  • cargo test: 8 passed. cargo clippy --all-targets -D warnings: clean.
  • Not run on a real mouse.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Battery level is now available as a mouse action choice, while “Unknown” remains excluded.

Action::choices stopped one entry short of SPECIALS, so the last special
action never showed in the button combo box.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-07T00:00:30.837028Z
We couldn’t complete this review. Comment @codex review to try again.
0e1dff8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 0e1dff8 and 43767a7.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

Action::choices now includes the final SPECIALS entry while still excluding index 0. A test checks both boundaries.

Changes: Mouse action choices

Layer / File(s) Summary
Special action range
src/mouse.rs
Action::choices includes the final SPECIALS entry. A test checks that the choices exclude SPECIAL_BASE and include the final special action.

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

Change: Bug fix

Merge Risk: Minimal · previous review 0e1df

The button combo box now offers the Battery level action, which was previously omitted. Unknown stays excluded. No concrete merge-blocking risk was identified, though the change was not tested on real hardware.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the change to offer the Battery level special action.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 31da907 and 0e1dff8.

Files selected for processing: 1

  • src/mouse.rs

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

@SusieeTheLinuxUser
SusieeTheLinuxUser merged commit 933f04f into main Nov 7, 2026
4 checks passed
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