docs: audit reports + feature docs + skills + admin-v2 + config sync
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Update audit tracker, roadmap, architecture docs, add admin-v2 Roles page + Billing tests, sync CLAUDE.md, Cargo.toml, docker-compose.yml, add deep-research / frontend-design / chart-visualization skills Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -652,6 +652,59 @@ return (
|
||||
└─────────────────────────────────────┘
|
||||
```
|
||||
|
||||
### 3.6 Agent 对话窗口无法滚动 — Flexbox 高度链断裂
|
||||
|
||||
**症状**: 对话消息较多时,消息区域无法滚动,输入框被推到视口外不可见。
|
||||
|
||||
**根本原因**: CSS flexbox 高度传递链中两层断裂,导致 `overflow-y-auto` 从未生效:
|
||||
|
||||
1. **`ResizableChatLayout` 使用 `flex-1` 但父级不是 flex 容器** — ChatArea 外层是 `<div className="relative h-full">`(非 flex),`flex-1` 无效,容器高度塌缩为内容高度。
|
||||
|
||||
2. **`Conversation` 组件缺少 `min-h-0`** — flex 子元素默认 `min-height: auto`(等于内容高度),阻止容器收缩,内容撑开后 `overflow-y-auto` 无效。
|
||||
|
||||
**高度传递链(修复前)**:
|
||||
|
||||
```
|
||||
ChatArea: relative h-full ← 继承父级 ✓
|
||||
└─ ResizableChatLayout: flex-1 ← 父级非 flex,flex-1 无效 ✗
|
||||
└─ chatPanel: h-full ← 继承塌缩高度 ✗
|
||||
└─ Conversation: flex-1 ← min-height:auto 阻止收缩 ✗
|
||||
└─ overflow-y-auto ← 永远不触发滚动 ✗
|
||||
```
|
||||
|
||||
**修复**:
|
||||
|
||||
| 文件 | 修改 | 原因 |
|
||||
|------|------|------|
|
||||
| `desktop/src/components/ai/ResizableChatLayout.tsx` | `flex-1` → `h-full`(两处) | 父级非 flex 容器,`flex-1` 无效 |
|
||||
| `desktop/src/components/ai/Conversation.tsx` | 添加 `min-h-0` | flex 子元素需要 `min-h-0` 才能收缩 |
|
||||
|
||||
**高度传递链(修复后)**:
|
||||
|
||||
```
|
||||
ChatArea: relative h-full ← 继承父级 ✓
|
||||
└─ ResizableChatLayout: h-full ← 直接继承高度 ✓
|
||||
└─ chatPanel: h-full ← 继承正确高度 ✓
|
||||
├─ Header: h-14 shrink-0 ← 固定高度 ✓
|
||||
├─ Conversation: flex-1 min-h-0 overflow-y-auto ← 占剩余空间,可收缩 ✓
|
||||
└─ Input: shrink-0 ← 固定底部 ✓
|
||||
```
|
||||
|
||||
**CSS 原理**:
|
||||
|
||||
- `flex-1` = `flex: 1 1 0%`,仅在父级是 flex 容器时生效。非 flex 父级中等于未设置。
|
||||
- `min-height: auto`(默认值)= 内容最小高度,阻止 flex 子元素收缩到比内容更小。
|
||||
- `min-h-0`(`min-height: 0`)允许 flex 子元素收缩,`overflow` 才能生效。
|
||||
|
||||
**验证修复**:
|
||||
1. 进行多轮对话使消息超出视口高度
|
||||
2. 消息区域应出现滚动条,输入框始终固定在底部可见
|
||||
|
||||
**相关文件**:
|
||||
- `desktop/src/components/ChatArea.tsx` — 布局结构
|
||||
- `desktop/src/components/ai/ResizableChatLayout.tsx` — 双面板布局
|
||||
- `desktop/src/components/ai/Conversation.tsx` — 消息滚动容器
|
||||
|
||||
---
|
||||
|
||||
## 7. 记忆系统问题
|
||||
@@ -2147,6 +2200,7 @@ Turn 2: 前端 "abc-123" → DB 查不到 → 创建 "def-456" → 消息存到
|
||||
|
||||
| 日期 | 变更 |
|
||||
|------|------|
|
||||
| 2026-04-02 | 添加 3.6 节:Agent 对话窗口无法滚动 — Flexbox 高度链断裂(ResizableChatLayout flex-1 在非 flex 父级无效 + Conversation 缺少 min-h-0) |
|
||||
| 2026-04-01 | 添加第 16 节:桌面端会话持久化四连 Bug — 页面刷新跳登录 + 空白对话页 + Agent 无记忆(session ID 映射断裂) + assistant 空 content 400 |
|
||||
| 2026-03-31 | 添加第 14/15 节:llm_routing 读取路径 Bug + SaaS Relay 403 User-Agent 缺失 — relay 模式从未生效的根因分析 |
|
||||
| 2026-03-30 | 添加第 13 节:Admin 前端 ERR_ABORTED / 后端卡死 — Next.js SSR/hydration + SWR 根本冲突导致连接池耗尽,admin-v2 (Ant Design Pro 纯 SPA) 替代方案 |
|
||||
|
||||
Reference in New Issue
Block a user