Skip to content

fix(cardwire-cli): label the battery auto switch mode output correctly - #265

Open
plastininikolay wants to merge 1 commit into
OpenGamingCollective:mainfrom
plastininikolay:fix/cli-auto-switch-mode-label
Open

plastininikolay wants to merge 1 commit into
OpenGamingCollective:mainfrom
plastininikolay:fix/cli-auto-switch-mode-label

Conversation

@plastininikolay

Copy link
Copy Markdown

Description

cardwire config battery-auto-switch-mode printed its value with the label of the neighbouring setting:

$ cardwire config battery-auto-switch-mode
BatteryAutoSwitch: Hybrid

It now prints BatteryAutoSwitchMode: Hybrid.

Assisted-by: Claude Opus 5.5

Checklist:

  • My code follows the style guidelines of this project (cargo fmt)
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas (n/a)
  • I have made corresponding changes to the mdBook documentation (n/a, the docs don't show this output)
  • My changes generate no new warnings (clippy/clang): cargo clippy -p cardwire-cli -- -D warnings is clean
  • New and existing unit tests pass locally with my changes (either use nix flake check or wait for the ci): waiting for CI

`cardwire config battery-auto-switch-mode` printed "BatteryAutoSwitch:",
the same label as `cardwire config battery-auto-switch`. Print
"BatteryAutoSwitchMode:" instead.

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

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

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: Repository UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 66cdf35d-1351-46d9-9fdf-f4da0ef3680e

📥 Commits

Reviewing files that changed from the base of the PR and between 03c35b9 and f2f7363.

📒 Files selected for processing (1)
  • crates/cardwire-cli/src/main.rs

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Corrected the battery auto-switch output label to identify the mode accurately.

Walkthrough

The CLI output label for get_battery_auto_switch_mode changed from BatteryAutoSwitch to BatteryAutoSwitchMode.

Changes

CLI output

Layer / File(s) Summary
Correct the getter output label
crates/cardwire-cli/src/main.rs
The battery auto-switch mode getter now prints BatteryAutoSwitchMode instead of BatteryAutoSwitch.

Priority: ⬇️ Low

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

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: luytan

Merge Risk: ⚪ Minimal · up to f2f73

The CLI now labels this setting as a mode rather than a switch. No actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly summarizes the output-label correction, includes an example, discloses AI assistance, and records checklist results. No related issue is provided, but the template marks that i…
Title check ✅ Passed The title clearly and concisely describes the primary change: correcting the battery auto-switch mode output label.
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.

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.

@luytan

luytan commented Sep 25, 2026

Copy link
Copy Markdown
Member

Why did you need Claude opus 5.5 assistance to edit a simple string

@plastininikolay

Copy link
Copy Markdown
Author

I noticed the wrong label myself while setting up Cardwire. Claude only helped with the routine part: the PR description, the checklist and running fmt/clippy. I mention AI help on every contribution, even small ones like this, since many projects ask for it and I'd rather be upfront.

This branch has not been deployed

No deployments
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.

2 participants