Repository navigation
🤖 fix: command palette shows the Keep Screen Awake state - #5799
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Member
Author
|
Ready to merge at head
Generated with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
"Toggle Keep Screen Awake" in the command palette now shows its state ("Current: On" or "Current: Off"), like the palette toggles backed by local state.
Fixes #5791
Changes
sources.ts: the toggle's subtitle comes from a newgetKeepScreenAwakeparam. While the config has not loaded (undefined), the subtitle keeps the old description and does not guess a state.AppConfigStore.ts: the shared app config cache now also keepskeepScreenAwake. The store makes onegetConfigfetch and holds oneonConfigChangedsubscription per session, so the value stays current after a toggle from the palette or from Settings.App.tsx: passesgetKeepScreenAwake, which reads the store's snapshot when the palette builds its actions. There is no new IPC method, no per-render call, and no persisted field (keepScreenAwakeis already inconfig.getConfig).The issue also names "Toggle Count AI Calls from Bash Commands". That action comes from the unmerged #5772, so this PR does not touch it. When it lands, it can use the same
describeConfigTogglehelper with its own store field. The optional toast after a toggle is out of scope.Validation
Test written first. It failed on main:
After the fix,
bun test ./src/browser/utils/commands/shows 93 pass and 0 fail.make typecheckandmake static-checkpass.Dogfood: the bug-bash app on main and on this branch, driven by Playwright. The toggle exists only in the desktop app (it needs
window.api), so the script sets the samewindow.apistub the unit tests use, after the page loads. It opens the palette (F4), types "keep screen awake", runs the toggle, and reopens:Risks
Low. One subtitle and one more field in an existing cache.
Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high