Skip to content

feat(weather-editor): adaptively set weather editor key#2334

Merged
alandtse merged 1 commit into
community-shaders:devfrom
SkrubbySkrubInAShrub:new-weather-editor-hotkey-default
May 15, 2026
Merged

feat(weather-editor): adaptively set weather editor key#2334
alandtse merged 1 commit into
community-shaders:devfrom
SkrubbySkrubInAShrub:new-weather-editor-hotkey-default

Conversation

@SkrubbySkrubInAShrub
Copy link
Copy Markdown
Collaborator

@SkrubbySkrubInAShrub SkrubbySkrubInAShrub commented May 12, 2026

previously it was defaulted to F11, however after feedback it is probably better to move it to shift end.
it also follows the CS menu key, so if someone changes the CS menu key to X, the weather editor will be bound to Shift + X.

Summary by CodeRabbit

  • New Features

    • The first-time setup dialog now displays real-time feedback for Weather Editor hotkey selection, showing which keys are bound and alerting users when the hotkey is unbound.
  • Configuration Updates

    • Updated the Weather Editor hotkey default configuration.

Review Change Stack

@github-actions
Copy link
Copy Markdown

No actionable suggestions for changed features.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

📝 Walkthrough

Walkthrough

This PR enhances the Weather Editor hotkey system by changing the default configuration from a single key (VK_F11) to a two-key combination (VK_SHIFT + VK_END), adding logic to derive this combination from user input during first-time setup, and displaying live hotkey status feedback in the setup dialog.

Changes

Weather Editor hotkey configuration and UI

Layer / File(s) Summary
Hotkey configuration and derivation logic
src/Menu.h, src/Menu.cpp
WeatherEditorToggleKey changes from single-key to shift-modified combination. New DeriveWeatherEditorKey helper derives the hotkey from user input by enforcing shift modifier and selecting a base key.
ToggleKey handler integration with first-time setup
src/Menu.cpp
ToggleKey handler now calls DeriveWeatherEditorKey to set WeatherEditorToggleKey during first-time setup, coupling the main and Weather Editor hotkey configuration.
First-time-setup UI hotkey status display
src/Menu/HomePageRenderer.cpp
First-time-setup dialog displays a live Weather Editor hotkey status block showing an unbound warning or the bound key, updating as the user configures hotkeys.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • davo0411
  • alandtse

Poem

🐰 A shift-key dance, so precise and keen,
Two keys combined for weather unseen,
The editor's hotkey, now swift to deploy,
With UI feedback—a keyboard's joy! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(weather-editor): adaptively set weather editor key' accurately describes the main change: making the weather editor hotkey adapt to menu key changes rather than being static.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 OpenGrep (1.20.0)

OpenGrep fatal error (exit code 2): [00.26][ERROR]: Error: exception Unix_error: No such file or directory stat src/Menu.cpp
Raised by primitive operation at UTmp.replace_named_pipe_by_regular_file_if_needed in file "libs/commons/UTmp.ml", line 145, characters 8-27
Called from Scan_CLI.replace_target_roots_by_regular_files_where_needed.(fun) in file "src/osemgrep/cli_scan/Scan_CLI.ml", lines 1086-1087, characters 19-65
Called from List_.fast_map in file "libs/commons/List_.ml", line 81, characters 17-20
Called from Scan_CLI.replac


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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/Menu.h (1)

407-407: If this feature maps to a tracked issue, add an explicit PR keyword reference.

Consider adding Implements #<id> / Addresses #<id> in the PR description for traceability.

As per coding guidelines, "Issue References (if PR fixes bugs or implements features): Suggest adding appropriate GitHub keywords."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/Menu.h` at line 407, The PR lacks an explicit GitHub issue reference for
the Weather Editor feature; update the PR description (or the commit message
where WeatherEditorToggleKey is introduced) to include a keyword like
"Implements #<id>" or "Addresses #<id>" referencing the tracked issue so the
change tied to the WeatherEditorToggleKey variable (WeatherEditorToggleKey /
InputCombo usage) is automatically linked and traceable in GitHub.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/Menu.cpp`:
- Around line 974-979: The toggle-key lambda currently only updates
settings.WeatherEditorToggleKey when settings.FirstTimeSetupCompleted is false,
so after initial setup changing settings.ToggleKey won't sync the weather-editor
key; remove the FirstTimeSetupCompleted guard (or change the condition so it
always runs) inside the lambda that handles &settings.ToggleKey /
settingToggleKey so that settings.WeatherEditorToggleKey =
DeriveWeatherEditorKey(keys) is executed whenever the menu key is changed; keep
the rest of the lambda behavior (settingToggleKey = false and assigning
settings.ToggleKey = keys).

---

Nitpick comments:
In `@src/Menu.h`:
- Line 407: The PR lacks an explicit GitHub issue reference for the Weather
Editor feature; update the PR description (or the commit message where
WeatherEditorToggleKey is introduced) to include a keyword like "Implements
#<id>" or "Addresses #<id>" referencing the tracked issue so the change tied to
the WeatherEditorToggleKey variable (WeatherEditorToggleKey / InputCombo usage)
is automatically linked and traceable in GitHub.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 929be615-9c67-4635-a9d5-c005ef067726

📥 Commits

Reviewing files that changed from the base of the PR and between 88a5358 and b3bc371.

📒 Files selected for processing (3)
  • src/Menu.cpp
  • src/Menu.h
  • src/Menu/HomePageRenderer.cpp

Comment thread src/Menu.cpp
@github-actions
Copy link
Copy Markdown

✅ A pre-release build is available for this PR:
Download

@alandtse alandtse merged commit 5f86ef7 into community-shaders:dev May 15, 2026
12 checks passed
ParticleTroned pushed a commit to ParticleTroned/skyrim-community-shaders that referenced this pull request May 16, 2026
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