Commit Graph
76 Commits
Author SHA1 Message Date
que01 3ba7e6f1e8 chore(task): archive JunctionTools Stage 5 2026-09-07 17:14:37 +08:00
que01 0065c3eaec feat(junction): project advanced facilities and associations 2026-09-07 17:12:29 +08:00
que01 fc962ce402 chore(task): archive JunctionTools Stage 4 2026-09-07 16:45:59 +08:00
que01 92ab2edd96 feat(junction): add reference geometry comparison layer 2026-09-07 16:45:37 +08:00
que01 73ce56c290 chore(task): archive JunctionTools Stage 3 2026-09-07 15:48:24 +08:00
que01 63c6cefce7 feat(junction): enforce stage3 geometry validation on save 2026-09-07 15:47:34 +08:00
que01 06a58c9dbf chore(task): archive JunctionTools Stage 2 2026-09-07 15:23:46 +08:00
que01 de6ef8e64b feat(junction): add stage2 object selection scope controls 2026-09-07 15:23:03 +08:00
que01 977858b283 chore(task): archive JunctionTools Stage 1 2026-09-07 14:52:33 +08:00
que01 fc7fe81eff feat(junction): expose stage1 structure and standards panel 2026-09-07 14:52:06 +08:00
que01 d61c86ed2c chore(task): archive completed road editor workflows 2026-09-07 14:21:57 +08:00
que01 91e088b25a chore(task): archive 09-07-junctiontools-standards 2026-09-07 14:12:24 +08:00
que01 61cf276745 feat(junction): add structure and standards contract 2026-09-07 14:11:44 +08:00
que01 cdcc606391 chore(task): archive 09-04-complex-junction-shapes 2026-09-07 10:52:57 +08:00
que01 a359f88edc feat(junction): classify complex junction shapes 2026-09-07 10:52:12 +08:00
que01 38ea779d9b feat: add complex junction selection markers 2026-09-04 17:09:32 +08:00
que01 57248f1aa4 chore(task): archive direct edit junction tools 2026-09-04 14:52:20 +08:00
que01 1f439d98de fix(workbench): show junction traffic signals 2026-09-04 14:23:27 +08:00
que01 f10a5da325 feat(workbench): stabilize junction tools workspace 2026-09-04 09:46:19 +08:00
que01 39d7453ebc chore(tasks): archive completed edit workflows 2026-09-03 13:34:25 +08:00
que01 a78f5257fc test(junction): verify preview and compile parity 2026-09-03 13:32:37 +08:00
que01 8c99bb7340 docs(tasks): plan junction tools delivery 2026-09-03 12:28:47 +08:00
que01 6a0736517f chore(task): record junction facilities progress 2026-09-03 12:13:01 +08:00
que01 1bd1fd712f chore(task): record junction geometry progress 2026-09-03 12:02:48 +08:00
que01 f6f51fe90b feat(compile): expose effective junction plans 2026-09-03 11:44:26 +08:00
que01 c59fb704ef chore(task): archive 09-02-junction-tools-workspace 2026-09-03 11:24:23 +08:00
que01 2504e8342f feat(workbench): add junction tools workspace shell 2026-09-03 11:20:37 +08:00
que01 96833d3a63 chore(task): archive 09-02-junction-detection-hotspot 2026-09-03 11:13:45 +08:00
que01 7d9b0f46d4 feat(workbench): add junction hotspot entry points 2026-09-03 11:12:22 +08:00
que01 bd7b049930 chore(task): archive 09-02-junction-requirements-research 2026-09-03 11:05:03 +08:00
que01 6b75d273e7 chore(task): archive 09-01-lane-maneuver-position-drag 2026-09-03 09:51:14 +08:00
que01 15be3480ed chore(task): archive workbench-component-boundaries 2026-09-03 09:50:01 +08:00
que01 834470cfa1 refactor(workbench): split editor state and components 2026-09-02 15:04:58 +08:00
que01 0318876e6a fix(compile): validate direct edit constraint ranges 2026-09-01 14:28:24 +08:00
que01 bb108267e3 feat(workbench): organize map editing panels 2026-09-01 13:47:30 +08:00
que01 9cb715a592 feat: drag lane turn arrows along their lanes 2026-09-01 10:24:59 +08:00
que01 2415733597 chore(task): archive lane maneuver override 2026-09-01 09:17:57 +08:00
que01 e48eb15827 feat: edit lane turn arrows in workbench 2026-09-01 09:17:24 +08:00
que01andClaude Opus 5 8b84166e6f chore(task): record lane-maneuver delivery and the UI prerequisite
All seven criteria pass against a live area. Notes what a UI would need first:
turn arrows group by lane plus maneuver, a two-field key, where crosswalks and
stop lines group by a single property — so the element registry's groupProperty
has to become composable before arrows can join it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 18:02:27 +08:00
que01andClaude Opus 5 335c8ea68a feat: override which turn arrow a lane shows
The arrow on a lane came from the OSM turn:lanes tag with no way to change it,
and a lane the tag skipped got no arrow at all. lane-maneuver is a v1 override
that sets it.

v1 rather than a v2 constraint, because "which arrow" is a discrete attribute of
a lane with no station to anchor to, while every v2 anchor is positional. The
existing road override already covers OSM-derived values this way — laneCount,
width, sidewalks — and this is the same kind of thing. Arrow *placement* is the
positional half and stays out; it also still has an open question about whether
a group is a lane or a single arrow.

Three behaviours, each measured against compiled output: an override replaces
the tag's maneuver, it adds arrows to a lane the tag never marked, and '' removes
one the tag asked for. The empty string is therefore distinguished from "no
override" rather than falling through to the tag. An empty override set leaves
the arrows byte-identical and the fixtures untouched.

Validation lists the accepted maneuvers and rejects anything else, including
correctly-spelled components in the wrong order. It cannot be left to
normalizeManeuver(), which returns unrecognised input unchanged — a typo would
otherwise reach the template lookup and silently produce no arrow.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 18:00:53 +08:00
que01andClaude Opus 5 15d41be444 chore(task): record progress and the blocker on corner grips
Steps 1, 2 and 4 are done and step 3 is parked with a reason: the client never
reads affects and no highlighting exists, so fixing it alone changes nothing a
user can see. It belongs with the highlight, as one piece of work.

Step 5 has a design question that should be settled before code. The size value
is a pair while the drag path is scalar end to end, so a corner grip moving one
component has to preserve the other or every drag resets the half it did not
touch. Three options noted, with the reason the tempting one — letting element
controls build their own value — is the wrong shape.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 17:12:57 +08:00
que01andClaude Opus 5 f3924caa5c feat: make crosswalk size a constraint the geometry stage reads
Every zebra was six stripes at 3m by 0.45m on a 0.9m pitch, all literals. Depth
and stripe count are now a constraint, junction-crosswalk-size, and the loop
reads them.

The span across the road stays derived rather than stored: it is count times
pitch, and pitch is fixed because stripe and gap widths are standardised while
the road they cross is not. Widening a crossing means adding stripes, which is
what a real one does, and it is why the span quantises in 0.9m steps.

That also fixes a span pinned at 4.95m regardless of the street. Measured, every
crossing sat on a 6.50m carriageway and covered under four fifths of it. The
default now follows the segment width — both directions, since a crossing spans
the carriageway — giving eight stripes and 6.74m, reaching the kerb rather than
stopping short. Fixture baselines move for exactly two entries on the one area
with crossings; the area without them is untouched.

No handle is published yet. design.md requires proving compileGeometry() consumes
a parameter before any grip is drawn — the rule left over from profile.interval
shipping a handle that did nothing — so the grips come next, on a value already
known to work.

Adding the kind made the client's exhaustive scalar switch fail to compile, which
is the check working: size is a pair and has no dragged-scalar form, so that case
now says so and throws rather than writing half a value.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 17:10:45 +08:00
que01andClaude Opus 5 323ff9279f docs: map which markings the element model reaches
Measured the grouping of every marking layer. Stop lines are nearly free — same
feature builder, same key shape, an existing constraint kind, and a sweep shows
the offset tracks one-to-one across its whole range with no dead zone. Arrows
are not: neither kind exists and neither is read by the geometry stage.

The trap is that crosswalks and stop lines share crossing_node_id on all eight
groups, so grouping has to branch on provenance before touching the key or the
two merge into one element. That is already how element.ts works and a test
holds it.

What the data earns is a provenance-keyed registry and nothing more: group keys
are single-field, two-field and derived; group sizes run 1 to 230; two element
types have no constraint at all. A universal element protocol would be inventing
past the evidence, which the PRD rules out.

Also records delivery state — steps 1 and 2 done, 3 through 5 not started — so
the task is not mistaken for complete.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 15:21:01 +08:00
que01andClaude Opus 5 59e3dc2320 chore(task): narrow range validation to the kinds still affected
The silently-inert case is fixed for crosswalk inset, so this task is down to
the edge-offset case and the missing server-side check. Records the reusable
shape — ceilings derived from geometry rather than declared as constants — and
the trap that cost a round: two directional roads of one segment can meet at a
junction serving different objects, so taking the first match publishes one
road's bound on the other's handle.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 15:04:23 +08:00
que01andClaude Opus 5 4b70b0221d docs: record the crosswalk inset dead zone
Sweeping the declared [0, 8] range and measuring where the group actually lands:
0 to 3.2 tracks one-to-one, and 3.2 to 8 does not move at all. No diagnostic, no
feedback — roughly 60% of the advertised range is inert.

crossingJunctionInset() drives it. targetDistance bottoms out once inset reaches
the approach's cutback, and a 4m cap sits above that, so the real ceiling varies
per approach while the manifest publishes a flat 8 for all of them.

This is worse than the edge-offset case already on file. That one refuses and
says so; this one silently does nothing, which is indistinguishable from a broken
control — the exact failure the interval flag exists to prevent, occurring in the
upper half of a range rather than across a whole handle. A user whose first drag
lands in the dead zone concludes direct editing does not work.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 14:11:57 +08:00
que01andClaude Opus 5 623481fd2c chore(task): correct the elementId premise and split the first gate
Measured rather than assumed: grouping the 48 stripes by crossing_node_id yields
exactly 8 groups of 6, and no crossing maps to more than one road. The uniqueness
is structural — compileControlMarkings() iterates model.crossings and each pass
emits one group from one candidate — so crosswalk:node/<crossingId> is already a
stable group id and needs no compiler change.

The earlier claim that no group id existed conflated the crossing node
(node/-26452, the pedestrian crossing) with the junction node (node/1140799725).
Different ids. Grouping client-side therefore reads a published identifier rather
than clustering by proximity, which is what the PRD forbids.

The missing affects entries are real and unchanged, but they only degrade
drag highlighting; they do not block selection. The two are now separate steps,
and selection moves first because it costs nothing on the server.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 13:13:09 +08:00
que01andClaude Opus 5 086939be93 chore(task): re-plan the crosswalk experiment around one root cause
Three symptoms turned out to be one hole. junctionAffects() builds
junctionSurface + roadAffects + connectors and never adds crosswalks, so on an
area with 48 of them the crosswalk-inset handle reports 59 affected features and
zero crosswalks. The cause is that stripe ids key off the crossing node while the
solver has no approach-to-group mapping — which is also why there is no stable
elementId and why clicking a stripe cannot select the group. Publishing that
mapping resolves all three, so it is now the first gate rather than three
separate steps.

Corner resize moves into the first phase by decision; rotation is deferred, since
it needs a new constraint kind and the compiler has to consume it before any grip
may be drawn.

Sizing semantics are settled: stripe depth is a stored number, but span is
count x pitch, so the corner drag varies the count at a fixed 0.9m pitch and
therefore quantises. That is honest rather than janky and the UI has to read as
deliberate snapping. It also fixes span being pinned at 5.4m regardless of road
width, which will move fixture baselines.

Records the data prerequisite: crossing nodes are required, and the current
import had none, which is what made the handle look broken.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 13:02:46 +08:00
que01andClaude Opus 5 6663c289e7 chore(task): bound the crosswalk experiment to position editing
A four-arm junction already carries 20 handles across 4 segments, and the main
map shows only the selected segment's — so seeing one junction whole takes four
selections. That is why element-level selection is a prerequisite for complex
junction work rather than a refinement of it.

The experiment stays crosswalk-only by decision, to keep the risk small. What
that costs is now written down: a crosswalk moves but does not reshape the
junction, so passing this proves the select-and-position path and nothing about
approach width, cutback or corner radius, which change the junction polygon
itself and have to be validated separately.

Also records that the parameter form half already exists, so the element
controls join the existing exits instead of growing a second preview or undo
path.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 12:04:09 +08:00
que01andClaude Opus 5 1c27501534 feat: edit road parameters by number as well as by drag
The map had one input device. A drag projects a pointer onto the manifest's
axis; there was no way to state a value, read one, or withdraw one.

Both channels now meet at the same three exits in App.tsx — draftValue()
previews, settleValue() commits one undoable command, abandonGesture() puts the
settled state back — so nothing about the constraint, the debounce or the
previewSeq arbitration is implemented twice. EditSession is untouched: focus and
blur land on the gesture boundary that pointerdown and pointerup already used,
which is why typing 1.53 is one undo step rather than four.

Three rules the two devices do not share:

- Live drag values bypass React and write the input's value directly, per
  direct-edit-client.md §7. A layout effect re-applies them after a mid-drag
  preview replaces the manifest, and drops the override once the manifest
  reports the value the drag asked for.
- Typed values out of range are refused, not clamped. A pointer cannot state an
  intent it never reached, so a drag clamps; typed text is an intent, and a
  clamped typo reads as a plausible value that can go unnoticed. The offered
  extremes round inward — a real max of 2.925 renders as 2.93 under
  nearest-rounding, which the range it came from would then reject.
- Reset disables the constraint rather than deleting it: validateEditDocument()
  rejects an operation naming a constraint that is not in the document. This is
  the one edit a drag cannot express, since a drag can set a value but never
  withdraw one.

Interval editing stays behind intervalEditingSupported, which is still false —
compileGeometry() does not read profile.interval, and a control that changes
nothing is worse than no control. The conversions are implemented and tested so
the row appears when the flag flips.

Probing a live manifest turned up a defect that is not from this change and is
not fixed here: an edge offset advertises ±2.925 while the solver rejects past
about ±1. Evidence is in the task's research/, and the requirement moved to
08-31-constraint-range-validation.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 11:58:00 +08:00
que01 1917ae91ff chore(task): link crosswalk editor experiment 2026-08-28 17:58:12 +08:00