style(agents): 修 KPI 与下方块 0 间距 + 左右两栏恢复等高(版本 2.5.2 → 2.5.3)

老板圈红框指出 KPI 卡与下面内容之间空得太明显。先量后改,定位到两个叠加根因:

1. KPI 与下方块间距 = 0(kpis.bottom=219 == ag-layout.y=219,两排卡紧贴)
2. .ag-layout 被 min-height: calc(100vh - 300px) 撑到 733px,而左列表卡内容
   只有 ~150px → 卡下方 580px 空白

改法:
- .ag-kpis 加 margin-bottom: var(--gap-lg) → KPI 与下方 14px
- 去掉 .ag-layout 的 min-height 撑高;左卡改 align-self:stretch + 内部列表
  flex:1 滚动,不再单独设高度上限

验收实测:row-h 78→102 / 14px / kpis 116→219 / 14px / ag-layout 233→966,
左列表卡与右详情均 233→966 (h=733) 完全齐平。

测试 219 全过;ci_check 全绿。
This commit is contained in:
api-gateway committed 2026-09-30 11:31:58 +08:00
1 parent 5a9cb2bdff
commit a142a7bf35
4 files changed
+42 -13

No files matched your search

+30
View File
@@ -1,5 +1,35 @@
# CHANGELOG
## 2026-09-29 · 修智能体页「KPI 与下方块 0 间距」+ 左右两栏恢复等高(版本 2.5.2 → 2.5.3)
老板圈出红框指出:**KPI 卡与下面内容之间空得太明显**。
**先量后改**(Playwright 读纵向矩形)—— 定位到**两个叠加的根因**:
| # | 根因 | 证据 |
|---|---|---|
| 1 | **KPI 与下方块间距 = 0**(两排卡片紧贴) | `kpis.bottom = 219` == `ag-layout.y = 219` |
| 2 | `.ag-layout` 被 `min-height: calc(100vh - 300px)` 撑到 733px,而左列表卡内容只有 ~150px → **卡下方 580px 空白** | `ag-layout.h = 733` vs 左卡 `h ≈ 150` |
**改法**:
- `.ag-kpis` 加 `margin-bottom: var(--gap-lg)` → **KPI 与下方 14px**(与页面其它块间距一致)
- 去掉 `.ag-layout` 的 `min-height` 撑高写法;左卡改 `align-self: stretch` +
内部列表 `flex:1` 滚动,不再单独设高度上限
**验收实测(三块纵向坐标)**:
```
row-h 78 → 102
↓ 14px
kpis 116 → 219
↓ 14px ← 红框那处已修
ag-layout 233 → 966
├ 左列表卡 233 → 966 (h=733)
└ 右详情 233 → 966 (h=733) ✓ 两栏完全齐平、底部一致
```
**测试**:219 全过;`ci_check.sh` 全绿。
## 2026-09-29 · 智能体页间距与对齐优化(版本 2.5.1 → 2.5.2)
老板反馈:「智能体的界面不是很美观,优化下,特别是间距和对齐地方」。
+2 -2
View File
@@ -336,9 +336,9 @@ _docs_on = config.server.docs_enabled # 安全默认关(report: /docs、/ope
# 本轮修复: 版本号收敛到单一常量。此前 "2.4.0" 硬编码在 FastAPI / / 导航 / /auth/login
# 三处,/health 干脆没返回版本 —— 前端「网关版本」一直显示 v-。
# 2026-09-29: 2.4.0 → 2.4.1(前端间距规范统一);2.4.1 → 2.5.0(新增「智能体」功能模块);2.5.0 → 2.5.1(智能体支持图片附件);2.5.1 → 2.5.2(智能体页间距与对齐优化)。
# 2026-09-29: 2.4.0 → 2.4.1(前端间距规范统一);2.4.1 → 2.5.0(新增「智能体」功能模块);2.5.0 → 2.5.1(智能体支持图片附件);2.5.1 → 2.5.2(智能体页间距与对齐优化);2.5.2 → 2.5.3(修 KPI 与下方块之间 0 间距)。
# ★ 版本号纪律:每次改动都要往上加,小改动加小版本号、大改动加大版本号(README 有专章)。
VERSION = "2.5.2"
VERSION = "2.5.3"
app = FastAPI(
title="API Gateway",
-7
View File
@@ -59,12 +59,6 @@ providers:
max_output_tokens: 65536 # 最大输出(token)
# 文档现价 ¥3/M 输入、¥6/M 输出
# 2026-09-24 自动同步:官方文档新增(scripts/sync_models.py)
- id: "agnes-2.5-pro-beta"
display_name: "Agnes 2.5 Pro Beta"
type: "text"
context_window: 1000000 # 第三十三轮(2026-09-24):上下文窗口(token),每日同步维护
max_output_tokens: 65536 # 最大输出(token)
# 文档现价 ¥0.7/M 输入、¥2.1/M 输出
# 2026-09-24 自动同步:官方文档新增(scripts/sync_models.py)
- id: "agnes-image-2.0-flash"
display_name: "Agnes Image 2.0 Flash"
@@ -460,7 +454,6 @@ pricing:
agnes-2.5-flash: { input: 0, output: 0 } # 文档现价暂免(输入/输出/缓存命中均 ¥0/百万)
ark-code-latest: { input: 0.50, output: 2.00 }
agnes-2.5-pro: { input: 3, output: 6 } # 2026-09-24 自动同步(文档现价)
agnes-2.5-pro-beta: { input: 0.7, output: 2.1 } # 2026-09-24 自动同步(文档现价)
# ── 媒体下载代理白名单(第十七轮)────────────────────────
# 生成的图片/视频挂在第三方 CDN 上且不带 CORS 头,浏览器里既 fetch 不到 blob、
+10 -4
View File
@@ -689,12 +689,18 @@ onMounted(load)
<style scoped>
.sub-hint { margin-left: 8px; color: var(--muted); font-size: 12.5px; }
.row-h { display: flex; align-items: center; gap: var(--gap-sm); margin-bottom: var(--gap-lg); }
.ag-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: var(--gap-lg); align-items: start; min-height: calc(100vh - 300px); }
/* 左列表卡:撑到与右侧详情同高(原来只有内容高度 → 底部空一截) */
.ag-layout > .card:first-child { align-self: stretch; display: flex; flex-direction: column; }
.ag-layout {
display: grid; grid-template-columns: 320px minmax(0, 1fr);
gap: var(--gap-lg); align-items: start;
}
/* 左列表卡:与右侧详情同高(同排对齐),内部列表区滚动 */
.ag-layout > .card:first-child {
align-self: stretch; display: flex; flex-direction: column;
min-height: 320px;
}
.ag-layout > .card:first-child .ag-list { flex: 1; min-height: 0; overflow: auto; }
/* KPI 卡等高(第三十八轮:之前几张高度不一,因为内容行数不同) */
.ag-kpis { align-items: stretch; }
.ag-kpis { align-items: stretch; margin-bottom: var(--gap-lg); }
.ag-kpis .kpi .v { line-height: 1.15; }
/* 注脚统一贴底、单行省略 —— 否则第一张卡注脚两行会把四张卡的文字基线拉歪 */
.ag-kpis .kpi .f {