[Feat] Add optional setting for using Option-clicking to open Always Hidden section#305
[Feat] Add optional setting for using Option-clicking to open Always Hidden section#305gitmichaelqiu wants to merge 5 commits intostonerl:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds a new Advanced setting Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment Tip You can disable the changed files summary in the walkthrough.Disable the |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Thaw/MenuBar/ControlItem/ControlItem.swift (1)
577-583:⚠️ Potential issue | 🟠 MajorGate Option-click by setting, and open (not toggle) the Always Hidden section.
Lines 577-583 currently apply Option-click behavior unconditionally and call
toggle(). That conflicts with the feature contract: Option-click should only apply when enabled, and it should open the Always Hidden section.🔧 Proposed fix
- if - modifierFlags == .option, - let section = menuBarManager.section(withName: .alwaysHidden), - section.isEnabled - { - section.toggle() - return - } + if + appState.settings.advanced.useOptionClickToShowAlwaysHiddenSection, + modifierFlags == .option, + let section = menuBarManager.section(withName: .alwaysHidden), + section.isEnabled + { + section.show() + return + }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Thaw/MenuBar/ControlItem/ControlItem.swift` around lines 577 - 583, Gate the Option-click behavior behind the appropriate user setting and call open() instead of toggle() on the Always Hidden section: replace the unconditional check that looks at modifierFlags == .option and then toggles the section with a conditional that also checks the Option-click enabled preference (e.g., Preferences.shared.optionClickOpensAlwaysHidden or the existing setting used elsewhere in the code), and when allowed call section.open() on menuBarManager.section(withName: .alwaysHidden) after verifying section.isEnabled.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@Thaw/MenuBar/ControlItem/ControlItem.swift`:
- Around line 577-583: Gate the Option-click behavior behind the appropriate
user setting and call open() instead of toggle() on the Always Hidden section:
replace the unconditional check that looks at modifierFlags == .option and then
toggles the section with a conditional that also checks the Option-click enabled
preference (e.g., Preferences.shared.optionClickOpensAlwaysHidden or the
existing setting used elsewhere in the code), and when allowed call
section.open() on menuBarManager.section(withName: .alwaysHidden) after
verifying section.isEnabled.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0c863e53-29f9-4ebd-a074-f3ef374560a1
📒 Files selected for processing (6)
Thaw/MenuBar/ControlItem/ControlItem.swiftThaw/MenuBar/MenuBarSection.swiftThaw/Resources/Localizable.xcstringsThaw/Settings/Models/AdvancedSettings.swiftThaw/Settings/SettingsPanes/AdvancedSettingsPane.swiftThaw/Utilities/Defaults.swift
|
|
I made an update for CodeRabbit's suggeston. Check if the Option-Click setting is on when detecting Option-click. |
|
Thank you. Since we have a feature freeze for UI changes, I will review and merge this for the 1.3 development cycle. |



What does this PR do?
Implement a setting (optional, default off) to open Always Hidden bar upon Option+clicking and hides the bar after double clicking, behaving similar to Ice.
PR Type
Does this PR introduce a breaking change?
What is the current behavior?
Thaw currently has a different Always Hidden bar opening logic to Ice.
Issue Number: N/A
What is the new behavior?
A new setting called "Use Option-click to open always hidden section" is added. When this is off, the bar behaves the same as before. If this is on, the bar will hide after a double-click; the Always Hidden bar will show when Option-clicked.
This would make the app more friendly to those just transitioned here from Ice.
Localization for this line is also added.
PR Checklist
Other information
The new setting is added in Advanced > Menu Bar Sections.
Summary by CodeRabbit
New Features
Behavior Changes
Bug Fixes