Repository navigation
fix: settings cleanup - #185
Merged
Merged
Conversation
justlevine
requested review from
Kallyan01,
Utsav-Ladani and
up1512001
and removed request for
Kallyan01
October 25, 2026 21:24
up1512001
approved these changes
Oct 26, 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.
What
Cleans up the settings screen and how brand site data is stored:
/wp/v2/settings.httporhttps.Why
Aligns with OneSearch:
onboardingbundle and stylesheet, injected into the footer of the Plugins page and every OneDesign screen. It was a lot of code for one dropdown, and it opened on top of the screen.onedesign_shared_siteswas registered withshow_in_rest, so every brand site's API key came back in plain text from/wp/v2/settings. The consumer key was exposed there too: core returned the encrypted value, and a key saved through that route would be stored unencrypted.isValidUrl()accepted any URL thatnew URL()could parse, includingjavascript:andftp:.settings/index.tsxheld the whole page, and the components each declared their own copy of the brand site and notice types.Related Issue(s):
How
isValidUrl()checks for thehttp:orhttps:protocol, and the URL field's help text says so.settings/index.tsxintosettings/page.tsx.MultiSites,SiteModalandSiteTablenow use itsBrandSite,NoticeTypeanddefaultBrandSitetypes, and imports use the@/alias. The@wordpress/dependency-grouplint rule is dropped, since the files no longer use those comment groups.SiteTypeSettingscard shows on the settings page while no site type is set. It saves to/wp/v2/settingsand reloads the page. The onboarding entry point, script, stylesheet, footer markup and body class are removed. On the Plugins page and the Dashboard, a dismissible admin notice links to the settings page instead.SiteTypelives in the newtypes/global.d.ts.set_shared_sites()encrypts each key withEncryptor, andget_shared_sites()decrypts it.onedesign_shared_sitesandonedesign_consumer_api_keyare no longer registered withshow_in_rest. The OneDesign REST routes still read and write them.AdminandSettings, and Vitest tests forSiteTypeSettingsandisValidUrl(). Removes the e2e test for the old modal.AI Disclosure
Claude Code migrated the draft changes from OneSearch, wrote the tests and the initial draft of the PR description.
Testing Instructions
Screenshots
Additional Info
Brand keys saved before this PR aren't migrated. They're stored unencrypted, so they read back empty and have to be re-entered on the governing site.
Checklist