Repository navigation
fix(onboarding): make Stay Awake step cross-platform, not macOS-only - #347
Conversation
The permissions step's "Stay awake on power" panel hardcoded macOS
copy ("macOS only lets you...", Battery -> Options steps) and a
macOS-only deep link (x-apple.systempreferences:...), which the main
process's openExternal allowlist also only permitted. On Windows this
sent users to a "no app can open this link" dialog instead of Settings.
Derive the OS from window.cth.platform (already exposed by preload)
and branch the copy, deep link, and button per platform: macOS opens
the Battery pane, Windows opens ms-settings:powersleep (now allowed
by the main-process allowlist), and Linux shows text-only guidance
since there's no universal settings URI across desktop environments.
Also generalized adjacent copy that assumed macOS ("Mac" -> "computer",
"macOS asks permission" -> "your system may ask permission") across
all three locales (en, ar, zh-CN).
🚫 This PR is missing its before/after evidenceEvery pull request here has to show its work. Screenshots or a short screen recording, before the change and after it.
How to fix it: edit the description, keep the A bug fix with no visible surface still needs it: show the failing behaviour, then the same steps passing. A terminal recording is fine. Genuinely nothing to show — a CI tweak, a typo, a dependency bump? A maintainer can apply the |
…latform, not macOS-only
|
Reviewed by an agent on the Munder Difflin hive floor, posted from @chaitanyagiri. Driving the copy and the button off The thing to watch is the interaction with the other two locale PRs, because the keys were The IPC change widens the One small thing: the keys are now built by interpolation, |
Rebasing onto main brought 146 commits, and two of them moved ground the Italian locale was standing on. HarnessMD#347 made the Stay Awake step cross-platform: stayAwakeDesc became three per-OS strings and the surrounding copy stopped saying "your Mac". The key tree still matched on three of those, so nothing failed — the Italian simply told a Windows user their Mac would sleep. reliabilityDesc, keepAwakeDesc and notificationsDesc now say computer and system, like the English does. The Mac variant is the old string unchanged, so it carries over verbatim; Windows and Linux name the panels those systems actually ship in Italian rather than translating the English ones literally. HarnessMD#415 stopped hiding engines that cannot drain hive mail and shows them as disabled rows instead, which needed a badge and a reason in every locale. Also picks up the token-limit wording, which now spells out that cache reads do not count against the limit. zh-CN and ar came with those changes already; it.json is the only locale that was not in main to receive them.
The permissions step's "Stay awake on power" panel hardcoded macOS copy ("macOS only lets you...", Battery -> Options steps) and a macOS-only deep link (x-apple.systempreferences:...), which the main process's openExternal allowlist also only permitted. On Windows this sent users to a "no app can open this link" dialog instead of Settings.
Derive the OS from window.cth.platform (already exposed by preload) and branch the copy, deep link, and button per platform: macOS opens the Battery pane, Windows opens ms-settings:powersleep (now allowed by the main-process allowlist), and Linux shows text-only guidance since there's no universal settings URI across desktop environments. Also generalized adjacent copy that assumed macOS ("Mac" -> "computer", "macOS asks permission" -> "your system may ask permission") across all three locales (en, ar, zh-CN).
What & why
Type of change
Evidence
Before
After
How I tested it
Discord (optional)
Discord:
Checklist
npm run typecheckpasses.npm run test:focusedpasses.npm run buildsucceeds.commented-out code, or unrelated formatting churn in it.
DESIGN.md/tokens.ts— no ad-hoc colors,spacing, or fonts.
ATTRIBUTION.md.