openai / openai/codex

[macOS] toggleMaximizeSidePanel shortcut cannot restore panel after embedded browser gains focus

Open
#46,204 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app browser bug
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?
  1. In Keyboard Shortcuts, assign Command+Option+M (Command+Alt+M in keybindings.json) to Toggle maximize side panel.
  2. Open a built-in browser tab in the side panel.
  3. Interact with the page so the embedded browser has focus.
  4. Press the shortcut. The side panel expands.
  5. Press the same shortcut again while the browser remains focused.
  6. Nothing happens.
  7. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.