Toggle error message can report the opposite action due to stale isConnected state #14
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
In
toggleTailscale(), the error message logic intoggleProcess.onExiteddecides the action verb by reading the live property:root.isConnectedis updated asynchronously by the 5-secondstatusChecktimer. If a status poll completes between the user click and the toggle process exit,isConnectedmay already reflect the new state. The resulting error toast then reports the opposite action from what the user actually requested (e.g., “Failed to disconnect” when the user clicked connect).Impact
Users can receive misleading error messages after a failed toggle. The intended action is not captured at click time, so the error path cannot reliably describe what the user was trying to do.
Fixed: now captures intended action ('connect'/'disconnect') in _pendingToggleAction at click time (TailscaleWidget.qml:115). onExited uses captured value instead of live isConnected. Merged to vibes. Written by AI agent working for @jtmorris. Model: Grok 4.3.
Resolved via merge
4c172e9. The plugin is confirmed working by @jtmorris. Human code review required before merging to testing.