You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Extension toggle in Settings snaps back to On when disabling #9881
Describe the bug
In Settings → Extensions, turning OFF an enabled extension makes the toggle immediately snap back to On for the duration of the (async) toggle, instead of showing the optimistic Off state. Enabling works correctly, so the behavior is asymmetric.
Root cause ExtensionItem keeps a local visuallyEnabled state for optimistic feedback, but the Switch's checked is computed as (isToggling && visuallyEnabled) || extension.enabled. While disabling an enabled extension, extension.enabled is still true until the async config write completes, so || extension.enabled forces checked back to true. (ui/desktop/src/components/settings/extensions/subcomponents/ExtensionItem.tsx)
To Reproduce
Open Settings → Extensions.
Toggle an enabled extension off.
The switch flips off, then immediately jumps back on until the operation completes (more visible on a slow config write).
Expected behavior
The toggle should reflect the optimistic state immediately in both directions (off when disabling, on when enabling).
Environment
Interface: Desktop UI
Affected file: ExtensionItem.tsx (current main)
I have a one-line fix (checked={visuallyEnabled}, kept in sync by the existing effect) plus a regression test; will open a PR.
Activity