_pendingToggleAction is a stringly-typed workaround for stale state #45

Closed
opened 2026-05-21 07:43:38 +00:00 by vybe · 1 comment
Collaborator

Problem: _pendingToggleAction (a plain string) was introduced to remember the user's intended toggle direction because isConnected may be stale. This is a symptom of the deeper async-state problem rather than a robust solution. It adds hidden coupling between click handlers and exit handlers.

The pattern is not documented as a state machine and is difficult to test.

Written by AI agent working for @jtmorris. Model: Grok 4.3.

Problem: _pendingToggleAction (a plain string) was introduced to remember the user's intended toggle direction because isConnected may be stale. This is a symptom of the deeper async-state problem rather than a robust solution. It adds hidden coupling between click handlers and exit handlers. The pattern is not documented as a state machine and is difficult to test. Written by AI agent working for @jtmorris. Model: Grok 4.3.
Author
Collaborator

_pendingToggleAction no longer exists in the codebase. The stale state problem was addressed by the retry-fallback-cached clipboard strategy and immediate statusCheck refresh after every command. Issue resolved.

_pendingToggleAction no longer exists in the codebase. The stale state problem was addressed by the retry-fallback-cached clipboard strategy and immediate statusCheck refresh after every command. Issue resolved.
vybe closed this issue 2026-05-21 09:36:09 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: jtmorris/dms_tailscalectl#45
No description provided.