refactor(workbench): split editor state and components

This commit is contained in:
que01 committed 2026-09-02 15:04:58 +08:00
1 parent caa3cb843f
commit 834470cfa1
23 files changed
+1219 -878

No files matched your search

+8 -10
View File
@@ -140,18 +140,16 @@ match `main` exactly. Guard once at construction, not per call site.
while `compileGeometry()` ignores `profile.interval`. A control whose drag changes
nothing is worse than no control.
### V1 override selection is not direct edit
### Lane maneuver is v2 direct edit only
`lane-maneuver` is a saved v1 override for a discrete lane attribute, not a spatial
constraint. Its click selection and inspector selector are intentionally available
without `directEdit`: they stage `{ kind: 'lane-maneuver', laneId, maneuver }` and
wait for the existing save/recompile path. Do not route them through `EditSession`,
the preview endpoint, or a draggable element outline.
`lane-maneuver` is a spatial direct-edit constraint. Its selector and draggable
outline are available only in edit mode and must be routed through `EditSession` and
the preview endpoint. It must never be added to the ordinary v1 staged override
array, which is reserved for road, connector, and marking style overrides.
The distinction is observable: the ordinary workbench may select a turn-arrow part
or lane centerline and show this selector, while the `directEdit` flag still means
there are no edit sources, manifest requests, handles, ghosts, previews, or control
marking outlines.
With edit mode off, selecting a turn-arrow part may still show read-only element
information, but it must not create a manifest request, ghost, preview, handle, or
staged lane-maneuver override.
---