Files
iven 2c8ab47e5c
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
fix: BUG-012/013/007 — panel overlap, Markdown rendering, authStore tests
BUG-012: Reposition side panel toggle button (top-[52px]→top-20) to
avoid overlap with header buttons in ResizableChatLayout.

BUG-013: Install @tailwindcss/typography plugin and import in index.css
to enable prose-* Markdown rendering classes in StreamingText.

BUG-007: Rewrite authStore tests to match HttpOnly cookie auth model
(login takes 1 arg, no token/refreshToken in state). Rewrite request
interceptor tests for cookie-based auth. Update bug-tracker status.
2026-04-10 07:44:34 +08:00

116 lines
6.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Bug 跟踪汇总
> 日期: 2026-04-09
> 来源: 预发布探索性测试 (4条故事线 + 模块矩阵)
| Bug ID | 场景 | 严重度 | 标题 | 状态 | 修复提交 |
|--------|------|--------|------|------|----------|
| BUG-001 | Relay 全场景 | P0 | SaaS Relay DATABASE_ERROR: SUM(token_count) 返回 NUMERIC 而非 bigint | FIXED | bd6cf8e |
| BUG-002 | 场景1.2 | P2 | 旧对话错误消息缓存: 修复后刷新页面旧错误仍显示,需点"重试"或新建对话 | WONTFIX | — |
| BUG-003 | 启动 | P1 | saasStore.ts fetchAvailableModels 使用 require() 导致模型同步失败 | FIXED | require → await import |
| BUG-004 | Health | P1 | Health check 连接池使用率公式错误 (max-idle 而非 size-idle) | FIXED | pool.size() 替代 max_connections |
| BUG-005 | 启动 | P2 | OfflineStore 无模型配置时重连循环过于频繁 | KNOWN | 首次启动预期行为 |
| BUG-006 | 启动 | P2 | WebMCP 注册失败 TypeError: Required member is undefined | KNOWN | 需 Chrome 146+ flag |
| BUG-007 | Admin | P2 | Admin V2 authStore 测试 19 个失败 (113 passed) | FIXED | 测试代码同步 HttpOnly cookie 认证 |
| BUG-008 | 场景1.6 | P1 | SaaS Relay 模式只发送当前消息,不发送对话历史 (无上下文记忆) | FIXED | 9442471 |
| BUG-009 | 场景3.6 | P1 | SaaS Relay 模式绕过全部14层中间件链 (DataMasking/ButlerRouter等) | FIXED | ba586e5 | 前端DataMasking |
| BUG-010 | 场景3.4 | P3 | 流式响应无明确取消按钮 (用户无法中止长响应) | FIXED | ba586e5 | 发送→停止按钮 |
| BUG-011 | Admin仪表盘 | P2 | Admin V2 仪表盘SQL类型错误: text >= timestamptz 操作符不存在 | FIXED | ba586e5 | ::timestamptz转换 |
| BUG-012 | 全局UI | P2 | 右上角"打开侧面板"按钮与"详情"按钮重叠 | FIXED | 浮动按钮位置调整 top-[52px]→top-20 |
| BUG-013 | 聊天UI | P2 | AI 回复内容缺少排版样式Markdown 未正确渲染(表格/列表/代码块) | FIXED | 安装 @tailwindcss/typography 插件 |
## BUG-001 详细
**根因**: PostgreSQL `SUM(bigint)` 返回 `NUMERIC` 类型,但 sqlx Rust 绑定期望 `i64` (INT8)。`key_pool.rs``select_best_key()` 查询中 `COALESCE(SUM(uw.token_count), 0)` 缺少 `::bigint` 转换。
**影响**: 所有 SaaS Relay 聊天请求 100% 失败,返回 `500 DATABASE_ERROR`
**修复**: 4 处 SUM() 添加 `::bigint` 转换:
- `relay/key_pool.rs` — 根因
- `relay/service.rs` — sort_candidates_by_quota
- `account/handlers.rs` — dashboard stats
- `workers/aggregate_usage.rs` — usage aggregation
## BUG-002 详细
**现象**: 修复 BUG-001 后刷新页面,旧对话仍显示 "Relay error: 500 DATABASE_ERROR"。需手动点"重试"或新建对话才能恢复正常。
**原因**: 前端 IndexedDB 缓存了历史错误消息,刷新不会自动清除。
**决定**: WONTFIX — 这是预期行为(保留历史消息真实性),用户可通过"重试"恢复。
## BUG-009 详细
**现象**: SaaS Relay 模式下,用户消息直接 HTTP POST → SaaS → LLM不经过本地 14 层中间件链。
**验证方法**: 发送含 PHI 的消息"患者张三身份证号110101199001011234"AI 回复中引用了完整身份证号SaaS 日志无 DataMasking 记录。
**影响**:
- DataMasking(优先级90) 不生效 — PHI 数据原样发送给 LLM
- ButlerRouter 不生效 — 无关键词分类、无 system prompt 增强
- TrajectoryRecorder(优先级650) 不生效 — 轨迹不记录到 SQLite
- 所有 Hand 触发不可用 — Quiz/Slideshow/Speech/Browser 等
**根因**: SaaS Relay 客户端 (`saas-relay-client.ts`) 走 HTTP SSE 路径,完全绕过 Tauri kernel 的中间件链。
## BUG-012 详细
**现象**: 右上角"打开侧面板"按钮与"详情"按钮位置重叠,无法正确点击。
**发现时间**: 探索性测试结束后用户审查时发现。
**修复**: 将 ResizableChatLayout 浮动按钮从 `absolute top-[52px] right-3` 调整为 `absolute top-20 right-4`,避免与 header 区域按钮重叠。
## BUG-013 详细
**现象**: AI 回复内容中的 Markdown表格、列表、代码块、标题等未正确渲染纯文本显示导致排版混乱。
**对比**: Trae Solo 等同类产品的消息渲染有完整的 Markdown 样式支持。
**修复**: 安装 `@tailwindcss/typography` v0.5.19 并在 `index.css` 中添加 `@import "@tailwindcss/typography"`,使 `prose-*` 样式类生效。
## 测试通过场景
| 场景 | 结果 | 备注 |
|------|------|------|
| 1.2 首次对话 (医务科) | PASS | Relay 完整链路: Desktop→SaaS→Key Pool→kimi-for-coding |
| 离线队列恢复 | PASS | "已恢复连接, 发送中 4 条" 自动重发 |
## 无法测试的场景 (需人工或不同环境)
以下场景在本次 SaaS Relay 模式测试中无法执行,需要特定条件:
### 需要 Tauri 本地 Kernel 模式
| 场景 | 原因 | 测试方法 |
|------|------|----------|
| 3.1 多模型自定义配置 | SaaS Relay 模式不支持自定义 API Key/BaseUrl | 切换到 Tauri 本地模式Settings → 模型与 API |
| 3.3 Pipeline 编辑与执行 | Pipeline 引擎在 Tauri kernel 本地运行 | 切换本地模式WorkflowEditor → 加载 YAML |
| 3.5 Browser Hand 触发 | Hand 执行需要 Tauri kernel 本地能力 | 发送"帮我打开百度搜索XXX" |
| 3.7 记忆管道深度测试 | FTS5/TF-IDF/embedding 依赖本地 SQLite | 5轮深度对话 → 等30s → 搜索验证 |
| 3.8 多 Agent 身份切换 | 当前仅一个默认 Agent | 创建3个不同角色 Agent 并快速切换 |
| 1.7 NL Schedule Parser | NlScheduleParser 在 Tauri kernel 中运行 | 切换本地模式后测试"帮我提醒明天下午3点" |
### 需要物理环境操作
| 场景 | 原因 | 测试方法 |
|------|------|----------|
| 1.1 / 4.3 冷启动体验 | 应用已有历史数据,非首次安装 | 清除 localStorage + IndexedDB 后重启 |
| 1.8 离线韧性 | JS 模拟 navigator.onLine 不够SaaS health-check 通过 HTTP 检测 | 物理断网(禁用网卡)→ 发5+消息 → 重连 |
| 4.2 语音输入 | 需要浏览器麦克风权限 + Web Speech API | 有麦克风环境下测试 |
| 3.4 流式取消 | 需要长响应期间点击取消按钮 | 发送复杂问题 → 等待流式开始 → 点击取消 |
### 需要 Admin 后台验证
| 场景 | 原因 | 测试方法 |
|------|------|----------|
| BUG-011 Admin仪表盘 | SQL 类型错误导致仪表盘数据异常 | 打开 Admin V2 → 仪表盘页面 |
| BUG-007 authStore 测试 | 19个测试失败114/132 passed | `cd admin-v2 && pnpm vitest run` |
### 建议
1. **优先级最高**: 修复 BUG-009 后切换 Tauri 本地模式重测场景 3.6
2. **高优先**: 冷启动体验(清除数据重测 1.1/4.3
3. **中优先**: 离线韧性、Pipeline、多 Agent 切换
4. **低优先**: 语音输入、Browser Hand、记忆管道深度