Skip to content

Clarify keep-awake tooltip behavior by platform - #25323

Merged
AmethystLiang merged 2 commits into
mainfrom
caffeinate-lid-tooltip
Oct 4, 2026
Merged

AmethystLiang merged 2 commits into
mainfrom
caffeinate-lid-tooltip

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​30 $\color{#cf222e}{\Huge{\mathbf{−}}}$​6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​24
Prod 9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​60 $\color{#cf222e}{\Huge{\mathbf{−}}}$​16 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​44

Problem

Users are confused when Caffeinate doesn't keep their MacBook awake after closing the lid. The UI copy was misleading: macOS's caffeinate cannot 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:

  • macOS: Clarify that idle sleep prevention requires the lid open; closing the lid will sleep
  • Windows: Reference the device's power settings
  • Linux: Explain Orca requests the device stay awake, subject to policy

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

  • Add platform-specific descriptions in agent-awake-copy.ts and new getAgentAwakeLidNote() function
  • Update settings UI and status bar tooltip to use platform-aware copy
  • Add i18n keys and translations for lid behavior notes
  • Update tests to verify platform-specific messaging

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.
@coderabbitai

coderabbitai Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (1)
AGENTS.md — auto-discovered

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 40484888-4e7f-4d4b-97c2-d2391f57f993
📥 Commits

Reviewing files that changed from the base of the PR and between fb77c14 and d7e522b.

📒 Files selected for processing (11)
  • src/renderer/src/components/settings/AgentsPane.test.tsx
  • src/renderer/src/components/settings/agent-awake-copy.ts
  • src/renderer/src/components/status-bar/CaffeinateStatusSegment.localization.test.tsx
  • src/renderer/src/components/status-bar/CaffeinateStatusSegment.tsx
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

Awake-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 d7e52

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)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the problem, solution, and changes. It omits required template information: an actual linked issue (it only says “Refs #22885”), visual proof for this behavior change, and tes… Add a link to the issue. Attach before-and-after visual proof, or state N/A with a reason if there is no visual or interaction change. Add testing steps and identify the platforms tested. Complete the applicable checklist items.
Docstring Coverage ⚠️ Warning 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 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the platform-specific clarification of keep-awake tooltip behavior.
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.
Full details: Description check

Explanation

The description explains the problem, solution, and changes. It omits required template information: an actual linked issue (it only says “Refs #22885”), visual proof for this behavior change, and testing details.

Full details: Docstring Coverage

Explanation

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.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@AmethystLiang
AmethystLiang merged commit 52b3766 into main Oct 4, 2026
14 of 15 checks passed
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.

1 participant