From 4db80f7f1e9121e370a1560e29b0f49749ce2f0a Mon Sep 17 00:00:00 2001 From: vybe Date: Fri, 22 May 2026 10:19:48 +0000 Subject: [PATCH] chore: remove historical issue-chasing comments from QML and lib.js (per first-principles plan) --- tailscalectl/TailscaleWidget.qml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tailscalectl/TailscaleWidget.qml b/tailscalectl/TailscaleWidget.qml index a4fe36f..864b9a6 100644 --- a/tailscalectl/TailscaleWidget.qml +++ b/tailscalectl/TailscaleWidget.qml @@ -18,7 +18,7 @@ PluginComponent { property string _copyText: "" property string _copyCurrentTool: "" property int _copyAttempted: 0 - property bool _pendingToggle: false // transient one-shot for poll-then-act (#42) — reset immediately after use, no "desired state" cache + property bool _pendingToggle: false // transient one-shot for post-action verification (to be removed in first-principles refactor) layerNamespacePlugin: "tailscalectl" popoutWidth: 360 @@ -113,9 +113,7 @@ PluginComponent { ToastService.showError("tailscalectl", TailscaleLib.errorMessage("status")) } - // #42 poll-then-act: if a toggle was requested, use the *fresh* state we just received - // #47: structured logging evaluated and rejected — toasts + 120-char stderr already give - // actionable feedback; persistent logs would add state/rotation with no net UX benefit. + // Post-action verification: if a toggle was requested, use the fresh state we just received. if (root._pendingToggle) { root._pendingToggle = false toggleProcess.command = TailscaleLib.buildToggleCommand(root.isConnected) @@ -125,8 +123,7 @@ PluginComponent { } function toggleTailscale() { - // #42: poll-then-act — never decide up/down from potentially stale root.isConnected. - // Force a fresh statusCheck; the decision happens in its onExited using the just-received value. + // Post-action verification: force a fresh status check, then act on the real ground truth. root._pendingToggle = true statusCheck.running = true }