chore(themes): drop dead PREFERRED_THEME_ORDER sort from bundler - #335
Merged
Conversation
Deploying mouseterm with
|
| Latest commit: |
8b9d1a3
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://fecf8431.mouseterm.pages.dev |
| Branch Preview URL: | https://chore-drop-dead-theme-sort.mouseterm.pages.dev |
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.
What
Removes the dead
PREFERRED_THEME_ORDERlist and theallThemes.sort(...)that consumed it from the theme-bundling generator.Why
PREFERRED_THEME_ORDERcontained a single id —GitHub.github-vscode-theme.github-dark-default— but that extension was removed fromEXTENSIONSin cd248fa ("Only ship OpenVSX themes"), so the id is never present in the fetched theme set. EveryPREFERRED_THEME_ORDER.indexOf(...)therefore returns-1, the comparator always returns0, and the sort is a complete no-op that only reorders relative to a theme that no longer exists.The sort was there to pin a preferred theme first, because
getBundledThemes()[0]is the default-theme fallback (getActiveThemeId()inlib/src/lib/themes/store.ts). With the pinned theme gone, that mechanism is inert leftover from the OpenVSX-only cleanup.Behavior
No change. The sort is currently a no-op, so
bundled.jsonordering is untouched — the default remainsvscode.theme-defaults.dark-visual-studio, a dark theme consistent with the "Dark default theme fallback" noted indocs/specs/theme.md.bundled.jsonwas not regenerated because the output is byte-identical.If a specific default is wanted in the future, re-introduce an explicit ordering keyed on an id that is actually bundled — the removed version pointed at one that isn't.
Testing
No regression test: this deletes a no-op, so there is no behavioral delta to assert. The invariant —
bundled.jsonunchanged — is verified by the committed output being untouched.node --checkconfirms the script still parses;PREFERRED_THEME_ORDERhas no remaining references.Found during the nightly code-quality sweep.