Skip to content

feat(weather overrides): add weather override pause checkbox#1722

Merged
doodlum merged 2 commits into
community-shaders:devfrom
jiayev:weather-override-pause
Jan 16, 2026
Merged

feat(weather overrides): add weather override pause checkbox#1722
doodlum merged 2 commits into
community-shaders:devfrom
jiayev:weather-override-pause

Conversation

@jiayev
Copy link
Copy Markdown
Collaborator

@jiayev jiayev commented Jan 16, 2026

This pull request adds functionality to temporarily pause weather-based overrides for individual features in the menu, allowing users to disable weather-driven adjustments without affecting saved settings. The changes introduce new UI elements and internal state management to support this feature.

Weather override pause feature:

  • Added a "Pause Weather Overrides" checkbox to the feature settings tab in the menu UI, allowing users to temporarily disable weather-based adjustments for each feature. The checkbox state is not persisted. (src/Menu/FeatureListRenderer.cpp)
  • Integrated WeatherVariableRegistry.h into the menu renderer to support weather override functionality. (src/Menu/FeatureListRenderer.cpp)

Weather registry enhancements:

  • Updated GlobalWeatherRegistry to track paused features using a new pausedFeatures map. (src/WeatherVariableRegistry.h)
  • Added IsFeaturePaused and SetFeaturePaused methods to manage the paused state for each feature. (src/WeatherVariableRegistry.h)
  • Modified weather update logic to skip updates for paused features, ensuring weather-based changes are not applied when paused. (src/WeatherVariableRegistry.h)

Summary by CodeRabbit

New Features

  • Added "Pause Weather Overrides" checkbox in feature settings that allows temporary pausing of weather modifications on a per-feature basis. Each pause option includes a tooltip explaining its temporary nature. When a feature is paused, its weather updates are suspended until the pause is disabled.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 16, 2026

📝 Walkthrough

Walkthrough

This PR adds per-feature weather override pause functionality by introducing a UI checkbox in the feature settings panel and implementing pause state tracking in the weather registry with accessor methods.

Changes

Cohort / File(s) Summary
UI Integration
src/Menu/FeatureListRenderer.cpp
Adds "Pause Weather Overrides" checkbox that toggles pause state in GlobalWeatherRegistry; displays tooltip and separator when weather support exists for the feature
Registry Implementation
src/WeatherVariableRegistry.h
Introduces pausedFeatures map and two accessor methods (IsFeaturePaused, SetFeaturePaused) to track and query per-feature pause state; UpdateFeatureFromWeathers short-circuits when a feature is paused

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • davo0411
  • doodlum

Poem

🐰 A pause button for the weather's song,
No more overrides lasting too long,
With checkboxes bright and tooltips kind,
Control the climate, peace of mind!
Hop, toggle, freeze — the features obey.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding a weather override pause checkbox to the feature settings UI.

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

✨ Finishing touches
  • 📝 Generate docstrings

🧹 Recent nitpick comments
src/Menu/FeatureListRenderer.cpp (2)

1-1: Conventional commit scope tweak + issue reference (if any).

Title is close to conventional. If you want stricter scope formatting, consider feat(weather-overrides): add pause checkbox (no space in scope). If there’s a tracking issue, please add an “Implements #…” or “Related to #…” line in the PR body.


422-434: Clarify pause semantics in tooltip (freeze vs. revert).

Current behavior pauses updates but leaves the last weather-applied values in place. If that’s intended, consider making the tooltip explicit so users don’t assume settings revert immediately.

💡 Suggested tooltip clarification
-						ImGui::Text(
-							"Temporarily disable weather-based setting adjustments for this feature.\n"
-							"This state is not saved.");
+						ImGui::Text(
+							"Pause further weather-based adjustments for this feature; current values stay as-is.\n"
+							"This state is temporary and not saved.");
src/WeatherVariableRegistry.h (1)

332-357: Confirm thread-safety for pausedFeatures access.

If UpdateFeatureFromWeathers() runs on a different thread than the menu UI, unsynchronized access to pausedFeatures is a data race. Please confirm threading; if multi-threaded, guard the map.

🔒 Optional thread-safety guard
+#include <mutex>
@@
-		bool IsFeaturePaused(const std::string& featureName)
+		bool IsFeaturePaused(const std::string& featureName)
 		{
+			std::scoped_lock lock(pausedMutex);
 			auto it = pausedFeatures.find(featureName);
 			if (it != pausedFeatures.end()) {
 				return it->second;
 			}
 			return false;
 		}
@@
-		void SetFeaturePaused(const std::string& featureName, bool paused)
+		void SetFeaturePaused(const std::string& featureName, bool paused)
 		{
+			std::scoped_lock lock(pausedMutex);
 			pausedFeatures[featureName] = paused;
 		}
@@
-		std::map<std::string, bool> pausedFeatures;
+		std::map<std::string, bool> pausedFeatures;
+		std::mutex pausedMutex;

Also applies to: 381-382


📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7ee4c02 and 4f376d9.

📒 Files selected for processing (2)
  • src/Menu/FeatureListRenderer.cpp
  • src/WeatherVariableRegistry.h
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{cpp,cxx,cc,c,h,hpp,hxx,hlsl,hlsli,fx,fxh,py}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Do not include TODO/FIXME placeholders; provide complete, working solutions

Files:

  • src/Menu/FeatureListRenderer.cpp
  • src/WeatherVariableRegistry.h
src/**/*.{cpp,cxx,cc,h,hpp,hxx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{cpp,cxx,cc,h,hpp,hxx}: Ensure SE/AE/VR runtime compatibility; use runtime detection patterns (e.g., REL::RelocateMember())
Include robust error handling and resource management with graceful degradation in the plugin code

Files:

  • src/Menu/FeatureListRenderer.cpp
  • src/WeatherVariableRegistry.h
**/*

⚙️ CodeRabbit configuration file

**/*: When reviewing PRs, please provide suggestions for:

  1. Conventional Commit Titles (if not following https://www.conventionalcommits.org/ or
    if the existing title does not describe the code changes):
    Format: type(scope): description
    Length: 50 characters limit for title, 72 for body
    Style: lowercase description, no ending period
    Examples:

    • feat(vr): add cross-eye sampling
    • fix(water): resolve flowmap bug
    • docs: update shader documentation
  2. Issue References (if PR fixes bugs or implements features):
    Suggest adding appropriate GitHub keywords:

    • "Fixes #123" or "Closes #123" for bug fixes
    • "Implements #123" or "Addresses #123" for features
    • "Related to #123" for partial implementations

Otherwise, use your standard review approach focusing on code quality.

Files:

  • src/Menu/FeatureListRenderer.cpp
  • src/WeatherVariableRegistry.h
🧠 Learnings (4)
📓 Common learnings
Learnt from: alandtse
Repo: doodlum/skyrim-community-shaders PR: 0
File: :0-0
Timestamp: 2025-06-24T07:17:36.604Z
Learning: When reviewing PRs, always clarify the scope if there are multiple related features or dependencies. WeatherPicker was a separate PR that was already merged, while this PR focuses specifically on WetnessEffects climate preset system enhancements.
📚 Learning: 2025-06-24T07:17:36.604Z
Learnt from: alandtse
Repo: doodlum/skyrim-community-shaders PR: 0
File: :0-0
Timestamp: 2025-06-24T07:17:36.604Z
Learning: When reviewing PRs, always clarify the scope if there are multiple related features or dependencies. WeatherPicker was a separate PR that was already merged, while this PR focuses specifically on WetnessEffects climate preset system enhancements.

Applied to files:

  • src/Menu/FeatureListRenderer.cpp
  • src/WeatherVariableRegistry.h
📚 Learning: 2025-08-17T18:37:35.839Z
Learnt from: CR
Repo: doodlum/skyrim-community-shaders PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-17T18:37:35.839Z
Learning: Applies to features/**/*.{cpp,cxx,cc,h,hpp,hxx} : Register new features in the globals::features namespace

Applied to files:

  • src/Menu/FeatureListRenderer.cpp
  • src/WeatherVariableRegistry.h
📚 Learning: 2025-06-17T09:27:49.594Z
Learnt from: alandtse
Repo: doodlum/skyrim-community-shaders PR: 1157
File: src/Feature.cpp:42-49
Timestamp: 2025-06-17T09:27:49.594Z
Learning: In src/Feature.cpp, when an obsolete feature's INI file is deleted, the feature should be silently disabled without surfacing any issues to the user. This is the intended behavior because a deleted INI file for an obsolete feature indicates that the user has properly cleaned up the obsolete feature.

Applied to files:

  • src/Menu/FeatureListRenderer.cpp
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build plugin and addons
🔇 Additional comments (1)
src/Menu/FeatureListRenderer.cpp (1)

19-19: Include looks good for the new registry usage.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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 and usage tips.

Automated formatting by clang-format, prettier, and other hooks.
See https://pre-commit.ci for details.
@github-actions
Copy link
Copy Markdown

Using provided base ref: 7ee4c02
Using base ref: 7ee4c02
Base commit date: 2026-01-15T15:11:03Z (Thursday, January 15, 2026 03:11 PM)
No actionable suggestions for changed features.

@github-actions
Copy link
Copy Markdown

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

@doodlum doodlum merged commit e389a33 into community-shaders:dev Jan 16, 2026
16 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Feb 12, 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