style(agents): 智能体页间距与对齐优化(版本 2.5.1 → 2.5.2)

老板反馈「智能体的界面不是很美观,优化下,特别是间距和对齐地方」。

先量后改 —— 用 Playwright 读实际布局矩形定位,修完再量验收。

修复前实测到的 6 个问题:
1. 左右两栏底部差一截(左卡 h=149 vs 右卡 h=492)
2. 卡片套卡片(详情区外层是 .card,内部对话区又各有 .card)
3. KPI 注脚基线不齐(第1张两行、其余一行)
4. 对话区左栏独立色块错位(自带底色+圆角,与主区对不上)
5. 左栏卡标题被挤成两行(「智能 体」)
6. 页面底部大空白(内容未撑满视口)

改法:
- 左卡 align-self:stretch + 内部列表 flex:1 滚动 → 两卡 y=219/bottom=952 齐平
- 详情区去掉外层 .card,身份条+Tab 合成「头部卡」;对话区整体一张卡,
  左栏改 border-right 分隔线
- KPI 注脚 margin-top:auto + nowrap + 省略号 → 四张注脚 y 全为 182
- 列表卡标题独占一行;底部加共用引擎的说明引导
- .ag-layout 加 min-height: calc(100vh - 300px) 撑满视口

验收:listCard.bottom == chat.bottom == 952;四张 KPI 注脚 y 一致;无 JS 错误。
测试 219 全过;ci_check 全绿。
This commit is contained in:
api-gateway committed 2026-09-29 14:28:37 +08:00
1 parent 18ba405b64
commit 5a9cb2bdff
5 files changed
+72 -13

No files matched your search

+1
View File
@@ -473,6 +473,7 @@ export default {
imgMax: 'Up to {n} images',
imgErr: 'Failed to pick image: {msg}',
imgCount: '{n}/{max}',
listFootHint: 'All agents share one engine — new ones share model and memory; only params and sessions differ.',
runDefaultTitle: 'Chat',
cacheHit: 'cache {n}',
meLabel: 'Me',
+1
View File
@@ -477,6 +477,7 @@ export default {
imgMax: '最多 {n} 张',
imgErr: '选图失败:{msg}',
imgCount: '{n}/{max} 张',
listFootHint: '所有智能体共用同一个引擎 —— 新建时它们会共用模型与记忆,只有参数和会话各自独立。',
runDefaultTitle: '对话',
cacheHit: '缓存 {n}',
meLabel: '我',