From 247a887cd611e8a4656c32d43d95a4e7b17c31f1 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 22 Jun 2026 10:13:13 +0800 Subject: [PATCH] =?UTF-8?q?fix(web):=20=E5=AE=9A=E6=97=B6=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=20z-index=20=E9=81=AE=E6=8C=A1=20+=20=E7=99=BB?= =?UTF-8?q?=E5=BD=95=20focus=20=E5=BC=95=E7=94=A8=E9=94=99=20id=20+=20bump?= =?UTF-8?q?=200.20.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - #crons-modal 漏了 z-index,退回基础 .modal(无 z-index)被 z-index:5 的侧栏/面板盖住("弹了但被遮挡");补 z-index:112 与 #skills-modal/ #memory-modal 对齐。排查用 node+DOM mock 跑通整条前端模块图确认 hd-crons 绑定确实执行,定位到纯 CSS 层叠问题。 - main.js:106 $("li-token").focus() 引用了不存在的输入框(实际 li-email), 未登录 boot 末尾会抛 TypeError;改为 li-email。 Co-Authored-By: Claude Opus 4.8 (1M context) --- PROGRESS.md | 8 +++++++- core/__init__.py | 2 +- web/static/dev.html | 1 + web/static/js/main.js | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/PROGRESS.md b/PROGRESS.md index 069a3cd..c379a7e 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -2,7 +2,7 @@ > 配合 `DESIGN.md`。本文件只记 phase 状态、决策偏差、文件量、下一步。每条 1-2 句:做了啥 + 关键判断;细节查 `git log` / `git diff` / `DESIGN §7.9`。 -最后更新:2026-06-21(发送期修复悬空 tool_calls,断中断 run 留下的协议崩 + bump 0.20.2) +最后更新:2026-06-22(前端修复:定时弹窗 z-index 遮挡 + 登录 focus 引用错 id + bump 0.20.3) --- @@ -21,6 +21,12 @@ ## 已完成关键能力 +### 2026-06-22 / 前端两处 bug 修复(bump 0.20.3) + +- 定时弹窗"被遮挡":`#crons-modal` 漏了 z-index,退回基础 `.modal`(无 z-index)被 z-index:5 的侧栏/面板盖住;补 `z-index: 112` 与兄弟只读 modal(`#skills-modal`/`#memory-modal`)对齐。排查用 node 加 DOM mock 跑通整条前端模块图,确认 `hd-crons` 绑定确实执行(排除了"按钮没绑事件"),定位到纯 CSS 层叠问题。 +- 登录页 focus 引用错 id:`web/static/js/main.js:106` `$("li-token").focus()` 中 `li-token` 不存在(登录输入框实际是 `li-email`),未登录 boot 末尾会抛 TypeError;改为 `li-email`。 +- 文件:`web/static/dev.html`、`web/static/js/main.js`;`core/__init__.py` 0.20.2→0.20.3。 + ### 2026-06-21 / 发送期修复悬空 tool_calls(bump 0.20.2) - 根因(监控页 error 任务排查,task 5c5d6d25 DB 实测):run 在写入 `assistant.tool_calls` 之后、tool 结果写库之前被中断(上游流式断连 / 用户取消 / 崩溃),历史里留下一条 `assistant.tool_calls` 后面**没有对应 tool 结果**的消息;用户随后继续发言,下一轮把历史原样发给 DeepSeek/OpenAI 即被拒 `An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'` → 任务进 `run_status=error` 卡死。区别于 06-06/06-12 的 arguments 损坏/投毒修复(那治"参数被压成 marker"),这是**结构性悬空**,旧修复不覆盖。 diff --git a/core/__init__.py b/core/__init__.py index c796916..df4fa85 100644 --- a/core/__init__.py +++ b/core/__init__.py @@ -1,3 +1,3 @@ # zcbot 版本号单一事实源:web/app.py 的 FastAPI version、/healthz 返回、前端展示都引这里。 # 改版本只动这一行。 -__version__ = "0.20.2" +__version__ = "0.20.3" diff --git a/web/static/dev.html b/web/static/dev.html index 0ed293c..41eb4b2 100644 --- a/web/static/dev.html +++ b/web/static/dev.html @@ -293,6 +293,7 @@ } /* 定时任务 modal(只读 + 停用/删除,DESIGN §8.5)— 复用 .sk-item/.sk-badge/.sk-empty */ + #crons-modal { z-index: 112; } #crons-modal .card { width: 880px; max-width: 94vw; height: 78vh; max-height: 78vh; display: flex; flex-direction: column; diff --git a/web/static/js/main.js b/web/static/js/main.js index 7f7d35d..7ad588c 100644 --- a/web/static/js/main.js +++ b/web/static/js/main.js @@ -103,5 +103,5 @@ if (EMBED) { // 已有 token:试探一下,失败回登录页 enterApp(); } else { - $("li-token").focus(); + $("li-email").focus(); }