fix(webgui): harden config bool parsing and action error handling
This commit is contained in:
1 parent
3659d5b7da
commit
37f736c158
10 files changed
+1366
-233
No files matched your search
@@ -0,0 +1,32 @@
|
||||
# WebUI 用户视角问题清单(2026-06-01)
|
||||
|
||||
## 已修复(本轮)
|
||||
|
||||
1. `/api/config` 布尔值字符串会被错误写入
|
||||
- 现象:`"false"` 可能被当成 `true`。
|
||||
- 修复:后端 `routes.py` 新增 `_coerce_bool`,前端 `config_form.js` 同步字面量解析。
|
||||
|
||||
2. 设备动作在无设备时存在未捕获 Promise 报错噪音
|
||||
- 现象:点击“返回键”后可能触发全局 `pageerror`(虽有提示但会污染错误面板)。
|
||||
- 修复:`runtime_device_actions.js` 的 `sendBackKey()` 增加局部 `try/catch`。
|
||||
|
||||
3. 预约/高价值列表中少量字段未统一做安全处理
|
||||
- 现象:个别字符串字段直接插入模板字符串。
|
||||
- 修复:`runtime_actions.js` 对 `future_str` 等补 `escapeHtml`,数值字段统一显式数值化。
|
||||
|
||||
4. WiFi 自动重连与扫描参数错误码语义不清
|
||||
- 修复:
|
||||
- 无 adb:`/api/wifi/auto-reconnect` 返回 `422`。
|
||||
- `ports` 非法:`/api/wifi/scan` 返回 `400 invalid ports`。
|
||||
- `probe_timeout` 非法继续返回 `400`。
|
||||
|
||||
## 仍可优化(下一批)
|
||||
|
||||
1. 移动端首屏头部信息密度偏高
|
||||
- 证据:`mobile_home.png` 中操作按钮区占比较大,设备/状态卡阅读层级偏挤。
|
||||
- 建议:在 `< 420px` 下把二级按钮折叠进更多菜单,保留“开始/停止/截图”主操作。
|
||||
|
||||
2. Tab 横向切换在自动化点击中偶发不可见状态
|
||||
- 证据:Playwright 偶发 `runLogs` tab 点击超时(人工可复现概率低)。
|
||||
- 建议:为 tab click 增加 `scrollIntoView` + `requestAnimationFrame` 后触发,提升自动化与低端机稳定性。
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
{
|
||||
"url": "http://localhost:8001/",
|
||||
"screenshots": [
|
||||
"artifacts\\webui_checks\\20260601\\desktop_home.png",
|
||||
"artifacts\\webui_checks\\20260601\\desktop_run_panel.png",
|
||||
"artifacts\\webui_checks\\20260601\\desktop_stats_panel.png",
|
||||
"artifacts\\webui_checks\\20260601\\desktop_monitor_panel.png",
|
||||
"artifacts\\webui_checks\\20260601\\desktop_reservations_panel.png",
|
||||
"artifacts\\webui_checks\\20260601\\desktop_runlogs_panel.png",
|
||||
"artifacts\\webui_checks\\20260601\\desktop_actionlogs_panel.png",
|
||||
"artifacts\\webui_checks\\20260601\\mobile_home.png",
|
||||
"artifacts\\webui_checks\\20260601\\mobile_run_panel.png",
|
||||
"artifacts\\webui_checks\\20260601\\mobile_stats_panel.png",
|
||||
"artifacts\\webui_checks\\20260601\\mobile_monitor_panel.png",
|
||||
"artifacts\\webui_checks\\20260601\\mobile_reservations_panel.png",
|
||||
"artifacts\\webui_checks\\20260601\\mobile_runlogs_panel.png",
|
||||
"artifacts\\webui_checks\\20260601\\mobile_actionlogs_panel.png"
|
||||
],
|
||||
"console_errors": [
|
||||
{
|
||||
"type": "error",
|
||||
"text": "Failed to load resource: the server responded with a status of 422 (Unprocessable Entity)"
|
||||
},
|
||||
{
|
||||
"type": "action",
|
||||
"text": "click_failed .tabBtn[data-target=\"runLogs\"]: Locator.click: Timeout 3000ms exceeded.\nCall log:\n - waiting for locator(\".tabBtn[data-target=\\\"runLogs\\\"]\").first\n - locator resolved to <button role=\"tab\" type=\"button\" class=\"tabBtn\" data-target=\"runLogs\" aria-selected=\"false\">…</button>\n - attempting click action\n - waiting for element to be visible, enabled and stable\n - element is visible, enabled and stable\n - scrolling into view if needed\n - done scrolling\n - performing click action\n"
|
||||
}
|
||||
],
|
||||
"page_errors": [
|
||||
"未选择设备,且无法自动解析在线设备"
|
||||
],
|
||||
"checks": {
|
||||
"desktop:has:btnStart": true,
|
||||
"desktop:has:btnStop": true,
|
||||
"desktop:has:btnForceStop": true,
|
||||
"desktop:has:btnRefresh": true,
|
||||
"desktop:has:btnScreenshot": true,
|
||||
"desktop:has:btnBackKey": true,
|
||||
"desktop:has:btnLoad": true,
|
||||
"desktop:has:btnSave": true,
|
||||
"desktop:has:device": true,
|
||||
"desktop:has:btnWifiScan": true,
|
||||
"desktop:has:wifiStatus": true,
|
||||
"desktop:has:runLog": true,
|
||||
"desktop:has:appConnText": true,
|
||||
"desktop:has:appConnDot": true,
|
||||
"desktop:has:reservationsContent": true,
|
||||
"desktop:has:highValueRoomsContent": true,
|
||||
"desktop:has:hv_expand_all": true,
|
||||
"desktop:has:hv_collapse_all": true,
|
||||
"desktop:conn_text": "已连接",
|
||||
"desktop:body_box": {
|
||||
"w": 1600,
|
||||
"h": 1178.65625,
|
||||
"scrollH": 1179
|
||||
},
|
||||
"desktop:overflow_controls": 0,
|
||||
"mobile:has:btnStart": true,
|
||||
"mobile:has:btnStop": true,
|
||||
"mobile:has:btnForceStop": true,
|
||||
"mobile:has:btnRefresh": true,
|
||||
"mobile:has:btnScreenshot": true,
|
||||
"mobile:has:btnBackKey": true,
|
||||
"mobile:has:btnLoad": true,
|
||||
"mobile:has:btnSave": true,
|
||||
"mobile:has:device": true,
|
||||
"mobile:has:btnWifiScan": true,
|
||||
"mobile:has:wifiStatus": true,
|
||||
"mobile:has:runLog": true,
|
||||
"mobile:has:appConnText": true,
|
||||
"mobile:has:appConnDot": true,
|
||||
"mobile:has:reservationsContent": true,
|
||||
"mobile:has:highValueRoomsContent": true,
|
||||
"mobile:has:hv_expand_all": true,
|
||||
"mobile:has:hv_collapse_all": true,
|
||||
"mobile:conn_text": "已连接",
|
||||
"mobile:body_box": {
|
||||
"w": 390,
|
||||
"h": 2102.875,
|
||||
"scrollH": 2103
|
||||
},
|
||||
"mobile:overflow_controls": 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"console_errors": [
|
||||
{
|
||||
"type": "error",
|
||||
"text": "Failed to load resource: the server responded with a status of 422 (Unprocessable Entity)"
|
||||
}
|
||||
],
|
||||
"page_errors": [],
|
||||
"screenshots": [
|
||||
"artifacts\\webui_checks\\20260601_port8002\\mobile_main.png"
|
||||
],
|
||||
"checks": {
|
||||
"has_unhandled_error": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"console_errors": [
|
||||
{
|
||||
"type": "error",
|
||||
"text": "Failed to load resource: the server responded with a status of 422 (Unprocessable Entity)"
|
||||
}
|
||||
],
|
||||
"page_errors": [],
|
||||
"screenshots": [
|
||||
"artifacts\\webui_checks\\20260601_postfix\\mobile_after_fix.png"
|
||||
],
|
||||
"checks": {
|
||||
"has_unhandled_error": false
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user