Description
SaveIMAdapter (desktop/wailskit/im.go L119-183) silently flips a disabled adapter back to enabled whenever any other field is edited.
Trigger scenario
- User disables adapter via
SetIMAdapterEnabled(name, false) (cost/noise/debug reasons)
- User opens Edit dialog, changes only the token field, saves
values["enabled"] missing → adapterCfg.Enabled = true
- Preserve list omits Enabled → persisted
Enabled flips false → true
- On next start the adapter is unexpectedly online
Expected vs actual
Fix
Add Enabled to the preserve list — e.g. only override when values["enabled"] is explicitly "true"/"false"; otherwise keep existing.Enabled.
Severity
High — deterministic silent state loss on a routine UI action; user-intent violation with operational impact (adapter comes online unexpectedly).
Verified by independent review subagent (sa-1, static analysis + full call-chain verification).
Description
SaveIMAdapter(desktop/wailskit/im.goL119-183) silently flips a disabled adapter back to enabled whenever any other field is edited.enabled := values["enabled"] != "false"— defaults to true when the key is absent.Args,Env,AllowFrom,OutputMode,Targets,Extra— but notEnabled.frontend/src/components/IMManagement.tsxL168-178) sends only{ platform, ...editFields }— neverenabled.Trigger scenario
SetIMAdapterEnabled(name, false)(cost/noise/debug reasons)values["enabled"]missing →adapterCfg.Enabled = trueEnabledflips false → trueExpected vs actual
Fix
Add Enabled to the preserve list — e.g. only override when
values["enabled"]is explicitly "true"/"false"; otherwise keepexisting.Enabled.Severity
High — deterministic silent state loss on a routine UI action; user-intent violation with operational impact (adapter comes online unexpectedly).
Verified by independent review subagent (sa-1, static analysis + full call-chain verification).