Skip to content

Update Caffeinate tooltip copy about MacBook lid behavior - #23091

Merged
AmethystLiang merged 1 commit into
mainfrom
caffeinate-lid-tooltip
Oct 4, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
caffeinate-lid-tooltip

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​4 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​10 $\color{#cf222e}{\Huge{\mathbf{−}}}$​5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5

Problem

The tooltip and settings descriptions for Caffeinate claim that Orca asks the device to stay awake when the lid is closed. This is inaccurate—MacBook lid behavior is controlled by the device's power settings, not by Orca. The misleading copy could confuse users about what Caffeinate actually controls.

Solution

Updated the copy to clarify that Caffeinate prevents idle sleep while active, but closing a MacBook lid may still put it to sleep (following device power policy). This is more honest about what the feature actually does.

ELI5

Fixed the tooltip to stop claiming Orca keeps your Mac awake even when you close the lid. It now explains that Caffeinate prevents idle sleep, but your Mac's power settings control what happens when you physically close the lid.

What Changed

Updated tooltip and settings descriptions in CaffeinateStatusSegment.tsx, and corresponding i18n strings in en-runtime-required.json and locales/en.json. Test snapshots updated to match the new copy.

Why

The previous text overstated Orca's control. Caffeinate manages idle sleep, but lid behavior is a device power setting. This version is more accurate and sets proper expectations.

Linked Issue

Fixes #

Visual Proof

N/A — copy-only change.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Test snapshots in AgentsPane.test.tsx and CaffeinateStatusSegment.localization.test.tsx updated and passing.

AI Disclosure

N/A

Review

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

Update tooltip and settings pane help text to accurately describe
Caffeinate's behavior: it prevents idle sleep while active, but
MacBook lid closing may still trigger sleep per device power policy.
The previous copy incorrectly suggested Orca could prevent lid-close
sleep.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — a couple of copy-consistency points inline.

Reviewed changes

Copy-only PR correcting the Caffeinate / keep-awake description that claimed Orca keeps a device awake with the lid closed. Reviewed the full diff plus the surrounding i18n plumbing and both updated tests (passing locally).

  • Status-bar tooltip — CaffeinateStatusSegment.tsx now appends a new tooltipDescription sentence after the existing ariaLabel.
  • Settings description — modeDescriptionDefault and the legacy agent-awake-copy.a42f6fbdd8 in en.json / en-runtime-required.json point at the new sentence.
  • Tests — AgentsPane.test.tsx asserts the new default description; the zh localization test asserts the untranslated English tooltip fallback.

The new tooltipDescription key ships English-only, which matches the repo convention (verify-localization-catalog.mjs: feature PRs own English declarations, localization passes follow). Tests pass.

ℹ️ Source fallback still carries the old claim

getAgentAwakeDescription()'s default-locale fallback literal was not updated alongside the catalog, so the exact copy this PR removes still lives in the renderer source. It is invisible at runtime today (the en.json entry wins, and the runtime-required prune actually depends on fallback ≠ catalog to keep shipping the key), so this is consistency debt rather than a live bug.

Technical details
# agent-awake-copy.ts fallback is stale

## Affected sites
- `src/renderer/src/components/settings/agent-awake-copy.ts:37` — fallback still reads "…Orca also asks this device to stay awake when the lid is closed, subject to its power policy."

## Required outcome
- The literal fallback should match the updated `en.json` `modeDescriptionDefault` value (or be intentionally documented as stale), so the source of truth does not contradict the shipped copy.

## Open questions for the human
- If the fallback is updated to match, `modeDescriptionDefault` becomes droppable from `en-runtime-required.json` (fallback == catalog); regenerate that file with `pnpm run sync:localization-runtime-catalog`.

ℹ️ Nitpicks

  • CaffeinateStatusSegment.localization.test.tsx:200-202 pins the untranslated English sentence for the zh locale. It proves the new key is wired, but it also encodes "this string stays English" — it will need updating when a zh translation lands. Asserting the localized+fallback split differently (e.g. that the tooltip contains the localized ariaLabel) would survive translations.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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

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: da49cdd1-93c5-42a3-8942-1276d651729f

📥 Commits

Reviewing files that changed from the base of the PR and between 457a84d and c7ec7f8.

📒 Files selected for processing (5)
  • src/renderer/src/components/settings/AgentsPane.test.tsx
  • 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

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


📝 Walkthrough

Walkthrough

The agent-awake descriptions now state that Caffeinate prevents idle sleep while active, but closing a MacBook lid may still cause sleep. The Caffeinate status tooltip now includes this explanation. Tests check the updated setting description and tooltip.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to c7ec7

No new merge-blocking issue is established. The MacBook-specific wording on shared desktop surfaces remains a previously reported copy concern.

🚥 Pre-merge checks | ✅ 4 | ❌ 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: updating Caffeinate tooltip copy about MacBook lid behavior.
Description check ✅ Passed The description is mostly complete and clearly explains the problem, solution, user-visible change, rationale, testing updates, and why visual proof is not applicable. The Linked Issue field is not po…
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: 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 1 functions across 3 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

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 fb77c14 into main Oct 4, 2026
29 of 31 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