Skip to content

Restore Linux desktop settings with native shortcuts - #405

Merged
ilysenko merged 1 commit into
mainfrom
codex/fix-native-linux-settings-toggles
Jun 3, 2026
Merged

Restore Linux desktop settings with native shortcuts#405
ilysenko merged 1 commit into
mainfrom
codex/fix-native-linux-settings-toggles

Conversation

@ilysenko

@ilysenko ilysenko commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes #404.

When upstream Codex ships its own native Keyboard Shortcuts settings page, the Linux wrapper used to skip the injected Keybinds page entirely. That avoided duplicating upstream shortcuts, but it also removed the Linux-only controls from the UI.

This PR keeps the native upstream Keyboard Shortcuts page intact and adds a small dedicated Linux desktop settings page for the Linux-only toggles:

  • Compact prompt window
  • System tray
  • Warm start
  • Install updates when you close Codex

The patcher now handles both older combined settings bundles and the current split bundle layout where route registration, navigation metadata, and section metadata live in different assets. It also uses the shared Codex request asset discovery so current setting-storage-*.js bundles work as well as older vscode-api-*.js bundles.

Validation

  • node --test scripts/patch-linux-window-ui.test.js
  • bash tests/scripts_smoke.sh
  • Manual real-bundle copy check: first patch run changes 5 files; second patch run is idempotent with changed: 0.

@ilysenko
ilysenko merged commit d3c5634 into main Jun 3, 2026
6 checks passed
@ilysenko
ilysenko deleted the codex/fix-native-linux-settings-toggles branch June 3, 2026 20:12
ilysenko pushed a commit that referenced this pull request Jun 4, 2026
…ft (#406)

The Linux desktop settings page (System tray, Warm start, Compact prompt
window, install-on-close) is injected as a new `titleForSection` switch case
in the settings-shared bundle. PR #405 matched the anchor `general-settings`
case with a literal needle that hardcoded the minified JSX message-component
identifier (`n`) and memo-cache slot (`t[2]`).

Those identifiers are assigned arbitrarily by the upstream minifier and drift
between builds. On Codex 26.601.21317 the component minifies to `r` (and the
cache slot to `o[5]`), so the literal needle never matched. Because the patch
is transactional, applyLinuxDesktopSettingsSharedPatch threw "could not add
Linux desktop section title", the whole optional patch was skipped, and the
Linux settings toggles silently disappeared from the UI.

Replace the literal needle in both applyKeybindsSettingsSharedPatch and
applyLinuxDesktopSettingsSharedPatch with injectSettingsSectionTitle(), which
matches the anchor case with a regex, captures the JSX factory and message
component identifiers, and reuses them in the injected case. This matches the
identifier-tolerant approach already used by the route/navigation patches.

Add regression tests driven by a fixture whose identifiers drift (`r` / `o[5]`,
mirroring 26.601.21317); these fail on the literal needle and pass with the
regex. Verified end-to-end by rebuilding from the real DMG: the Linux desktop
settings page and toggles are present with no skipped-patch warning.

Fixes the regression introduced for bundles described in #404 / #405.
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.

Linux desktop settings toggles missing from UI on Codex builds with the native Keyboard Shortcuts page

1 participant