Files
cc-web/.trellis/tasks/08-03-usage-statistics-dashboard/research/current-findings.md

14 lines
1.2 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.

# 当前调研与实施约束
- 当前工作树已有高级会话检索的大量未提交修改:`public/app.js`、`public/index.html`、`public/style.css`、`scripts/regression.js`、`server.js`。
- 必须保留这些改动,只在稳定锚点附近做小范围追加。
- 134 个会话 JSON,总量约 82 MB;一次全量扫描约 0.93 秒、峰值 RSS 约 116 MB。
- 现有保留数据中可解析 1,678 次 MCP 调用,其中 completed 1,578、failed 100;工具调用本身没有时间戳。
- 显式 Skill mention 当前共 7 次,来源是用户消息的 `composerMentions`。
- 推荐旁路:源会话只读 → 可重建索引 → 独立查询 → 独立看板。
- 用户指定入口在侧栏底部操作区,不在会话列表滚动内容中。
- 主题适配必须使用语义变量和已有主题系统,不复制业务逻辑或第二套看板 DOM。
- 最终实现使用 `lib/usage-statistics.js` 的懒加载派生索引,查询协议为 `usage_stats_query/result/error`,schemaVersion 为 1。
- 真实数据最终性能:83.3 MB 回填 1.15 秒、查询 P95 51.79 ms、峰值 RSS 116.7 MB、索引占比 0.47%。
- Chrome 151 已完成 11 主题 × 5 视口验收,并覆盖 loading、MCP 明细、空态和错误态。