Add adaptive FPS and honest device reachability during streaming

DDP uses fire-and-forget UDP, so when a WiFi device becomes overwhelmed
by sustained traffic, sends appear successful while the device is
actually unreachable. This adds:

- HTTP liveness probe (GET /json/info, 2s timeout) every 10s during
  streaming, exposed as device_streaming_reachable in target state
- Adaptive FPS (opt-in): exponential backoff when device is unreachable,
  gradual recovery when it stabilizes — finds sustainable send rate
- Honest health checks: removed the lie that forced device_online=true
  during streaming; now runs actual health checks regardless
- Target editor toggle, FPS display shows effective rate when throttled,
  health dot reflects streaming reachability, red highlight when
  unreachable
- Auto-backup scheduling support in settings modal

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-26 20:22:58 +03:00
parent f8656b72a6
commit cadef971e7
23 changed files with 873 additions and 21 deletions

View File

@@ -169,6 +169,7 @@
"device.metrics.device_fps": "设备刷新率",
"device.health.online": "在线",
"device.health.offline": "离线",
"device.health.streaming_unreachable": "流传输期间不可达",
"device.health.checking": "检测中...",
"device.tutorial.start": "开始教程",
"device.tip.metadata": "设备信息LED 数量、类型、颜色通道)从设备自动检测",
@@ -912,6 +913,8 @@
"targets.brightness_vs.none": "无(设备亮度)",
"targets.min_brightness_threshold": "最低亮度阈值:",
"targets.min_brightness_threshold.hint": "当有效输出亮度(像素亮度 × 设备/源亮度低于此值时LED完全关闭0 = 禁用)",
"targets.adaptive_fps": "自适应FPS",
"targets.adaptive_fps.hint": "当设备无响应时自动降低发送速率稳定后逐步恢复。推荐用于信号较弱的WiFi设备。",
"search.open": "搜索 (Ctrl+K)",
"search.placeholder": "搜索实体... (Ctrl+K)",
@@ -943,5 +946,25 @@
"settings.restore.error": "恢复失败",
"settings.restore.restarting": "服务器正在重启...",
"settings.restore.restart_timeout": "服务器未响应。请手动刷新页面。",
"settings.button.close": "关闭"
"settings.button.close": "关闭",
"settings.auto_backup.label": "自动备份",
"settings.auto_backup.hint": "自动定期创建所有配置的备份。当达到最大数量时,旧备份会被自动清理。",
"settings.auto_backup.enable": "启用自动备份",
"settings.auto_backup.interval_label": "间隔",
"settings.auto_backup.max_label": "最大备份数",
"settings.auto_backup.save": "保存设置",
"settings.auto_backup.saved": "自动备份设置已保存",
"settings.auto_backup.save_error": "保存自动备份设置失败",
"settings.auto_backup.last_backup": "上次备份",
"settings.auto_backup.never": "从未",
"settings.saved_backups.label": "已保存的备份",
"settings.saved_backups.hint": "存储在服务器上的自动备份文件。下载到本地保存,或删除以释放空间。",
"settings.saved_backups.empty": "没有已保存的备份",
"settings.saved_backups.restore": "恢复",
"settings.saved_backups.download": "下载",
"settings.saved_backups.delete": "删除",
"settings.saved_backups.delete_confirm": "删除此备份文件?",
"settings.saved_backups.delete_error": "删除备份失败"
}