chore(polish): manifest, docs, tests, and nits for dms-plugin-dev alignment
- plugin.json: added capabilities + requires; bumped to 0.2.0 - README: corrected "auto-refresh" claim (now documents the intentional on-demand + defensive poll-act-poll); added Implementation notes section covering Proc + I18n + best practices - test/lib.test.js: updated the manual verification comment (now references Proc + preserved behavior) - Minor version references in README example + caption - All changes keep exact toggle semantics and follow repo style Written by AI agent working for @jtmorris. Model: grok-build-0.1.
This commit is contained in:
parent
843e3d01f0
commit
4b9d6ce6d8
3 changed files with 17 additions and 7 deletions
13
README.md
13
README.md
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
A lightweight widget plugin that shows Tailscale connectivity status on the Dank Bar with quick controls for toggling connection, switching exit nodes, and copying peer addresses.
|
A lightweight widget plugin that shows Tailscale connectivity status on the Dank Bar with quick controls for toggling connection, switching exit nodes, and copying peer addresses.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
|
@ -14,7 +14,7 @@ A lightweight widget plugin that shows Tailscale connectivity status on the Dank
|
||||||
- Peer list with hostnames and IPs
|
- Peer list with hostnames and IPs
|
||||||
- **Click-to-copy** any hostname or IP to clipboard
|
- **Click-to-copy** any hostname or IP to clipboard
|
||||||
- **Exit node selection** — click `↗` on any exit-node-capable peer to route through it
|
- **Exit node selection** — click `↗` on any exit-node-capable peer to route through it
|
||||||
- **Auto-refresh** — status polls every 5 seconds
|
- **On-demand status** — polls Tailscale for ground truth on load, explicit actions, and post-mutation verification (defensive poll-act-poll for toggles; no always-on timer)
|
||||||
- **Toast notifications** for all errors
|
- **Toast notifications** for all errors
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
@ -70,7 +70,7 @@ A lightweight widget plugin that shows Tailscale connectivity status on the Dank
|
||||||
"id": "tailscalectl",
|
"id": "tailscalectl",
|
||||||
"name": "Tailscale",
|
"name": "Tailscale",
|
||||||
"description": "Tailscale status and controls on the Dank Bar",
|
"description": "Tailscale status and controls on the Dank Bar",
|
||||||
"version": "0.1.0",
|
"version": "0.2.0",
|
||||||
"author": "John Morris & Vybe (AI Slop... er... Coding Assistant)",
|
"author": "John Morris & Vybe (AI Slop... er... Coding Assistant)",
|
||||||
"icon": "vpn_key",
|
"icon": "vpn_key",
|
||||||
"type": "widget",
|
"type": "widget",
|
||||||
|
|
@ -79,6 +79,13 @@ A lightweight widget plugin that shows Tailscale connectivity status on the Dank
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Implementation notes
|
||||||
|
|
||||||
|
- Uses `Proc` singleton (from `qs.Common`) for all external `tailscale` commands (one-shot stdout capture + auto cleanup).
|
||||||
|
- Fully I18n-ready via `I18n.tr(...)` (source keys in American English only today; see `tailscalectl/i18n/` for scaffolding).
|
||||||
|
- Follows current `dms-plugin-dev` + DMS 1.4 plugin best practices (capabilities, requires, no raw Process for one-shots, etc.).
|
||||||
|
- Toggle uses intentional defensive poll-act-poll (see code comments).
|
||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,9 @@
|
||||||
"author": "John Morris",
|
"author": "John Morris",
|
||||||
"icon": "vpn_key",
|
"icon": "vpn_key",
|
||||||
"type": "widget",
|
"type": "widget",
|
||||||
|
"capabilities": ["dankbar-widget"],
|
||||||
"component": "./TailscaleWidget.qml",
|
"component": "./TailscaleWidget.qml",
|
||||||
"permissions": ["process"]
|
"permissions": ["process"],
|
||||||
|
"requires": ["tailscale"],
|
||||||
|
"version": "0.2.0"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@ const { parsePeers, makeExitNodeCommand, findActiveExitNode, errorMessage, forma
|
||||||
*
|
*
|
||||||
* All functions in lib.js are exercised via Node's built-in test runner.
|
* All functions in lib.js are exercised via Node's built-in test runner.
|
||||||
*
|
*
|
||||||
* TailscaleWidget.qml has no automated test coverage. The four Process
|
* TailscaleWidget.qml has no automated test coverage. The Proc.runCommand
|
||||||
* objects, their onExited handlers, and all widget UI behavior must be
|
* calls, callback-based coordination (exact poll-act-poll preserved), and all
|
||||||
* verified manually.
|
* widget UI behavior must be verified manually in a running DMS instance.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
test("parsePeers extracts exitNode from ExitNodeOption", () => {
|
test("parsePeers extracts exitNode from ExitNodeOption", () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue