Repository navigation
State machine: green arrows where the call is allowed, red crossed arrow from the actual state - #207
CatarinaGamboa wants to merge 3 commits into
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
|
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 <noreply@anthropic.com>
|
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. |
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.✕ 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 (A1_09).setCompressionType +8 moreshares the green loop (see the deviation below).→ 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).Deviation from #206: a separate loop for the rejected call on a state that already has a spec loop (A1_01,
compressionNotExplicithassetCompressionMode) made ELK nest the second loop around the first one's label, and the rounding drew it as an ellipse across the diagram in TB. No state had two loops before, since methods between the same states share one edge, so the rejected call shares the state's loop, as the green call shares its loop with the other methods. In Show all the loop shows✕ setCompressionTypeoversetCompressionMode.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: 154 vitest tests pass (152 on main; two new: the call from a rejecting state drawn as the rejected call, and the rejected call on the state's existing loop); the legend and focus tests adapted. Lint and tsc clean.
Closes #206
🤖 Generated with Claude Code