fix: remove dead code (toast stubs, unused Redis key, tunnel manager fields)

- Remove 7 no-op exported stubs from toast.tsx (ToastProvider, ToastViewport,
  Toast, ToastTitle, ToastDescription, ToastClose, useToasts) — nothing imports them
- Remove fwFailKey variable and its Set() call from worker.go — the
  firmware:check-failed Redis key was never read anywhere
- Remove unused deviceStore and credCache fields from tunnel.Manager struct
  and drop corresponding parameters from NewManager(); update call site in
  main.go and all test usages

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jason Staack
2026-03-15 23:12:56 -05:00
parent 83e59ed8d7
commit f49f5f739b
5 changed files with 16 additions and 38 deletions

View File

@@ -390,10 +390,6 @@ func PollDevice(
slog.Warn("firmware check failed", "device_id", dev.ID, "error", fwErr)
// Set cooldown on failure too, but shorter (6h) so we retry sooner than success (24h).
// Prevents hammering devices that can't reach MikroTik update servers every poll cycle.
fwFailKey := fmt.Sprintf("firmware:check-failed:%s", dev.ID)
if err := redisClientForFirmware.Set(ctx, fwFailKey, "1", 6*time.Hour).Err(); err != nil {
slog.Warn("Redis SET failed", "key", fwFailKey, "error", err)
}
// Also set the main checked key to prevent the success path from re-checking.
if err := redisClientForFirmware.Set(ctx, fwCacheKey, "1", 6*time.Hour).Err(); err != nil {
slog.Warn("Redis SET failed", "key", fwCacheKey, "error", err)