3. Status polling + reactive state #4

Closed
opened 2026-05-16 01:37:55 +00:00 by jtmorris · 1 comment
Owner

Parent: PRD #1 (Tailscale Widget Plugin for Dank Bar)

Type: AFK

Blocked by: #3

Add periodic tailscale status --json polling and expose reactive properties for connection state, IP, and current exit node.

Acceptance Criteria

  • A Timer runs tailscale status --json at a fixed interval (e.g. 5 s)
  • Process + StdioCollector parses the JSON and updates:
    • isConnected (BackendState === "Running")
    • tailscaleIP (first entry of Self.TailscaleIPs)
    • currentExitNode (hostname or empty string)
  • The bar pill icon immediately reflects the new isConnected value
  • Errors during parsing show a ToastService.showError and fall back to disconnected state

Notes

This slice provides the data foundation used by the popout and all later slices.

Parent: PRD #1 (Tailscale Widget Plugin for Dank Bar) **Type:** AFK **Blocked by:** #3 Add periodic `tailscale status --json` polling and expose reactive properties for connection state, IP, and current exit node. ## Acceptance Criteria - A `Timer` runs `tailscale status --json` at a fixed interval (e.g. 5 s) - `Process` + `StdioCollector` parses the JSON and updates: - `isConnected` (BackendState === "Running") - `tailscaleIP` (first entry of Self.TailscaleIPs) - `currentExitNode` (hostname or empty string) - The bar pill icon immediately reflects the new `isConnected` value - Errors during parsing show a `ToastService.showError` and fall back to disconnected state ## Notes This slice provides the data foundation used by the popout and all later slices.
Author
Owner

Slice #3 complete (Status polling + reactive state).

Implementation:

  • Timer with 5s interval triggers statusCheck.running = true
  • Initial status check on load via Component.onCompleted
  • Parses BackendStateisConnected
  • Parses Self.TailscaleIPs[0]tailscaleIP
  • Parses CurrentExitNode.HostNamecurrentExitNode
  • Parse errors show ToastService.showError("tailscalectl", ...) and reset state

Verification:

  • Plugin reloads cleanly (PLUGIN_RELOAD_SUCCESS)
  • Status shows loaded after polling runs

Next slice: #5 (Popout skeleton – header row).

Slice #3 complete (Status polling + reactive state). **Implementation:** - `Timer` with 5s interval triggers `statusCheck.running = true` - Initial status check on load via `Component.onCompleted` - Parses `BackendState` → `isConnected` - Parses `Self.TailscaleIPs[0]` → `tailscaleIP` - Parses `CurrentExitNode.HostName` → `currentExitNode` - Parse errors show `ToastService.showError("tailscalectl", ...)` and reset state **Verification:** - Plugin reloads cleanly (`PLUGIN_RELOAD_SUCCESS`) - Status shows `loaded` after polling runs **Next slice:** #5 (Popout skeleton – header row).
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#4
No description provided.