fix(external-systems): 修复配置弹框动态字段与滚动

This commit is contained in:
caoqianming 2026-08-11 09:44:02 +08:00
parent 8bda11f683
commit ca4998265e
5 changed files with 16 additions and 3 deletions

View File

@ -5,6 +5,10 @@
> 所以不是每个版本号都有条目。条目格式 `## <版本> — <日期>`,新条目加在最上面。
> 工程口径的完整记录见 `PROGRESS.md` / git log。
## 0.63.6 — 2026-08-11
- 修复外部系统配置弹框未按 OpenAPI、MCP 和认证方式切换配置项的问题;弹框滚动时不再带动后台页面。
## 0.63.5 — 2026-08-11
- 管理员配置外部系统时改用独立弹框,并会根据 OpenAPI、MCP 和认证方式只展示对应配置项;外部系统列表同步显示各连接类型真实的能力模式。

View File

@ -2,7 +2,7 @@
> 配合 `DESIGN.md`。本文件只记 phase 状态、决策偏差、文件量、下一步。每条 1-2 句:做了啥 + 关键判断;细节查 `git log` / `git diff` / `DESIGN §7.9`
最后更新:2026-08-11(外部系统配置弹框与动态字段,bump 0.63.5)
最后更新:2026-08-11(外部系统弹框动态字段与滚动隔离修复,bump 0.63.6)
---
@ -23,6 +23,8 @@
### 2026-08-11
- **08-11 / 0.63.6 / 外部系统弹框动态字段 + 滚动隔离修复**:修复表单 label 样式覆盖 HTML `hidden` 语义OpenAPI/MCP connector、认证方式和接口执行模式切换后只显示适用配置项弹框改为独立可收缩滚动区并在打开期间锁定根页面滚动滚动到边界不再带动后台页面。Node 前端 19 项、Web 公共逻辑 unittest 3 项、JavaScript 语法及 diff 检查通过;无 schema、migration、HTTP API、依赖或运行方式变化未连接生产 DB。
- **08-11 / 0.63.5 / 外部系统配置弹框 + 动态字段**:管理后台外部系统定义由页面平铺表单改为新增/编辑弹框,按 OpenAPI/MCP connector 和认证方式只展示、提交当前适用字段MCP URL 自动提供认证同源基址,新建时不再重复要求 Base URL编辑存量定义继续保留既有基址列表能力模式对 MCP 改为动态 `tools/list`。Web 无 DB 路由 23 项、JavaScript 语法、动态 DOM 引用及 diff 检查通过;当前运行时未发现可连接浏览器,真实点击冒烟待浏览器配置恢复后补验。无 schema、migration、HTTP API、依赖或运行方式变化未连接生产 DB。
### 2026-08-10

View File

@ -1,3 +1,3 @@
# zcbot 版本号单一事实源:web/app.py 的 FastAPI version、/healthz 返回、前端展示都引这里。
# 改版本只动这一行。
__version__ = "0.63.5"
__version__ = "0.63.6"

View File

@ -105,6 +105,7 @@
.scroll-x { overflow-x: auto; }
.empty { color: var(--muted); padding: 8px; text-align: center; }
#ext-admin-form label { display: grid; gap: 3px; color: var(--muted); font-size: 12px; }
#ext-admin-form [hidden] { display: none; }
#ext-admin-form input:not([type="checkbox"]), #ext-admin-form select {
width: 100%; padding: 6px 8px; border: 1px solid var(--border);
border-radius: var(--r-md); color: var(--text); background: #fff;
@ -120,13 +121,14 @@
width: min(820px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
margin: 0; padding: 0; display: flex; flex-direction: column;
}
#ext-admin-form { display: flex; flex: 1; min-height: 0; flex-direction: column; }
.ext-modal-head {
display: flex; align-items: center; gap: 12px; padding: 12px 16px;
border-bottom: 1px solid var(--border);
}
.ext-modal-head h3 { flex: 1; margin: 0; font-size: 14px; }
.ext-modal-head button { font-size: 18px !important; line-height: 1; border: 0 !important; }
.ext-form-body { padding: 16px; overflow-y: auto; }
.ext-form-body { min-height: 0; padding: 16px; overflow-y: auto; overscroll-behavior: contain; }
.ext-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.ext-form-section {
grid-column: 1 / -1; margin: 4px 0 0; padding-top: 10px;
@ -144,6 +146,7 @@
background: rgba(0,0,0,.32);
}
.modal.show { display: flex; }
html.modal-open, body.modal-open { overflow: hidden; }
#app-dialog .card { width: min(560px, calc(100vw - 32px)); margin: 0; padding: 0; }
#app-dialog h3 { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
#app-dialog .body { padding: 16px; }

View File

@ -336,12 +336,16 @@ function openExternalDefinitionModal(row = null) {
applyExternalProviderDefaults();
}
$("external-definition-modal").classList.add("show");
document.documentElement.classList.add("modal-open");
document.body.classList.add("modal-open");
$("exa-name").focus();
}
function closeExternalDefinitionModal() {
externalEditingId = "";
$("external-definition-modal").classList.remove("show");
document.documentElement.classList.remove("modal-open");
document.body.classList.remove("modal-open");
}
function fillExternalDefinition(row) {