fix: retain historical events in the story spiral

Render every selected review event, including events without current story membership, and label current grouping without inventing historical assignments. Keep history selection inside the central canvas heading, use shared camera controls, and fit the default scene within the viewport.

Validation: 46 focused tests, synthetic and read-only portable-data Electron checks, Node/Agent/Web typechecks, targeted ESLint, and diff checks passed. All 21 reported events remain represented at wide and narrow widths; no live data writes or model calls.

Release note: Historical story spirals now retain unassigned events. Review history sits inside the canvas column, and camera controls have consistent spacing and framing.
This commit is contained in:
mesalogo
2026-10-04 21:09:32 +08:00
parent 49fd0d3054
commit b9186a616c
15 changed files with 262 additions and 44 deletions
@@ -4,6 +4,16 @@
当前记录以已验证生产行为为准。监督者尚未覆盖全部 user stories。
## 2026-10-04 历史螺旋缺失事件与工具栏
读取仓库便携版 `data/assistant.sqlite`,用只读连接及 SQLite online backup 保存到系统临时 `opencode` 目录,后续查询只读备份。报告对应结果 `b1ec5e99-5a72-444b-8c2b-1c4eb4c50960`:本地时间 9 月 28 日 09:48:58 生成,区间 9 月 21 日 09:43:13 至 9 月 28 日 09:43:13,21 个事件、16 个实体。21 个事件均未被 supersede;36 条来源都有 source key、revision 和项目 locator。按同 source key、revision 及片段范围相交检查,没有其他当前事件替代这批来源,排除本例的 ID 过期猜测。
备份时已有 3 个功能故事,均于 10 月 4 日 20:46:32 创建,其中包含该结果的 17 个事件,另 4 个没有故事成员。结果早于故事生成;数据库未保存截图时刻的成员快照,不能声称重现了截图当时的空成员响应。代码中的缺失原因可确定:3D 仅接收当前故事成员,没有所选结果的完整事件输入;无成员时过滤后只剩灰色螺旋,部分有成员时其余事件仍丢失。现在完整事件输入独立于故事成员,显示规则见[故事线模型](./storyline-model-design.md#5-展示与使用)。历史选择移入中间画布标题区,视角改用共享分段控件,并修正默认相机底部裁切。
真实数据验证使用生产 `listSupervisionResults`、`getSupervisionGraph`、故事/经验 Store 查询备份,经本地测试 API 渲染生产 HeartbeatCenter、SupervisorWorkspace 和 StoryGraph3D;没有启动便携版后台服务。`GOODBUDDY_SUPERVISOR_BACKUP` 指定备份路径,`GOODBUDDY_SUPERVISOR_RESULT` 指定结果 ID,运行 `tests/supervisor-layout.electron.test.ts`。1440×1000 浅色和 390×1000 深色均保留 21 个真实事件 ID;根场景分别为 6 个、4 个事件簇,全部几何顶点位于视口内。画布分别为 844×524、309×320,半径 78~152,连续螺旋仍有 1,401 个采样点。历史选择位于中列标题内,工具栏顶部间隔 16px,视角按钮间隔 2px、分段控件内边距 3px、图例间隔 8px,无横向页面溢出、Renderer 错误。事件菜单能逐条定位;额外将测试 API 成员响应置空后,同一批 21 个真实事件仍可在未归属分组查看,数据库未变。
模型与工作区定向回归 46 项、模拟数据螺旋 Electron 回归、上述真实数据 Electron 检查通过;Node/Agent/Web 类型检查、定向 ESLint、diff 检查通过。只截取并读取 1 张初测截图;最终相机修正通过逐顶点投影数值复验,测量保存在临时 `opencode/portable-measurements.json`。未打包替换便携版,未运行全量测试,真实回顾/模型调用为 0,未提交或推送。变更只涉及桌面展示与测试,Agent 和远程 Runtime 路径不受影响。
## 2026-10-04 图谱历史选择与螺旋密度
图谱左上角增加与工作回顾共用的历史选择,默认最新结果,保留显式结果、故事、经验导航及请求代际检查。空图谱与失败状态也保留选择入口。交互规则见 [UI 设计](./ui-design.md#故事线图谱)。