Skip to content

v0.4.2

Choose a tag to compare

@github-actions github-actions released this 24 May 07:52
· 29 commits to main since this release
clipboardwire v0.4.2

One user-visible addition on top of v0.4.1:

- Tray tooltip now shows the connected-peer count when the embedded
  hub is running. A new line like `hub running (3 clients connected)`
  appears under the existing status/server line, so you can tell at
  a glance how many devices are wired into the local hub without
  opening anything. Singular and plural handled.

  Plumbing: new `HubStatsSink` (Arc<AtomicUsize>) the hub task
  updates on every register/deregister, plugged into `ServerConfig`
  by the tray. A 1-second poller posts a `HubPeerCountChanged` event
  on count shifts; tooltip rebuilds on each.

  The count includes our own loopback supervisor (the hub treats it
  as a peer like any other), so a freshly-started hub with no remote
  peers reads `1 client connected`.

Three new tests for this:
- Unit tests for the sink (register/deregister tick, no underflow on
  unknown id) and the tooltip pluralisation.
- End-to-end test that opens two real WebSockets against an
  axum-served hub and asserts the sink tracks 0 -> 1 -> 2 -> 1 -> 0
  as the connections come and go. Catches regressions in ws.rs's
  deregister path that the unit tests would not see.

No protocol changes. v0.4.x clients keep working unchanged.