docs: record EM full-direction phase 07 handoff
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
# EM 完整方向段可视化修复 - Phase 07 交接
|
||||
|
||||
## 状态
|
||||
完成,2026-08-07。
|
||||
|
||||
## 目标与非目标
|
||||
完成主计划 Task 9、分阶段执行计划 Task 7:每张图独立视域缩放,仅修改浏览器本地视图,不修改规划数据。
|
||||
|
||||
未进入 Task 10+、Native Painter、跨段规划扩展、实车操作或 Phase 06 已批准 Web 渲染修复的回退/重做。MovementTest 保持 `OBSERVE_ONLY`,本阶段未触碰任何底盘、转向、制动、电机或换挡写输出。
|
||||
|
||||
## 启动事实
|
||||
- 分支:`trajplanner`
|
||||
- 入口 HEAD:`b7772370dca119d8ff36ed6a690274e460d489ca`(Phase 06 handoff)
|
||||
- 上一阶段实现提交:`05cfd673f504d5ecee000ab9b85c7346436f2076`
|
||||
- 上一阶段 handoff:`docs/superpowers/handoffs/em-full-direction-visualization/phase-06.md`
|
||||
- 祖先检查:`05cfd67`、`b777237` 均为入口 HEAD 可达祖先
|
||||
|
||||
## 实现提交
|
||||
`8a51629edbe682de8a0fd30a82894e0420ac6c86` - `feat: add observation chart viewport zoom`
|
||||
|
||||
仅提交白名单内实际修改文件:
|
||||
- 修改:`ClumsyPilot/TrajectoryPlanningVisualization/Web/app.css`
|
||||
- 修改:`ClumsyPilot/TrajectoryPlanningVisualization/Web/app.js`
|
||||
- 修改:`ClumsyPilot/tests/TrajectoryPlanningVisualizationWebDom/dashboard.dom.test.mjs`
|
||||
|
||||
`index.html` 在白名单内但未修改,现有 chart host 结构已足够,工具条由 `renderChart` 动态创建。
|
||||
|
||||
## 新增接口与语义
|
||||
- `state.chartViewports[id]` 仅保存当前图表的可见 `x0/x1/y0/y1` 数据域。
|
||||
- 框选放大:`pointerdown` 到 `pointerup` 距离小于 4 CSS 像素时忽略。
|
||||
- 滚轮缩放:以指针在图表数据坐标中的位置为锚点。
|
||||
- 重置:只删除当前图表 `id` 的视域。
|
||||
- 全屏:只请求当前图表 host 的 `requestFullscreen()`,并附加 `is-fullscreen` CSS 回退。
|
||||
- SSE 新周期到达:`receiveFrame` 重绘时继续使用仍有限且有效的 `chartViewports[id]`;不修改快照数组,不发送规划器参数。
|
||||
- 缩放不进行数据重采样、不回写快照、不修改服务端参数。
|
||||
|
||||
## RED 证据
|
||||
先写入冻结输入测试,再执行:
|
||||
```powershell
|
||||
npm install --prefix ClumsyPilot/tests/TrajectoryPlanningVisualizationWebDom
|
||||
npm test --prefix ClumsyPilot/tests/TrajectoryPlanningVisualizationWebDom
|
||||
```
|
||||
|
||||
`npm test` 退出码 1;11 个测试中 8 个通过、3 个失败。
|
||||
首个有效失败为 `wheel and box zoom change ST ticks and path without mutating frozen snapshot`:框选后 ST 轴刻度仍为 `-0.5|0.25|1|1.75|2.5`,路径 `d` 未变化,确认是缩放控件与 `chartViewports` 状态缺失。`reset` 与 `fullscreen` 测试随后因 `button[data-action]` 不存在而失败。
|
||||
|
||||
## GREEN / 回归证据
|
||||
最终代码状态执行:
|
||||
```powershell
|
||||
npm test --prefix ClumsyPilot/tests/TrajectoryPlanningVisualizationWebDom
|
||||
dotnet run --project ClumsyPilot/tests/TrajectoryPlanningVisualizationVerificationHost/TrajectoryPlanningVisualizationVerificationHost.csproj
|
||||
git diff --check
|
||||
```
|
||||
|
||||
- `npm test`:退出码 0,11 个 DOM 测试全部通过,0 失败。
|
||||
- .NET 宿主:退出码 0,输出 `PASS trajectory-planning-visualization`。
|
||||
- `git diff --check`:退出码 0;仅有仓库既有 LF/CRLF 提示,无新空白错误。
|
||||
- `node --check app.js`、`node --check dashboard.dom.test.mjs`:均通过。
|
||||
|
||||
## 执行器审计与清理
|
||||
```powershell
|
||||
rg -n "SendXYThSpeed|SendMotion|DriveStop|PredefinedDriveStop|AccumulateSpeed|SetGear|SetBrake" ClumsyPilot/ParkrobTrajplanner/tarjplanner_movementtest
|
||||
```
|
||||
无匹配,确认未新增 MovementTest 硬件写输出。
|
||||
|
||||
```powershell
|
||||
rg -n "TrajectoryPlanningVisualizationWebDom|jsdom" ClumsyPilot/TrajectoryPlanningVisualization -g "*.csproj" -g "*.cs" -g "*.html" -g "*.css" -g "*.js"
|
||||
```
|
||||
无匹配,npm 测试包不进入生产 Web/插件输出。
|
||||
|
||||
临时 `node_modules` 在测试完成后已安全删除并确认不存在;未提交依赖目录。
|
||||
|
||||
## 工作区保护
|
||||
保留入口时所有既有脏文件、删除和未跟踪内容,未执行 `git reset --hard`、`git checkout --`、`git clean`、`git add .` 或 `git add -A`。实现提交仅显式暂存并提交上述 3 个白名单文件;提交后 `git diff --cached --name-only` 为空。
|
||||
|
||||
## 已知警告与偏差
|
||||
- `git diff --check` 持续输出仓库既有 LF/CRLF 提示,不影响本阶段空白检查结论。
|
||||
- `index.html` 未修改,因此实现提交实际文件数少于阶段白名单可允许数量。
|
||||
- 本阶段未运行浏览器截图或真实设备烟雾;DOM 行为由 jsdom 覆盖。
|
||||
|
||||
## 未运行项
|
||||
- 未进入 Phase 08 Native Painter 修复。
|
||||
- 未进入 Phase 09 文档、全量自动验收或实车验收。
|
||||
- 未执行 `em-core-all`、`--smoke-seconds`、浏览器人工操作或实车操作。
|
||||
|
||||
## Phase 08 事实
|
||||
- 阶段:Phase 08,对应主计划 Task 10、分阶段执行计划 Task 8。
|
||||
- 仓库:`D:\Users\Desktop\项目\prakrobot\ParkingRobot`
|
||||
- 预期分支:`trajplanner`
|
||||
- 本阶段实现提交:`8a51629edbe682de8a0fd30a82894e0420ac6c86`
|
||||
- 本 handoff 真实哈希由 Phase 08 调用方在最终回答中提供。
|
||||
- 允许修改:
|
||||
- `ClumsyPilot/ParkrobTrajplanner/tarjplanner_movementtest/TrajectoryObservationPresentation.cs`
|
||||
- `ClumsyPilot/tests/EMPlannerVerificationHost/TrajectoryObservationChecks.cs`
|
||||
- `ClumsyPilot/tests/EMPlannerVerificationHost/TrajectoryObservationVisualizationChecks.cs`
|
||||
- 交接:`docs/superpowers/handoffs/em-full-direction-visualization/phase-08.md`
|
||||
- 实现提交信息:`fix: correct EM observation painter geometry`
|
||||
- 交接提交信息:`docs: record EM full-direction phase 08 handoff`
|
||||
- 核心接口:世界路径 x/y 等比例、LS 横轴 `ReferenceS (m)`、ST 纵轴真实 `PathS (m)`、小车轮廊与细朝向线、`s_end`/换向/最终目标语义;不使用大黑三角。
|
||||
- RED/GREEN 焦点命令:
|
||||
```powershell
|
||||
dotnet run --project ClumsyPilot/tests/EMPlannerVerificationHost/EMPlannerVerificationHost.csproj -- trajectory-observation
|
||||
```
|
||||
- 回归/审计命令:同一 `trajectory-observation` 宿主、MovementTest 执行器 `rg`、`git diff --check`。
|
||||
- Phase 08 禁止:进入 Task 11、实车操作、跨段规划扩展、重新设计 Web 或 Phase 07 视域缩放。
|
||||
Reference in New Issue
Block a user