fix(app): devtools toggle stuck ON — persist enabled state bidirectionally - #223
Merged
Merged
Conversation
…nally The developer tools toggle was stuck in the ON position because: 1. The default for developer.enabled was true (always showed ON) 2. Toggling OFF never persisted false to the store 3. Kobalte's controlled Switch always reflected the stale true value 4. Every click triggered onChange(false) but the visual never changed Fix: default to false, and persist both true/false so the controlled component reflects reality. The toggle now works bidirectionally: ON triggers rebuild, OFF restores marketplace and reloads. Companion: harmoniqs/amicode#489
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughDeveloper mode now defaults to disabled. Toggle changes persist for both enabling and disabling, while disabling retains the rebuild and extension restore flow. ChangesDeveloper mode settings
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
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.
Problem
The developer tools release ↔ dev toggle in Settings was non-functional. Clicking it did nothing visible — the switch stayed ON permanently.
Root Cause
A controlled-component + state-persistence mismatch:
defaultSettings.developer.enabledwastrue— the toggle always showed ONfalseto the SolidJS store (stale comment: "marketplace build doesn't render this section")<Switch checked={enabled()}/>always reflected the staletrueonChange(false)but since the signal never updated, the visual snapped back to ONsetEnabled(true), which autofills paths and triggers rebuild) was unreachable from the UIFix
developer.enabledtofalse(fresh installs show OFF, toggle can be turned ON)trueandfalseviasettings.developer.setEnabled(value)unconditionally — the controlled component now reflects realityThe toggle is now bidirectional: ON triggers a full rebuild, OFF restores the marketplace dist and reloads.
Companion PR
harmoniqs/amicode#489 (same fix in the overlay source of truth)
Summary by CodeRabbit