Commit Graph
114 Commits
Author SHA1 Message Date
que01 b7d9a1973e test(workbench): cover junction workspace deep links 2026-09-03 12:35:45 +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 ecfa391eea feat(workbench): summarize junction facilities and diagnostics 2026-09-03 12:07:50 +08:00
que01 1bd1fd712f chore(task): record junction geometry progress 2026-09-03 12:02:48 +08:00
que01 60e28f6b7a feat(workbench): expose junction geometry parameters 2026-09-03 12:02:16 +08:00
que01 f6f51fe90b feat(compile): expose effective junction plans 2026-09-03 11:44:26 +08:00
que01 4b38ce3c31 fix(workbench): require explicit junction draft exit 2026-09-03 11:28:49 +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 58f59c8a45 test(workbench): verify exported package contract 2026-09-02 17:52:54 +08:00
que01 fcb07b8396 test(workbench): add browser regression coverage 2026-09-02 17:39:25 +08:00
que01 2fb9db65e5 test(workbench): lock cross-domain edit history 2026-09-02 16:57:36 +08:00
que01 bb6c51c489 fix(workbench): preserve cross-domain undo order 2026-09-02 16:41:12 +08:00
que01 31552a5b6f feat(workbench): drag control markings as elements 2026-09-02 16:04:38 +08:00
que01 834470cfa1 refactor(workbench): split editor state and components 2026-09-02 15:04:58 +08:00
que01 caa3cb843f feat(workbench): add traffic signal rotation handle 2026-09-02 11:38:30 +08:00
que01 9b7c3d59bd feat(workbench): stage traffic signal edits 2026-09-02 09:30:03 +08:00
que01 9c83392b97 feat(workbench): drag traffic signal assemblies 2026-09-02 09:05:56 +08:00
que01 cf5bc0602b feat(workbench): improve traffic signal editing 2026-09-02 09:04:56 +08:00
que01 00d5f7650f refactor(workbench): use persistent mode switch 2026-09-01 17:20:16 +08:00
que01 c804a373ca feat(workbench): unify lane maneuver edits in v2 2026-09-01 16:46:22 +08:00
que01 118dc8e9aa fix(workbench): preview lane arrow drag 2026-09-01 15:04:11 +08:00
que01 fe73d993a9 fix(workbench): preview staged lane arrow overrides 2026-09-01 14:46:22 +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 6d80597642 feat(workbench): preview and drag lane turn arrows 2026-09-01 11:47:35 +08:00
que01 9cb715a592 feat: drag lane turn arrows along their lanes 2026-09-01 10:24:59 +08:00
que01 5457f960ff chore: record lane maneuver workbench session 2026-09-01 09:21:58 +08:00
que01 3d135761e7 fix: outline selected turn arrows 2026-09-01 09:21:24 +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 84c82f3f09 feat: select and drag stop lines the same way as crosswalks
Element identity moves behind a provenance-keyed registry, and stop lines join
as its second entry. Selection, the dashed box and the drag all work unchanged —
the registry supplies the group key, the layer the members live in, and the
constraint that moves them.

Stop lines are the useful second case rather than an easy one. They are a group
of one where a crosswalk is six, so adding them proves the grouping does not
quietly depend on there being parts; and they share crossing_node_id with the
zebra they protect on all eight measured groups, so provenance has to pick the
type before the key is ever read. A test holds both.

The registry promises only what the measurements support: provenance picks the
type, then a key picks the group. Arrows are deliberately absent — their group
keys are two-field and derived, group sizes run to 230, and neither has a
constraint kind the geometry stage reads.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 15:36:33 +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 5c89d92041 docs: record the two-road ambiguity and the range contract
The directional-road trap cost two rounds in one session — once on the client,
once in the solver — and both times produced a plausible number attached to the
wrong object, which nothing but a segment with two of the thing will catch.

Also tabulates what measuring three handle ranges turned up: one rejects past a
third of its declared span, one goes silently inert over most of it, and one
would happily place a stop line 126m from the junction it protects. Each was
derived independently, and each was wrong in its own direction.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 15:17: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 479ffd00ed fix: publish the crosswalk inset ceiling that actually moves the zebra
Every junction-crosswalk-inset handle advertised max 8. Sweeping the real
response across eight groups, the ceiling ran 1.0 to 4.5 and varied per
approach, so 44-88% of the declared range moved nothing and returned no
diagnostic. Two approaches had a ceiling at or below the 1.5 default, meaning
dragging outward there did nothing at all — which is what made direct editing
look broken rather than limited.

crossingJunctionInset() stops responding once the inset reaches the cutback, and
sooner still when the crossing sits beyond the 4m cap, giving
cutback - max(0, junctionDistance - 4). Predicted ceilings matched all eight
measurements within the 0.5m sweep step, and the published max now matches them
8/8 where it used to be a flat 8.

The distance needs to know which crossing an approach serves, which lived only
inside compileControlMarkings(). crossing-approach.js now holds that rule at road
level, which is model-only and so usable from the solver. Behaviour is
unchanged: every lane of a road shares its junction distance, so the compiler's
(road, lane) ordering already grouped by road — fixtures confirm the geometry is
byte-identical.

Both directional roads of a segment can meet at one junction serving different
crossings; taking the first match published one road's ceiling on the other's
handle. The road that ends at this node wins, which is the same rule the client
uses to find the handle and the same one crossingJunctionInset() applies.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 15:00:08 +08:00
que01andClaude Opus 5 8a039f47ab fix: keep the selection box on the crosswalk it is drawn around
The box measured state.layers, which is the last compiled output and does not
change while editing. The zebra is drawn from the preview, so it slid out from
under its own box on every drag and only caught up after a recompile.

Reading the preview when one exists puts them back on the same geometry. A null
preview layer already means "back to baseline", which is what the fallback says.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 14:22:28 +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 7b5bb753a7 feat: drag the crosswalk itself, not a dot beside it
A dashed box now hugs the selected group and is the thing you grab. It is
oriented along the crossing rather than along latitude and longitude: measured
groups run at azimuths from 14 to 105 degrees, so an axis-aligned box would sit
visibly askew and read as a bug. Extents come out at 3.00m by 4.94m on every
group, matching the compiler's literals.

The box carries the handleId of the control that moves it rather than an id of
its own, so grabbing it runs the existing value gesture — no second drag branch,
no second constraint, and the dot still works where the two overlap.

Resolving that control needs more than the segment: 15 of 23 segments carry two
crosswalk-inset handles, one per junction, and one segment carries two groups.
The junction is the road's last source node, which is the rule
crossingJunctionInset() already applies rather than a guess, and it resolves 8/8
groups uniquely — the two-group segment included, told apart by direction.

Also stops a gesture that never moved from becoming an edit. handleUpEvent
always reports a final value, so a tap committed a constraint equal to the one
already there. The box is a large target, which turns that from a curiosity into
something a user would hit routinely.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 14:06:51 +08:00
que01andClaude Opus 5 2694cad619 feat: select a crosswalk group by clicking any of its stripes
A crosswalk renders as six stripe features but is edited as one thing. Clicking
one now resolves the whole group, and clicking anything else drops the selection
so a box cannot outlive what it was drawn around.

The group id needed no compiler change: crosswalk:node/<crossingId> is already
stable, because compileControlMarkings() emits exactly one group per crossing
from a single candidate road. Verified against real output — 48 stripes, 8
groups of 6, nothing ungrouped, and none of the 8 stop lines mistaken for one,
since both share controlFeature() and are told apart by provenance. Grouping
therefore reads a published identifier rather than clustering on proximity,
which prd.md forbids.

Two supporting fixes in MapCanvas: the select callbacks join the existing
callback ref, and an empty click now reports background instead of returning
early. The listener is registered once, so it had been holding the first
render's closures — harmless while they only called stable setters, and not
survivable now that one of them reads current layers.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 13:35:59 +08:00