feat: complete complex junction transition editing

This commit is contained in:
que01 committed 2026-09-09 16:57:47 +08:00
1 parent 801d8be980
commit 79f83412e6
18 files changed
+400 -59

No files matched your search

+17
View File
@@ -379,3 +379,20 @@ projectJunctionStructure({ model, layers });
projectJunctionStructure({ model, layers, trafficSignals,
junctionRef: { type: 'cluster', id: selectedClusterId } });
```
## Complex carriageway transition length
`cluster-carriageway-transition-length` uses the source-checked
`cluster-carriageway` anchor and `value.transitionLengthMeters`. Replay verifies
source road/node membership before solving. The resolved `clusterTransitions`
map is separate from `clusterCutbacks`: the outer source seam is fixed, and the
inner station is `outerStation - transitionLengthMeters` along the source
polyline. Radial distance differences are not lengths on curved approaches.
The maximum is the available outer station; the minimum is the smaller of the
configured minimum and the existing source-derived transition (short existing
approaches remain representable). Impossible surface geometry still requires
compiler validation. A saved transition is never silently clamped.
Regression evidence: solver rejects out-of-range/source-mismatched values;
API preview measures the requested length and preserves the outer seam;
save/read/replay reproduces preview geometry; browser input sends the new kind.
@@ -318,3 +318,17 @@ Map capability reason codes into user-facing Chinese descriptions.
Required checks: opposite node/cluster scopes with equal raw IDs, unknown scope,
list-to-feature grouping and feature-to-list identity, foreign-cluster exclusion,
raw signal UID selection, map identity preservation, and reload stability.
### Junction workspace save and grouped ranges
Workspace actions must include `EditSession.dirty`, `canUndo`, and `canRedo`;
`JunctionSession.dirty` alone misses settled grouped edits. Reuse the global
commands and expose save status in the junction route, where the main header is
hidden. The edit render revision is not a persisted document version: a save
changes it, so comparing a captured render revision after saving can crash React.
The API owns version conflict checks.
A grouped scalar is available only if the individual ranges intersect. Otherwise
show why a common value is unavailable and expand individual controls; never
render a minimum larger than the maximum. Transition length uses the same input,
preview, history, and persistence path as other geometry parameters.
@@ -25,7 +25,7 @@
- [ ] 支持凹形与已知排除区域,检查环、自交、接缝、必要连接;设计边界可行域并由 solver/manifest 共用。
- [ ] 审计 roadSurface、sidewalkSurface、edgeLines、lane/center markings 的每个裁切入口,确保消费同一计划。
- [ ] 出口 A3:接缝≤1 cm,必要区域连通,无自交与排除区侵占;自动测试验证实际几何,不只是参数回显。
- 已验证:3~6 臂核心环闭合、正面积、无自交、共享内边连续并报告 maxSharedSeamErrorMeters≤1cm;入口 ring 闭合/有限/正面积;短过渡、零长度边、零宽度和排除区相切均有失败回归。
- 已验证:3~6 臂核心环闭合、正面积、无自交、共享内边邻接;当前 maxSharedSeamErrorMeters 仅以邻接成立返回 0、不成立返回 Infinity,不等同于全图层实际接缝测量;入口 ring 闭合/有限/正面积;短过渡、零长度边、零宽度和排除区相切均有失败回归。
- 待完成:凹形/多区域/孔洞、全图层连通性和统一接缝误差测量。
- [ ] 此阶段不通过,不开启新几何控件。
@@ -50,7 +50,7 @@
已完成并验证的通用底座:共享来源拓扑、3~6 臂结构矩阵、重排/平移/旋转稳定性、核心与入口边界不变量、排除区域保护、入口过渡状态诊断、设施来源证据、预览/保存/刷新基础回归及端到端工作台流程。
明确遗留:接入位置/方向/左右边界/过渡长度的完整编辑闭环,凹形与多区域连通性,全图层接缝测量,真实 OSM 视觉验收。导流岛自由编辑和独立右转通道继续留在后续任务。
明确遗留:接入位置/方向/左右边界的完整编辑闭环(过渡长度本次补齐),凹形与多区域连通性,全图层接缝测量,真实 OSM 视觉验收。导流岛自由编辑和独立右转通道继续留在后续任务。
## 5. 通用性验收与发布
@@ -72,3 +72,11 @@
complex-junction.js / native-road.js:构建与全部消费者;direct-edit-solver.js / native-road-edits.js:纯求解与兼容;junction-structure.js / junction-topology.js / junction-projection.js:身份及投影;server.js:预览保存一致性;App.tsx / ParameterPanel.tsx / MapCanvas.tsx / edit/*:输入和状态。
每个阶段独立可回滚。几何更换前保存原始文档和输出比较,禁止先更新 fixture baseline 掩盖差异。任何大幅缩减支持范围或迁移语义变更先更新规划供用户审阅。
## 过渡长度编辑交付记录
已接通过渡长度的文档回放、独立 solver 结果、沿来源折线的内部断面定位、客户端输入映射与手柄。外部接缝保持固定,独立于收口距离。API 验证实际长度、保存再读取重放;浏览器验证参数输入请求被应用。曲线进口有沿线长度回归。此交付不代表接入位置/方向/左右边界、全图层几何及真实数据视觉验收完成。
本次进一步修复路口面板保存按钮漏读 EditSession.dirty、缺少撤销重做入口、保存回调误用渲染计数导致白屏,以及长短进口没有共同范围时仍显示统一输入的问题。浏览器回归覆盖单独过渡长度输入、撤销、重做、保存重编译与刷新;后端覆盖拒绝的收口约束不影响有效过渡范围。保持父任务进行中,不将本次编辑闭环等同于全部几何验收完成。
本轮质量门:npm test 通过;npm run test:client 通过;npm run test:client:unit 15 文件/188 测试通过;npm run test:e2e(包含 production build)11 测试通过,包含保存后重置与放弃恢复;npm run format:check 与 git diff --check 通过。构建仍有既有 bundle 大小提示。遵循用户“整体任务完成再提交”,本轮未提交、未归档父任务。