Commit f94e507
fix(dashboard): NetDiagram polish — rounded edges, inline tokens, code colset, matched borders, uncapped transition width, sticky-enabled replay
Six readability tweaks on top of 227fb9d:
1. Rounded polyline corners on orthogonal edges
OrthogonalEdgeImpl delegates to new roundedPolylinePath that emits
a quadratic Q arc at each bend (radius 8). Per-corner cap is
min(radius, len(prev)/2, len(next)/2) so short legs don't
overshoot. Two-point edges short-circuit to a plain polyline.
2. Token count inline next to place name
Dropped the corner Badge overlay. Token count now renders on the
external label line, right of the place name, in
text-cf-accent bold tabular-nums. testid place-token-badge-${name}
preserved on the inline span.
3. Colour set name styled as code
Wrapped in a <code> with font-mono text-[10px] rounded border
border-cf-border bg-cf-canvas px-1. Visually reads as an
identifier, not body text. Kumo's <Code> primitive is deprecated
(v2.0) + tuned for code snippets; custom <code> is the right
shape here.
4. Place + transition borders match edge stroke
Place circle: flat 1.5px borderWidth, borderColor toggles
cf-border-strong / cf-accent on hasTokens (was bumped to 2 on
tokens). Transition border flipped to cf-border-strong to match
the edge family. Glow/pulse boxShadow untouched.
5. Transition width uncapped
Dropped TRANSITION_MAX_W. computeTransitionWidth now
Math.max(MIN_W, maxLen * 7 + 20). Single shared width still
applied to all transitions for a clean ELK grid.
6. Sticky enabled edges across replay scrubbing
EnactmentDetailPage derives currentlyEnabledEdgeIds from
diagram.transitions[].enabled_count > 0 every tick. During
replay (replayState !== null) the page maintains
stickyEnabledEdgeIds: Set, unioning the current set on every
step so an edge that was enabled at v=5 stays highlighted
when the operator scrubs to v=6 even if its underlying
transition is no longer enabled there. Reset to empty when
replayState clears (exit replay). Live mode passes only
currentlyEnabledEdgeIds; replay passes the union. NetDiagram
gains an optional enabledEdgeIds prop; buildGraph falls back
to auto-derive when omitted (keeps unit tests green).
161/161 vitest + typecheck + build green; 176/176 mix + dialyzer 0;
lib/coloured_flow byte-identical.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent f3a84a7 commit f94e507
2 files changed
Lines changed: 133 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
| |||
58 | 63 | | |
59 | 64 | | |
60 | 65 | | |
61 | | - | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
68 | 75 | | |
69 | 76 | | |
70 | 77 | | |
71 | | - | |
| 78 | + | |
72 | 79 | | |
73 | 80 | | |
| 81 | + | |
| 82 | + | |
74 | 83 | | |
75 | 84 | | |
76 | 85 | | |
| |||
118 | 127 | | |
119 | 128 | | |
120 | 129 | | |
121 | | - | |
| 130 | + | |
| 131 | + | |
122 | 132 | | |
123 | 133 | | |
124 | 134 | | |
125 | 135 | | |
126 | | - | |
127 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
128 | 146 | | |
129 | 147 | | |
130 | 148 | | |
| |||
329 | 347 | | |
330 | 348 | | |
331 | 349 | | |
332 | | - | |
| 350 | + | |
| 351 | + | |
333 | 352 | | |
334 | 353 | | |
335 | 354 | | |
| |||
382 | 401 | | |
383 | 402 | | |
384 | 403 | | |
385 | | - | |
386 | | - | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
387 | 407 | | |
388 | 408 | | |
389 | 409 | | |
| |||
444 | 464 | | |
445 | 465 | | |
446 | 466 | | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
451 | 501 | | |
452 | 502 | | |
453 | 503 | | |
| |||
475 | 525 | | |
476 | 526 | | |
477 | 527 | | |
478 | | - | |
| 528 | + | |
479 | 529 | | |
480 | | - | |
481 | | - | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
482 | 535 | | |
483 | 536 | | |
484 | 537 | | |
| |||
495 | 548 | | |
496 | 549 | | |
497 | 550 | | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | 551 | | |
512 | 552 | | |
513 | 553 | | |
514 | 554 | | |
515 | 555 | | |
516 | | - | |
517 | | - | |
518 | | - | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
519 | 569 | | |
520 | | - | |
| 570 | + | |
521 | 571 | | |
522 | | - | |
| 572 | + | |
523 | 573 | | |
524 | 574 | | |
525 | 575 | | |
| |||
560 | 610 | | |
561 | 611 | | |
562 | 612 | | |
563 | | - | |
| 613 | + | |
564 | 614 | | |
565 | 615 | | |
566 | 616 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
337 | 384 | | |
338 | 385 | | |
339 | 386 | | |
| |||
432 | 479 | | |
433 | 480 | | |
434 | 481 | | |
| 482 | + | |
435 | 483 | | |
436 | 484 | | |
437 | 485 | | |
| |||
0 commit comments