fix(dashboard): pass missing args to encryptionPct in refresh() #124

Merged
razvandimescu merged 1 commits from fix/dashboard-encryption-pct-args into main 2026-04-21 00:05:50 +08:00
razvandimescu commented 2026-04-21 00:04:27 +08:00 (Migrated from github.com)

Summary

  • Commit eb5ea3b generalised encryptionPct from (transport) to (data, encryptedKeys, allKeys) and updated renderTransport + renderUpstreamWire, but missed the call inside render() that computes the inline ~N/s · M% enc QPS tag.
  • With allKeys undefined, the first .reduce() threw TypeError. The render try/catch silently downgraded the whole dashboard to "disconnected" — every panel left empty even though /stats returned real data.
  • Also: console.error(err) inside the catch so the next silent-failure regression lands in DevTools instead of behind a source dive.

Test plan

  • cargo fmt --check / cargo clippy -D warnings / cargo audit / cargo test (344 pass)
  • Manual: reload dashboard, confirm panels populate and QPS tag renders with no console errors
  • Manual: temporarily break a render function, verify the error lands in DevTools console

Diff is two lines: the call-site fix and the console.error line.

## Summary - Commit `eb5ea3b` generalised `encryptionPct` from `(transport)` to `(data, encryptedKeys, allKeys)` and updated `renderTransport` + `renderUpstreamWire`, but missed the call inside `render()` that computes the inline `~N/s · M% enc` QPS tag. - With `allKeys` undefined, the first `.reduce()` threw `TypeError`. The render `try/catch` silently downgraded the whole dashboard to "disconnected" — every panel left empty even though `/stats` returned real data. - Also: `console.error(err)` inside the catch so the next silent-failure regression lands in DevTools instead of behind a source dive. ## Test plan - [x] `cargo fmt --check` / `cargo clippy -D warnings` / `cargo audit` / `cargo test` (344 pass) - [ ] Manual: reload dashboard, confirm panels populate and QPS tag renders with no console errors - [ ] Manual: temporarily break a render function, verify the error lands in DevTools console Diff is two lines: the call-site fix and the `console.error` line.
Sign in to join this conversation.