fix: hide handles for unavailable junction structures
This commit is contained in:
1 parent
2b79085042
commit
f40caaa264
4 files changed
+24
-4
No files matched your search
@@ -334,6 +334,10 @@ then `structureFromTopology(topology, shape, center, features)`. Projection is
|
|||||||
object. A selected editable cluster publishes its external carriageway,
|
object. A selected editable cluster publishes its external carriageway,
|
||||||
corner, and stop-line handles. It publishes `cluster-crossing-inset` only for
|
corner, and stop-line handles. It publishes `cluster-crossing-inset` only for
|
||||||
an arm with a matching OSM crossing node.
|
an arm with a matching OSM crossing node.
|
||||||
|
- A selected cluster that cannot project an authoritative `junctionStructure`
|
||||||
|
returns an empty scoped handle list from both edit state and preview. The API
|
||||||
|
must not advertise controls for an object the workbench cannot identify or
|
||||||
|
render as an editable structure.
|
||||||
- A cluster carriageway anchor contains `clusterId`, stable
|
- A cluster carriageway anchor contains `clusterId`, stable
|
||||||
`carriagewayKey`, `sourceNodeIds`, and `sourceRoadIds`. Replay matches all
|
`carriagewayKey`, `sourceNodeIds`, and `sourceRoadIds`. Replay matches all
|
||||||
source identity; a missing or changed source is stale with `anchor-missing`.
|
source identity; a missing or changed source is stale with `anchor-missing`.
|
||||||
|
|||||||
@@ -92,6 +92,8 @@ complex-junction.js / native-road.js:构建与全部消费者;direct-edit-so
|
|||||||
|
|
||||||
浏览器回归现逐项编辑接入位置、方向和左右边界,验证请求被应用且目标道路面实际变化,并逐项撤销;随后继续验证过渡长度保存、正式重编译和刷新重放。该证据覆盖当前真实工作台 fixture,第二类结构的浏览器闭环仍需在最终 A4 矩阵中补齐。
|
浏览器回归现逐项编辑接入位置、方向和左右边界,验证请求被应用且目标道路面实际变化,并逐项撤销;随后继续验证过渡长度保存、正式重编译和刷新重放。该证据覆盖当前真实工作台 fixture,第二类结构的浏览器闭环仍需在最终 A4 矩阵中补齐。
|
||||||
|
|
||||||
|
第二真实候选审计发现一个两内部节点 cluster 会产生 solver 手柄但无法投影 `junctionStructure`。工作台状态与预览现统一隐藏此类无权威结构的手柄,并有 API 回归;该候选不再被错误计作第二类浏览器验收。A4 的第二类证据将使用具有完整结构投影的独立 3/4 臂 fixture。
|
||||||
|
|
||||||
本轮同时修复成功闭合且接缝合格的核心仍被误报为 `complex-junction-core-closure-unsupported` 的条件分支。npm test、191 项客户端单测、类型检查、生产构建、11 项 E2E、format:check 与 git diff --check 通过。区域邻接和排除区共同决定的更大向外边界仍留给区域级求解,不用固定范围冒充完整可行域。
|
本轮同时修复成功闭合且接缝合格的核心仍被误报为 `complex-junction-core-closure-unsupported` 的条件分支。npm test、191 项客户端单测、类型检查、生产构建、11 项 E2E、format:check 与 git diff --check 通过。区域邻接和排除区共同决定的更大向外边界仍留给区域级求解,不用固定范围冒充完整可行域。
|
||||||
|
|
||||||
本轮质量门: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 大小提示。遵循用户“整体任务完成再提交”,本轮未提交、未归档父任务。
|
本轮质量门: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 大小提示。遵循用户“整体任务完成再提交”,本轮未提交、未归档父任务。
|
||||||
|
|||||||
@@ -598,7 +598,7 @@ assert.notDeepEqual(
|
|||||||
'a cluster corner constraint must change its compiled corner geometry',
|
'a cluster corner constraint must change its compiled corner geometry',
|
||||||
);
|
);
|
||||||
const browsing = browseState(complexArea);
|
const browsing = browseState(complexArea);
|
||||||
const unavailableStructureState = browseState({
|
const unavailableStructureArea = {
|
||||||
...complexArea,
|
...complexArea,
|
||||||
nativeRoad: {
|
nativeRoad: {
|
||||||
...complexArea.nativeRoad,
|
...complexArea.nativeRoad,
|
||||||
@@ -610,8 +610,18 @@ const unavailableStructureState = browseState({
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
};
|
||||||
|
const unavailableStructureState = browseState(unavailableStructureArea);
|
||||||
assert.equal(unavailableStructureState.junctionStructures['cluster:not-compiled'], undefined);
|
assert.equal(unavailableStructureState.junctionStructures['cluster:not-compiled'], undefined);
|
||||||
|
const unavailableEditState = editState(unavailableStructureArea, selectionFrom({ cluster: 'not-compiled' }));
|
||||||
|
assert.equal(unavailableEditState.junctionStructure, null);
|
||||||
|
assert.deepEqual(unavailableEditState.handles.handles, []);
|
||||||
|
const unavailablePreview = editPreview(unavailableStructureArea, {
|
||||||
|
document: emptyDocument,
|
||||||
|
selection: { cluster: 'not-compiled' },
|
||||||
|
});
|
||||||
|
assert.equal(unavailablePreview.junctionStructure, null);
|
||||||
|
assert.deepEqual(unavailablePreview.handles.handles, []);
|
||||||
assert.ok(browsing.standardsDiagnostics.length, 'browse state retains structure diagnostics');
|
assert.ok(browsing.standardsDiagnostics.length, 'browse state retains structure diagnostics');
|
||||||
assert.equal(new Set(browsing.standardsDiagnostics.map((item) => item.id)).size, browsing.standardsDiagnostics.length);
|
assert.equal(new Set(browsing.standardsDiagnostics.map((item) => item.id)).size, browsing.standardsDiagnostics.length);
|
||||||
assert.ok(
|
assert.ok(
|
||||||
|
|||||||
+6
-2
@@ -411,6 +411,8 @@ function editState(area, selection = null) {
|
|||||||
},
|
},
|
||||||
trafficSignals: readJson(area.outputs.nativeTrafficSignals),
|
trafficSignals: readJson(area.outputs.nativeTrafficSignals),
|
||||||
});
|
});
|
||||||
|
const handles =
|
||||||
|
selection?.type === 'cluster' && !junctionStructure ? { ...resolution.handles, handles: [] } : resolution.handles;
|
||||||
return {
|
return {
|
||||||
active: true,
|
active: true,
|
||||||
areaId: area.id,
|
areaId: area.id,
|
||||||
@@ -419,7 +421,7 @@ function editState(area, selection = null) {
|
|||||||
document: directEdits,
|
document: directEdits,
|
||||||
constraintStates: resolution.constraintStates,
|
constraintStates: resolution.constraintStates,
|
||||||
diagnostics: resolution.diagnostics,
|
diagnostics: resolution.diagnostics,
|
||||||
handles: resolution.handles,
|
handles,
|
||||||
junctionStructure,
|
junctionStructure,
|
||||||
standardsProfile: { id: 'cn-urban-default', label: '中国城市道路(项目默认)' },
|
standardsProfile: { id: 'cn-urban-default', label: '中国城市道路(项目默认)' },
|
||||||
standardsDiagnostics: standardsDiagnostics(junctionStructure),
|
standardsDiagnostics: standardsDiagnostics(junctionStructure),
|
||||||
@@ -466,6 +468,8 @@ function editPreview(area, body = {}) {
|
|||||||
},
|
},
|
||||||
trafficSignals: readJson(area.outputs.nativeTrafficSignals),
|
trafficSignals: readJson(area.outputs.nativeTrafficSignals),
|
||||||
});
|
});
|
||||||
|
const handles =
|
||||||
|
selection?.type === 'cluster' && !junctionStructure ? { ...resolution.handles, handles: [] } : resolution.handles;
|
||||||
const degraded = Date.now() - startedAt > 300;
|
const degraded = Date.now() - startedAt > 300;
|
||||||
return {
|
return {
|
||||||
ok: true,
|
ok: true,
|
||||||
@@ -475,7 +479,7 @@ function editPreview(area, body = {}) {
|
|||||||
documentVersion: activeEdits.documentVersion,
|
documentVersion: activeEdits.documentVersion,
|
||||||
constraintStates: resolution.constraintStates,
|
constraintStates: resolution.constraintStates,
|
||||||
diagnostics,
|
diagnostics,
|
||||||
handles: resolution.handles,
|
handles,
|
||||||
junctionStructure,
|
junctionStructure,
|
||||||
standardsProfile: { id: 'cn-urban-default', label: '中国城市道路(项目默认)' },
|
standardsProfile: { id: 'cn-urban-default', label: '中国城市道路(项目默认)' },
|
||||||
standardsDiagnostics: standardsDiagnostics(junctionStructure),
|
standardsDiagnostics: standardsDiagnostics(junctionStructure),
|
||||||
|
|||||||
Reference in new issue
Block a user