Repository navigation
State machine: green arrows where the call is allowed, red crossed arrow from the actual state - #207
Conversation
…row from the actual state In focus mode every arrow of the called method was red, including those from the states where the call is allowed, and the actual state had no arrow for the call at all, since the spec has none. Now the transitions of the called method are green, arrow and label, with their guards (an unmet guard keeps its red text), and each possible state that rejects the call gets a red self-loop "✕ method": the attempted call. When the spec already has a transition of the method from such a state, that one is drawn as the rejected call instead. No red loop when the state of the receiver is unknown. The loop is never dimmed, collapsed or counted, as it is no spec transition. The legend gains the two arrows, each only when on the diagram. Same colouring with Show all. Client version 0.1.4 for the study build. Co-Authored-By: Claude Fable 5.1 <[email protected]>
ELK nests a second self-loop around the first one and its label, and the rounding then drew it as a wide ellipse across the diagram (A1_01, top to bottom). No state had two loops before, since the methods between the same states share an edge, so the rejected call now shares the state's loop too, as its first line, red; a state without a loop gets a new one. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
Codex review, round 1 (on ad23230,
Nothing to fix. A second round follows on the final diff. |
Without them nothing says where the call is allowed, and the legend is not shown, so a green label had no explanation. The method keeps its plain label in that case; the possible states stay outlined. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
Codex review, round 2 (on 0989cb4)
Fixed in 303e507: the called method is coloured only when there is a focus (accepted states known). Without one nothing says where the call is allowed and the legend is not shown, so the method keeps its plain label; the possible states stay outlined as before. The existing test for that case now asserts no colour. |
|
Codex review, round 3 (on 303e507)
Nothing new; the loop ends here. |
|
Clean-code review (clean-code-principles skill, own diff only)
Nothing fixed, nothing else found. |
A loop says the object stays in its state, which the spec never says of the rejected call. Each possible state that rejects the call now has a red arrow, labelled with the method, into a ✕ of its own: a state of the diagram, so that the layout keeps it clear of the other arrows, with its box styled away. The spec's own transition of the method from such a state is still drawn red and crossed, with no ✕ state. The legend's red arrow ends in the ✕ too. The copied source has no ✕ states, as it has no error overlay. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
Clean-code review, addendum (37242d0: the rejected call into a ✕ state instead of a loop)
|
|
Codex review, round 4 (on 37242d0)
Declined: a spec would have to name a state Nothing else found; the loop ends here. |
In focus mode every arrow of the called method was red, including those from the states where the call is allowed, and the actual state had no arrow for the call at all, since the spec has none. Only facts from the spec and the verifier's error context are drawn, as #206 asks.
What changed
--lj-state-valid), arrow and label, with their guards. An unmet guard keeps its red text, so in A1_38resetfromopenis a green arrow with[marked(this)]in red.lj_rejected_<state>, box styled away) so that the layout keeps it clear of the other arrows. When the spec already has a transition of the method from such a state, that one is drawn red and crossed instead, with no ✕. No red arrow when the state of the receiver is unknown (A1_09).→ Where method() is allowedand→ ✕ The call, not allowed here, each only when on the diagram; the swatches are arrows.lj-call-allowed,lj-call-rejected(label, transition, marker),ljCallRejected(the ✕).Deviations from #206
Screenshots (focused State Machine tab)
resetwith the red guard)Not in scope: a hint's path (#156), which states are dimmed or collapsed (#170), the Verification tab.
Tests: 153 vitest tests pass (152 on main; one new: the call from a rejecting state drawn as the rejected call); the legend and focus tests adapted, the copy test also excludes the ✕ states. Lint and tsc clean.
Closes #206
🤖 Generated with Claude Code