Repository navigation
fix: allow renaming custom theme without updating colors (@fehmer) - #8530
Merged
Merged
Conversation
The update modal's checkbox had no initVal, so SimpleModal seeded the field with undefined. The required z.boolean() schema rejected undefined on submit, so renaming a custom theme without ticking the color-update checkbox died with 'Please fill in all fields'. Seed false (same convention as the DevOptions generate-data modal) so the field is a real boolean from birth.
fehmer
marked this pull request as draft
October 26, 2026 22:52
Member
Author
|
Browser check on the dev server (account: quick-login Before (parent commit, no After (this PR): the same rename lands — modal closes, "Updated" notification, name persists; checked-box path verified too. Restored the theme to its original name afterwards. |
fehmer
marked this pull request as ready for review
October 26, 2026 23:16
Miodec
approved these changes
Oct 27, 2026
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
updateColors: { type: "checkbox", + initVal: false, label: "Update custom theme to current colors", },A checkbox with no
initValis seededundefinedbySimpleModal. The requiredz.boolean()schema rejectsundefinedon submit, so renaming a custom theme without ticking the color-update checkbox was blocked ("Please fill in all fields"). Seedfalse(same convention as the DevOptions generate-data modal) so the field is a real boolean from birth.Evidence
After (browser, dev server): same action → modal closes, "Updated" notification, name persisted; checked-box path also verified. No new console errors
z.boolean().safeParse(undefined)→success: falsevssafeParse(false)→success: true(the value the untouched field now holds)oxlint --format agentonTheme.tsx— cleanoxlint --type-aware --type-check— one pre-existing finding invitest.config.ts, untouched hereoxfmt --check— cleanMerge Danger
Door: two-way
One-line form seed, no schema change, no persisted data. Revert restores the old block.
Blast Radius: minimal
Only the "Update custom theme" modal. The checkbox renders unchecked exactly as before; checked/unchecked values are unchanged.
Closes #8527