[macOS] toggleMaximizeSidePanel shortcut cannot restore panel after embedded browser gains focus
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.908.70816
What subscription do you have?
ChatGPT account; the exact plan does not appear relevant to this client-side shortcut-routing issue.
What platform is your computer?
Darwin 24.1.0 arm64 arm
What issue are you seeing?
A custom shortcut assigned to toggleMaximizeSidePanel can expand the right-side panel but sometimes cannot restore it when embedded content has focus.
The built-in browser is an easy reproduction: the shortcut expands the browser panel, but pressing it again does nothing. Clicking the panel's restore button works immediately, so the panel state transition itself is functional.
What steps can reproduce the bug?
- In Keyboard Shortcuts, assign
Command+Option+M(Command+Alt+Minkeybindings.json) to Toggle maximize side panel. - Open a built-in browser tab in the side panel.
- Interact with the page so the embedded browser has focus.
- Press the shortcut. The side panel expands.
- Press the same shortcut again while the browser remains focused.
- Nothing happens.
- Click the restore button in the panel toolbar; the normal layout is restored.
The same shortcut can expand and restore normally with some app-rendered file or tool tabs, so the failure depends on the focused surface.
What is the expected behavior?
toggleMaximizeSidePanel should perform the same toggle as the toolbar button from every focused surface: normal → expanded → normal.
Additional information
Related to #34706, which requested the shortcut capability. This report concerns the implemented command failing to restore the panel when embedded content has focus.
Read-only inspection of the packaged app suggests a shortcut-routing boundary: the command is registered as an app-scoped renderer command, while the built-in browser runs in separate web contents. After focus moves into the browser, the next keydown may not reach the app-shell command handler.
Suggested fix: route app-scoped shortcuts through the owner BrowserWindow/native accelerator path, or forward matching before-input-event events from embedded web contents to the app-shell command dispatcher.
Suggested regression test: focus an embedded browser page, invoke the configured shortcut twice, and assert expanded → restored without changing focus.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the app-scoped renderer command and the BrowserWindow/native accelerator path described in the report. Inspect how before-input-event from embedded web contents reaches the app-shell command dispatcher, then add the suggested regression test: focus an embedded browser page, invoke the configured shortcut twice, and verify expanded → restored without changing focus.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, rust
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100