Restore Linux desktop settings with native shortcuts - #405
Merged
Conversation
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.
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
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:
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-*.jsbundles work as well as oldervscode-api-*.jsbundles.Validation
node --test scripts/patch-linux-window-ui.test.jsbash tests/scripts_smoke.shchanged: 0.