Skip to content

feat: edge chips and layoutIr boxes carry their identity (#110, #111) - #114

Merged
lex00 merged 1 commit into
mainfrom
feat/110-111-stamp-ids
Aug 10, 2026
Merged

feat: edge chips and layoutIr boxes carry their identity (#110, #111)#114
lex00 merged 1 commit into
mainfrom
feat/110-111-stamp-ids

Conversation

@lex00

@lex00 lex00 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Fixes #110 and #111, the two stamps behold's hand-layout adoption is waiting on:

  • The viaAttr chip group now carries data-edge-from/data-edge-to/data-edge-via — the same hooks as the edge line it labels — so downstream pairs chip and line by identity rather than document order (which behold's hover-raise re-appending destroys). Existing chips without a rel (none today; all callers pass one) stay unstamped rather than half-stamped.
  • layoutIr's group boxes carry their group record's key as GroupBox.id, exactly as Stamp data-group-id on architecture group boxes (#103) #104 did for layoutArchitecturerenderSvg already renders id as data-group-id with entity escaping, so the whole change is setting it.

Tests: chip stamped on both groups (line + chip) and specifically on the rect-holding one; data-group-id per layoutIr key; escaping mirrored from #103's case.

Downstream (next behold release): drop the label-pairing inference and the structural box fallback per behold#250's plan, and the server-side label bake in behold src/layout.ts unblocks.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JD1XEfzQByQEP29dMhJgvz

Two anonymous-markup gaps behold#250's adoption hit:

- The viaAttr chip was <g><rect/><text/></g> with nothing naming its
  edge; downstream paired it with its line by document order + text
  sniffing, which hover-raise re-appending destroys. The chip group now
  carries the same data-edge-from/to/via hooks as the edge it labels.
- #104 stamped GroupBox.id in layoutArchitecture only; layoutIr's boxes
  (byWave/byStack/byContainer) had a title and nothing else. They now
  carry their group record's key as id, rendered as data-group-id with
  the same escaping.

Closes #110
Closes #111

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JD1XEfzQByQEP29dMhJgvz
@lex00
lex00 merged commit 9a65675 into main Aug 10, 2026
1 check passed
lex00 added a commit that referenced this pull request Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

edge-label chips are anonymous — stamp them with their edge so downstream doesn't infer by sibling order

1 participant