_pendingToggleAction is a stringly-typed workaround for stale state #45
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: _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.
_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.