clusev/resources/views/livewire
boban 9c0d390365 refactor(wireguard): remove dead code + DRY the WG surface (no behavior change)
Verified dead-code + duplication cleanup over the WireGuard feature surface
(found via an audit workflow, every item adversarially re-verified by grep):

Dead code removed:
- lang keys not_configured_title / not_configured_body (both locales) — orphaned
  when the unconfigured empty state became the in-page setup form (setup_title /
  setup_intro). 0 references anywhere. de/en parity kept (83/83).
- WgTraffic::series() 'buckets' return key — written, never read by blade/route/test.
- blade $fmtB byte-formatter — byte-identical duplicate of the top-level $fmtBytes
  already in scope; collapsed onto $fmtBytes.

DRY / readability (behavior-preserving):
- Index: PEER_NAME_RE constant (was the same regex literal at 5 sites), portInRange()
  + clampWindow() helpers (window default now self::WINDOWS[0]), openConfirm() helper
  (5 confirm-modal openers shared one dispatch), onFlag() helper (2 apply handlers).
- WgBridge: validPort() helper (port check was duplicated verbatim).
- clusev-wg.sh: _write_server_conf() shared by both setup paths (the byte-identical
  server bring-up was copy-pasted); single CIDR_RE constant for the 3 subnet checks;
  fixed a stale header comment that still claimed SSH is "NEVER matched" (the v0.9.40
  ssh-lock can match 22); documented the defence-in-depth re-validation in _set_*.
- WgStatus: documented server.pubkey is part of the /wg-status.json contract (kept).

No DB/migration changes (peer_name write-only column left intact — needs a
coordinated migration). 348 tests pass, shellcheck clean, Pint clean, R12 verified
in both the configured + unconfigured states (200, no console errors, no leaked
keys, traffic formatter renders 1.5 MB / 200 KB correctly).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 16:33:41 +02:00
..
audit feat(audit): configurable retention + scheduled clusev:prune-audit 2026-06-14 23:40:17 +02:00
auth fix(ui): themed x-checkbox component (accent, visible check) for login-protection + remember-me 2026-06-20 20:04:47 +02:00
files fix(modals): reliable open + spinner/error feedback on every modal trigger 2026-06-15 21:07:25 +02:00
help feat(wg): WireGuard help topic (registration + DE/EN content + test) 2026-06-20 22:46:04 +02:00
modals feat(security): signed confirm-action tokens + airtight backup-code reveal 2026-06-15 18:35:33 +02:00
servers fix(modals): reliable open + spinner/error feedback on every modal trigger 2026-06-15 21:07:25 +02:00
services fix(modals): reliable open + spinner/error feedback on every modal trigger 2026-06-15 21:07:25 +02:00
settings fix(ui): unify the 2FA status badge into one x-two-factor-badge component 2026-06-20 20:07:59 +02:00
system fix(tls): reverb WebSocket + honest TLS status behind an external proxy 2026-06-19 20:49:25 +02:00
versions feat(versions): grouped + paginated changelog browser (no endless scroll) 2026-06-20 21:47:45 +02:00
wireguard refactor(wireguard): remove dead code + DRY the WG surface (no behavior change) 2026-06-21 16:33:41 +02:00
dashboard.blade.php feat(dashboard): link the active server name + IP to its detail page 2026-06-20 20:41:59 +02:00
server-switcher.blade.php feat(i18n): bilingual foundation (DE/EN) + localize auth/dashboard/servers/fleet/account 2026-06-13 22:36:16 +02:00