Files
ARCADIA-Studio/harness/experiments/label-cue-20261001/change-summary.md
T

80 lines
4.8 KiB
Markdown

# Label association cue candidate B: source handoff
Implemented only in the isolated `codex/label-cue-experiment-01a0d717-20261001`
worktree from `6ea7518e`. No compilation, GUI operation, Gitea mutation, commit,
or production acceptance is claimed. Intent was recorded before source edits in
`label-cue-experiment-intent.md`.
## Changes
- New private `diagram/label_cues.rs` derives an edge-ID-to-cue map. For nonempty
ordinary labels, it clamps the anchor to the label rectangle to obtain the
nearest boundary point. Gap must be strictly greater than 12 world units.
Anchor inside/on the box and normal six-unit gaps produce no cue.
- A cue is omitted if its anchor is within 7 world units of any distinct edge's
segment, if its closed segment intersects any distinct route, any visible card
rectangle, or another ordinary/association-end label rectangle. Touching is
rejected. This includes container rectangles: conservative omission is intended.
- Two production Scene constructors cache cues with their already-routed scene,
using the preview Project where appropriate. Existing cache reuse handles
ordinary selection, hover, zoom and pan without recomputation. Route/placement
previews and revisions that build new scenes recompute the map.
- Canvas draws one-world-unit neutral dotted lines (2 on / 3 off) behind the owning
label's backing. SVG computes the same geometry once per export and uses matching
color, width and dash spacing, with `pointer-events="none"`. There is no marker,
arrowhead, endpoint dot, semantic hit region or stored metadata. Existing SVG
content is retained; the cue is the only intended export addition.
- One existing attachment-test Scene literal received an empty cue map; that test
exercises attachment handles, not label decoration. No unrelated refactor.
Four focused tests are prepared (not run by this agent):
1. Complete representative model admits without errors, retains twelve edges,
derives conversation boundary (1180,274.5) to anchor (1162,274.5), emits an
arrowless SVG cue, and preserves Project and complete routed geometry.
2. A long normal-offset label with only six units of boundary clearance is skipped;
exact 12-unit gap is skipped and 12.25 admitted; a genuinely authored label
centered on its anchor is skipped and stays exact.
3. Shared and six-unit-near landings, intersecting foreign route, card and label
controls suppress the cue. Additional nonintersecting segments six and exactly
seven units LEFT of the anchor are rejected; eight units left is admitted,
isolating the clearance guard from the crossing guard.
4. Actual Scene cache identity and cue map remain identical after selection,
pointer, zoom and pan changes. A changed Project with an authored label centered
on its anchor plus incremented context revision creates a new Scene and removes
the obsolete cue, independently checking invalidation as well as cache reuse.
Parent reproduction selector:
```powershell
cargo test --locked -p oa-desktop diagram::label_cues -- --test-threads=1
```
Parent should format, compile, run appropriate affected diagram/SVG gates and
independently review before native comparison. All changes remain uncommitted.
## Limits and explicit tradeoffs
The cue does not fix the foreign Allocation stroke already running through the
conversation label. It may be too weak at Fit; this is the central native falsifier.
No claim of improved unselected reading follows from source/geometry tests.
Closed rectangle and segment guards use projected geometry, not exact text glyph
or port-symbol contours. Authored label locations are never moved; a blocked cue
is simply omitted. The tests use the established representative scene, not the
user's exact source. There are no camera-dependent admission thresholds, so zoom
does not introduce cue admission flicker; physical dot size still scales normally.
Rebuild cost scans scene routes/cards/labels for each eligible label. No global
optimizer, new index, arbitrary cutoff, or per-hover scan was introduced. Dense
rebuild and route-preview latency remain parent performance gates. Individual
cue guards do not perform cue-to-cue avoidance; multiple eligible leaders can
intersect each other in other scenes. This is an explicit experimental limitation
to inspect before widening scope or making a general rendering claim.
The intended native comparison preserves the complete model, paths, labels and
camera: baseline versus B, plus the saved manual-label control. Fresh reading must
precede Inspector answers, and distinguish correct first association from mere
selectability. Revisit or reject B if wrong association persists, added marks are
mistaken for relationships, other reading worsens, or rendering/preview cost
regresses. Selection disambiguation and automatic-placement A remain separate.