chore: remove historical issue-chasing comments from QML and lib.js (per first-principles plan)
This commit is contained in:
parent
9dd73b6d55
commit
619c988f56
1 changed files with 3 additions and 6 deletions
|
|
@ -18,7 +18,7 @@ PluginComponent {
|
||||||
property string _copyText: ""
|
property string _copyText: ""
|
||||||
property string _copyCurrentTool: ""
|
property string _copyCurrentTool: ""
|
||||||
property int _copyAttempted: 0
|
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"
|
layerNamespacePlugin: "tailscalectl"
|
||||||
popoutWidth: 360
|
popoutWidth: 360
|
||||||
|
|
@ -113,9 +113,7 @@ PluginComponent {
|
||||||
ToastService.showError("tailscalectl", TailscaleLib.errorMessage("status"))
|
ToastService.showError("tailscalectl", TailscaleLib.errorMessage("status"))
|
||||||
}
|
}
|
||||||
|
|
||||||
// #42 poll-then-act: if a toggle was requested, use the *fresh* state we just received
|
// Post-action verification: 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.
|
|
||||||
if (root._pendingToggle) {
|
if (root._pendingToggle) {
|
||||||
root._pendingToggle = false
|
root._pendingToggle = false
|
||||||
toggleProcess.command = TailscaleLib.buildToggleCommand(root.isConnected)
|
toggleProcess.command = TailscaleLib.buildToggleCommand(root.isConnected)
|
||||||
|
|
@ -125,8 +123,7 @@ PluginComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleTailscale() {
|
function toggleTailscale() {
|
||||||
// #42: poll-then-act — never decide up/down from potentially stale root.isConnected.
|
// Post-action verification: force a fresh status check, then act on the real ground truth.
|
||||||
// Force a fresh statusCheck; the decision happens in its onExited using the just-received value.
|
|
||||||
root._pendingToggle = true
|
root._pendingToggle = true
|
||||||
statusCheck.running = true
|
statusCheck.running = true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue