Commit b143546
fix(dashboard): replay enabled state derived from marking, drop REPLAY chip
Two related issues on the EnactmentDetail replay flow:
1. Enabled-edge highlight during replay was wrong
The previous fix (f94e507) made the highlight "sticky" — accumulated
across replay steps. User says that's still wrong: at version v the
diagram should show edges/transitions actually enabled AT v's
derived marking, not the live count and not a cumulative union.
Backend: derive_replay/2 now calls
EnabledBindingElements.Computation.list(transition, runtime_cpnet,
markings_map) for each transition against the derived marking and
returns enabled_transitions in the :replay_to_version reply. The
public surface CLAUDE.md names ("Given marking + transition,
enumerates every firing binding. Core Petri-net semantics");
composed with Runner.RuntimeCpnet.from_definition/1 + markings map
keyed by Place.name(). Same shape BindingInspector already uses.
No new private reach.
Frontend: stickyEnabledEdgeIds state + union effect deleted.
ReplayToVersionReply gains enabled_transitions?: readonly string[].
replayEnabledTransitions state populates from each reply; derived
into replayEnabledEdgeIds (p_to_t arcs whose transition is in the
set). Live mode passes enabledEdgeIds=undefined so NetDiagram's
internal enabled_count>0 path runs; replay passes the derived set
exactly.
2. REPLAY chip in page header dropped
The "REPLAY · v6" chip was redundant now that TimelineScrubber's
own status line ("Replay · v6 of v7") and the new jump-to-live
button (c0117f6) make the replay state self-evident. StateBadge's
replay branch removed, the page no longer threads replayState
into the byline.
Tests:
- enactment_detail_store_test: SimpleSequenceWorkflow case asserts
v=0 → enabled_transitions == ["pass"]; v=1 → []; the single
transition flips disabled after firing.
- EnactmentDetailPage.test: NetDiagram stub forwards enabledEdgeIds
as data-enabled-edges ("live" sentinel when undefined). New cases
pin live=undefined-sentinel; replay reply wires through to the
prop; empty enabled set renders "[]". The REPLAY-chip test
rewritten as a negative-presence assertion.
mix 175/176 (1 pre-existing telemetry-bridge flake reproduces on
baseline); pnpm typecheck + 169/169 vitest + build clean;
lib/coloured_flow byte-identical.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent c0117f6 commit b143546
5 files changed
Lines changed: 152 additions & 68 deletions
File tree
- dashboard
- lib/coloured_flow_dashboard_web/stores
- test/coloured_flow_dashboard_web/stores
- ui/src
- generated
- routes
Lines changed: 36 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| |||
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
| 142 | + | |
141 | 143 | | |
142 | 144 | | |
143 | 145 | | |
| |||
256 | 258 | | |
257 | 259 | | |
258 | 260 | | |
| 261 | + | |
259 | 262 | | |
260 | 263 | | |
261 | 264 | | |
| |||
465 | 468 | | |
466 | 469 | | |
467 | 470 | | |
468 | | - | |
| 471 | + | |
469 | 472 | | |
470 | 473 | | |
471 | 474 | | |
| |||
475 | 478 | | |
476 | 479 | | |
477 | 480 | | |
| 481 | + | |
478 | 482 | | |
479 | 483 | | |
480 | 484 | | |
| |||
485 | 489 | | |
486 | 490 | | |
487 | 491 | | |
488 | | - | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
489 | 498 | | |
490 | 499 | | |
491 | 500 | | |
| |||
496 | 505 | | |
497 | 506 | | |
498 | 507 | | |
| 508 | + | |
499 | 509 | | |
500 | 510 | | |
501 | 511 | | |
| |||
717 | 727 | | |
718 | 728 | | |
719 | 729 | | |
720 | | - | |
| 730 | + | |
| 731 | + | |
721 | 732 | | |
722 | 733 | | |
723 | 734 | | |
724 | | - | |
| 735 | + | |
725 | 736 | | |
726 | 737 | | |
727 | 738 | | |
| |||
747 | 758 | | |
748 | 759 | | |
749 | 760 | | |
| 761 | + | |
750 | 762 | | |
751 | 763 | | |
752 | 764 | | |
753 | 765 | | |
754 | 766 | | |
755 | 767 | | |
756 | | - | |
| 768 | + | |
757 | 769 | | |
758 | 770 | | |
759 | 771 | | |
760 | 772 | | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
761 | 792 | | |
762 | 793 | | |
763 | 794 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
926 | 926 | | |
927 | 927 | | |
928 | 928 | | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
929 | 934 | | |
930 | 935 | | |
931 | 936 | | |
| |||
944 | 949 | | |
945 | 950 | | |
946 | 951 | | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
947 | 958 | | |
948 | 959 | | |
949 | 960 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
| 135 | + | |
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
| 140 | + | |
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
143 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
144 | 151 | | |
145 | 152 | | |
146 | 153 | | |
| |||
857 | 864 | | |
858 | 865 | | |
859 | 866 | | |
860 | | - | |
| 867 | + | |
861 | 868 | | |
862 | 869 | | |
863 | 870 | | |
864 | 871 | | |
865 | 872 | | |
866 | 873 | | |
867 | | - | |
868 | | - | |
869 | | - | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
870 | 877 | | |
871 | 878 | | |
872 | 879 | | |
873 | 880 | | |
874 | 881 | | |
875 | 882 | | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
876 | 947 | | |
877 | 948 | | |
878 | 949 | | |
| |||
0 commit comments