fix(menu): prioritize obsolete feature detection over restart#1205
Conversation
Automated formatting by clang-format, prettier, and other hooks. See https://pre-commit.ci for details.
WalkthroughThe changes update the menu UI rendering logic to explicitly handle obsolete features. When drawing settings for unloaded features, the code now checks for obsolescence and adjusts the UI and error message display accordingly. Obsolete features are hidden from normal users but remain visible in developer mode. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Menu
participant Feature
participant FeatureIssues
User->>Menu: Open Settings
Menu->>Feature: IsLoaded?
alt Feature not loaded
Menu->>FeatureIssues: IsObsoleteFeature?
alt Obsolete
Menu->>Feature: DrawUnloadedUI(errorInfo)
else Not obsolete
Menu->>Feature: HasIniFile?
alt INI exists
Menu->>Feature: ShowPendingRestartMsg()
else
Menu->>Feature: DrawUnloadedUI(errorInfo)
end
end
else Feature loaded
Menu->>Feature: DrawSettingsUI()
end
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code Graph Analysis (1)src/Menu.cpp (3)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🔇 Additional comments (4)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
@coderabbitai please provide a conventional commit within char limits that covers the changes |
|
Tip For best results, initiate chat on the files or code changes. @alandtse Here's a conventional commit message that covers the changes: This 65-character commit message captures the core fix. If you need a more detailed body, it could be: |
|
✅ A pre-release build is available for this PR: |
…ity-shaders#1205) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Fixed obsolete feature UI logic that incorrectly displayed "This feature will be available after restart" for removed features like TerrainBlending. Now prioritizes obsolete feature detection before checking INI file existence, ensuring proper error messages are shown. Also prevents duplicate error display by excluding obsolete features from the Error section since DrawUnloadedUI() already handles their messaging appropriately.
Summary by CodeRabbit
New Features
Bug Fixes
Refactor