Desktop plugin toggle shows ordinary success when config/batchWrite returns okOverridden
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
Version and platform
Inspected macOS desktop client bundle asset webview/assets/app-initial-cadb12d4a15e.js (SHA-256 73594359b28d81b6fcc9a52aac808f6a2e9fc32ced661adb3e23d297827b9285), ChatGPT/Codex host 26.901.51231 (8109). Subscription details omitted: the reproduction uses extracted client functions with mocked service responses, not an account-specific operation.
Actual
The local plugin-enable mutation ignores the config/batchWrite response status. When the write returns okOverridden (saved but overridden by another configuration layer), the success callback still displays the normal enabled/disabled success toast.
Reproduction and expected
- Invoke the extracted local toggle mutation in an isolated lifecycle harness.
- Return
{status: "okOverridden"}from the config-write mock. - The original callback reports ordinary success, although the effective plugin state can remain opposite to the requested state.
Expected: finish normal refresh, preserve the successful saved write, and explicitly tell the user another configuration overrides it. Do not use the generic request-failure rollback for a completed write.
Candidate and validation
The candidate returns the status after the existing refresh and branches in the success callback. The override branch shows a saved-but-overridden message and suppresses the ordinary success toast; genuine request failures retain the existing cache rollback.
Twelve actual-function isolation checks passed: original/candidate × enable/disable × normal/overridden/request failure. The harness invokes onMutate, passes its old-cache context through lifecycle callbacks, and asserts optimistic cache updates, refresh, rollback and actual message text. Independent review reran the checks. The existing danger-toast API was reused for the prototype; final presentation/localization is for maintainers to choose.
No real settings were changed. React integration, refresh implementation internals, remote/hosted-plugin paths and actual configuration backend integration are not claimed as tested.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the extracted mutation in webview/assets/app-initial-cadb12d4a15e.js and trace its onMutate, refresh, and success or failure callbacks. Run the isolated lifecycle harness described in the issue, including normal, okOverridden, and request-failure responses. Done means an overridden write shows a saved-but-overridden message without generic rollback, while genuine failures retain the existing rollback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100