Repository navigation
fix(keybinds): clarify upgrade hotkeys and pause behavior - #6303
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. WalkthroughBuild keybind settings now use shared guidance, and the scroll modifier appears with build controls. Repeated hotkeys leave the upgrade multiplier unchanged when updates are absent, the view is catching up, or the game is paused. ChangesBuild Hotkeys
Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Possibly related PRs
Suggested labels: Suggested reviewers: Merge Risk:
|
🤖 Claude Code ReviewVerdict: looks good — 0 findings (0 high, 0 medium, 0 low). Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. Notes from verification:
|
🤖 Claude Code ReviewReviewed range: Verdict: looks good — 0 findings (0 high, 0 medium, 0 low). Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. The only change in this range removes one code comment above the shared-key modifier pairs in |
🤖 Claude Code ReviewReviewed range: Verdict: looks good — 0 findings (0 high, 0 medium, 0 low). Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. Notes from this range:
|
🤖 Claude Code ReviewReviewed range: Verdict: No issues found. 0 findings (0 high, 0 medium, 0 low). Checked for bugs and CLAUDE.md compliance. This range puts |
|
/ready |
Celant
left a comment
There was a problem hiding this comment.
Traced the pause read through host pause, singleplayer, resume-from-save and a mid-pause rejoin and it holds up; nothing from me on this one.
🤖 Claude Code ReviewReviewed range: Verdict: looks good — 0 findings (0 high, 0 medium, 0 low). Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. Notes from this range:
|
|
/ready |
|
(sorry had to do small changes, see PR description) |
> [!IMPORTANT] > Stacked PRs. Only this 1st PR (#6302) and the 2nd PR (#6303) need to, if approved, be merged in order. The 3rd one (#6304) was merged into the 2nd one (#6303) to fix a failing CI test, so excuse the confusing message of it getting merged. ## Summary - Consolidate shared-key and modifier-sharing checks into one helper. (Previously, this PR also contained a change to translation key 'build_scroll_modifier_desc' to say "upgrade amount" instead of "build amount" just as other key 'action_auto_upgrade' already called it for its action. Reverted that because the build scroll can be used to build multiple nukes to, so upgrade isn't the right wording.) ## Testing - `npx vitest run --project node tests/UserSettings.test.ts`
42acc69 to
06c6ae5
Compare
🤖 Claude Code ReviewReviewed: the whole PR again ( Verdict: looks good. 0 findings (0 high, 0 medium, 0 low). Code review: No issues found. Checked for bugs and CLAUDE.md compliance. Notes:
|
|
@Celant You soft-approved this one before. I added something afterwards and updated the PR description. Could you maybe have a look at this again, possibly merge it? The first PR in the stack already got merged. |
|
Had another look at the additions, all fine from me. It was only missing a milestone, which is on now. |
Important
Stacked PRs. Only the 1st PR (#6302) and this 2nd PR (#6303) need to, if approved, be merged in order. The 3rd one (#6304) was merged into this 2nd one (#6303) to fix a failing CI test, so excuse the confusing message of it getting merged.
Summary
Move "Build Scroll Modifier" from Menu Shortcuts to Build Controls. Where it belongs since it's a.. build control. See screenshot below.
Move "Prevent Building Stacking" hotkey from Menu Shortcuts to Build Controls as well. Same reason as above.
For build hotkeys: replace per-building descriptions with one re-usable description. And tell about upgrading. So eg. "Build City under your cursor" becomes “Build under your cursor. Repeat the key on a unit to increase the build amount by 5 (up to 50).”. It still says "Build City" above it so the type of unit being referred to remains clear. This both consolidates multiple different translations keys under one, and adds a description that was still missing namely the upgrading/building multiple part (used the word "build" instead of "upgrade" because it also pertains to building multiple nukes). The
Remove the now obsolete per-building description keys.
Prevent upgrade hotkey multiplier changes while paused (and until the view has caught up to the current pause state). So multiple hits of 1 don't put 5x-10x-15x etc. upgrades while paused. Keybind AltLeft-scroll already doesn't respond while paused, this brings the build hotkeys are on par.
If feat(client): add gameplay toggle for cycling build multiplier on hotkey #6250 will be merged, we could toggle the "Repeat the key on a unit to increase the build amount by 5 (up to 50).” part of the build hotkey description based on that PRs' user setting. But it's not too big of an issue when this text would still be shown if the setting was off; it could serve as a reminder that this functionality is there when someone toggled the setting by mistake or forgot about it.
Testing
npx vitest run --project node tests/InputHandler.test.ts tests/UserSettings.test.ts tests/TranslationSystem.test.tsnpx vitest run --project client tests/client/view/GameView.test.ts tests/client/UserSettingModalValues.test.tsnpm run typecheck