Files
cc-web/.planning/full-outline-history/findings.md
2026-09-13 23:59:27 +08:00

11 lines
1.3 KiB
Markdown
Raw 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.

# 发现记录
## 2026-09-13
- “定位”按钮对应 `user-outline-panel`;`buildUserOutlineItems()` 当前只扫描 `messagesDiv.querySelectorAll('.msg.user[data-message-id]')`,因此只包含已渲染的最近消息。
- `session_info` 已携带 `historyCursor` / `historyTotal`,服务端 `load_history_page` 可按 `before` 返回旧消息页;现有前端收到该响应后会无条件 `prependHistoryMessages()`,所以不能直接用现有手动分页状态填充定位列表。
- 旧消息点击定位需要同时处理两类目标:已渲染消息直接滚动;未渲染消息先通过消息索引加载对应页,再将聊天区滚动到目标。完整索引缓存不能依赖 DOM 元素 ID。
- 定位面板本身已有独立 `max-height` 和 `overflow-y: auto`,不会因为完整索引而扩大聊天区;需要保留该隔离边界。
- 旧消息点击定位使用独立的 `load_history_page` 目标页请求:按消息索引只取包含目标的一页,进入聊天区后再滚动到目标;完整定位索引请求只保存用户消息摘要,不渲染旧消息。
- `session_history_chunk` 当前按 `activeHistoryPageRequest` 分支后统一调用 `prependHistoryMessages()`;独立定位请求必须用独立 request 状态在该分支前截获,否则会破坏“隐藏历史不占聊天空间”的要求。