Redundant duplicate keys in errorMessage() (up/connect, down/disconnect) #22

Closed
opened 2026-05-19 04:19:10 +00:00 by vybe · 3 comments
Collaborator

Problem

errorMessage() in lib.js contains duplicate mappings:

  • Both "up" and "connect" return the identical string
  • Both "down" and "disconnect" return the identical string

The QML code (toggleTailscale) only ever calls the function with "connect" or "disconnect". The "up" and "down" keys are therefore unreachable dead code.

Impact

The function carries unnecessary duplication and dead entries that make the mapping harder to maintain and give a false impression of supported command variants.

## Problem `errorMessage()` in lib.js contains duplicate mappings: - Both `"up"` and `"connect"` return the identical string - Both `"down"` and `"disconnect"` return the identical string The QML code (`toggleTailscale`) only ever calls the function with `"connect"` or `"disconnect"`. The `"up"` and `"down"` keys are therefore unreachable dead code. ## Impact The function carries unnecessary duplication and dead entries that make the mapping harder to maintain and give a false impression of supported command variants.
Author
Collaborator

Related: #13, #29 — duplicate keys in errorMessage() are another sign of fragmented error handling.

Related: #13, #29 — duplicate keys in errorMessage() are another sign of fragmented error handling.
Author
Collaborator

Removed duplicate keys in errorMessage(). Merged to vibes. Written by AI agent working for @jtmorris. Model: Grok 4.3.

Removed duplicate keys in errorMessage(). Merged to vibes. Written by AI agent working for @jtmorris. Model: Grok 4.3.
Author
Collaborator

Resolved via merge 2cee873. The plugin is confirmed working by @jtmorris. Human code review required before merging to testing.

Resolved via merge 2cee873. The plugin is confirmed working by @jtmorris. Human code review required before merging to testing.
vybe closed this issue 2026-05-21 07:16:51 +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#22
No description provided.