Repository navigation
Clarify keep-awake tooltip behavior by platform - #25323
Conversation
Extracted platform-specific lid behavior notes into a reusable function and updated the keep-awake tooltip to show accurate descriptions for each OS: macOS explains that closing the lid may still sleep the device, Windows references device power settings, and Linux clarifies Orca's lid-close request behavior. Updated copy to be device-agnostic instead of Caffeinate/MacBook specific.
Update agent keep-awake descriptions on macOS to accurately explain that the feature prevents idle sleep (not all sleep modes) and only works with the lid open. Add translations for Spanish, French, Japanese, Korean, and Chinese.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (11)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughAwake-mode descriptions now distinguish Mac lid behavior from default-platform behavior. A new helper returns lid notes for Windows, Mac, and other platforms. The status-bar tooltip uses this helper, and the affected tests check platform-specific descriptions and tooltip text. English, Spanish, French, Japanese, Korean, and Chinese locale strings include the updated guidance. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to This change clarifies awake-mode guidance without changing sleep behavior; no material merge risk is established by the reviewed context. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the problem, solution, and changes. It omits required template information: an actual linked issue (it only says “Refs Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 4 files. (7 skipped: 7 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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. Comment |
Problem
Users are confused when Caffeinate doesn't keep their MacBook awake after closing the lid. The UI copy was misleading: macOS's
caffeinatecannot override the lid-close power policy, but settings and tooltip text didn't explain this clearly.Solution
Make the keep-awake feature descriptions platform-aware to set proper expectations:
Added
getAgentAwakeLidNote()to return platform-specific copy. Updated settings UI and status bar tooltip to use it. Translated new messages into 6 languages (en, es, fr, ja, ko, zh).Refs #22885 (partial: clarifies behavior rather than changing technical constraints of each platform).
Changes
agent-awake-copy.tsand newgetAgentAwakeLidNote()function