Repository navigation
Sync ako/mxcli: flow-graph geometry — note sides, loop/handler/parameter pitch, merges, per-outcome CASE @anchor - #1620
Merged
Merged
Conversation
Every AnnotationFlow was written 2 -> 0 (note bottom -> element top), so a note below its activity drew its line out of its own bottom edge and round both boxes. The builder now picks the facing sides once every object has its final position, the writer writes them, and the reader carries stored sides so a Studio Pro-drawn line survives a rewrite. The rule is Studio Pro's, measured on 523 distinct Studio Pro-drawn note lines: the element side follows vertical-then-horizontal separation in 98%, and notes use the activity numbering (a note left of its activity stores 1 -> 3), not the separate numbering the issue proposed. Refs #1508 (case 2), mendixlabs#1598 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
measureLoopStatement left out the 100px iterator column addLoopStatement reserves on a foreach loop's left, so an IF holding a loop measured its branch 100px short and put its merge inside the loop box (loop 790..1110, merge 1050..1090), with the loop's outgoing line running right to left. Both now use one LoopIteratorSpace constant. Refs #1508 (case 4), mendixlabs#1598 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each decision's false branch walked round the loop's back edge into the decision itself and on into its true branch, so its return counted as shared: describe printed one 'NOT equivalent ... must not be re-executed' warning per decision and lint raised MDL-FLOW01 as often, for a flow whose describe -> exec writes nothing. A branch walk now stops at its own split. A crossing diamond inside a loop stays Interleaved. Refs #1277, mendixlabs#923 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The layout syntax topic said @anchor names 'which SIDE each end of the outgoing flow attaches to'. The builder has always applied from: to the flow leaving the statement and to: to the flow arriving at it, so an author following the help got the edge into the next statement entering on the left (an S-curve in Studio Pro) while describe echoed the authored sides. The help, its example, the AST comments and the microflow skill now say what is implemented, and give the two-statement recipe for a straight vertical edge. Refs #1279, mendixlabs#990 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
'join finish; merge finish;' builds a merge only one path enters, and describe walked through it and warned that re-executing the description deleted it. On the main line it is now described as written (join junction1; merge junction1;), so the description rebuilds it and there is nothing to warn about. In a branch or loop body it is still walked through, and the warning now says what is true: create or modify keeps the merge, a rebuild removes it. Verified on PedApp 11.13.0: main binary 1 warning, fixed 0; describe -> exec reports Unchanged as modify and as replace; 3 merges before and after. Refs #1277, mendixlabs#923 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The merge a fall-through handler rejoins at was placed from the layout cursor, which by then has moved past the successor: it landed on the end event (merge 560;200 over end 560;200) or right of the next activity, with the edge into it running backwards. It now sits midway between the guarded activity's right edge and its successor's left edge, on the successor's line; @merge still places it explicitly. The merge two paths into one end event get is placed the same way. Verified on PedApp 11.13.0: main 560;200, fixed 425;200. Refs #1273, mendixlabs#884 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A handler row was centred 90px under its activity, inside the output variable and type Studio Pro prints under the box, and a handler in a THEN branch overlapped the ELSE row (+90 against +100). Handler rows now sit 130px under their activity - the median of 160 Studio Pro-authored handler rows - and the measurer counts the row, so an ELSE row goes below it. Refs #1508 (case 3), mendixlabs#1598 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Parameters without @position were written 100px apart whatever their names, so 20-22 character names overlapped. The row is now spaced at about 7px a character of the widest name, rounded up to 10px and never under 100px, fitted to 95 Studio Pro-authored parameter rows. Names under 15 characters keep the old row, and the old 100px row still reads as derived, so a flow an earlier mxcli wrote is re-spaced rather than pinned. Refs #1508 (case 5), mendixlabs#1598 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A CASE stored each outcome's side by WHEN order alone, and MDL had no way to say otherwise: @anchor(A: (from: right)) was refused with MDL092, and @anchor(from: right) or true:/false: on a CASE were accepted and ignored. @anchor(from: bottom, Open: (from: right), (empty): (from: bottom, to: top)) case $Order/Status ... sets one outcome's edge per entry ((empty) and keyword values included), and the CASE's own from: is the flow leaving its merge, as on an IF. Describe writes an entry only where the stored side differs from the builder's default, so an ordinary CASE stays annotation-free and a Studio Pro-drawn one keeps its sides through describe -> exec. A key that names no WHEN value, true:/false: on a CASE, or a value key off a CASE is MDL092. The WHEN-order default stays for up to three outcomes: describe reads the case order back from it. Refs #1492, mendixlabs#1587 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both branches end the iteration, so the merge joined nothing and had no way out; Studio Pro authors delete it by hand and every re-run drew it again. At a loop or while tail the builder now leaves it out, also for an IF/ELSE ending a branch of that IF. An empty branch, a continuing error handler or an explicit @merge keeps it, and describe states @merge for a stored merge with no way out, so a rebuild keeps one an earlier mxcli wrote. Verified: PedApp 11.13 with the shape has the same mx check error set as the pristine copy, and Studio Pro 11.15's ped_check_errors reports none. Refs #1273, mendixlabs#884 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adding @annotation(…, position: (1500, 600)) to one statement of a described flow spliced it in as a replacement whose box ran from the activity to the note: the note was stored at x 3390 and every later activity shifted by 1180px (a size-only note: 140..280px). A note now takes no room on the line it documents, an unplaced note moves with its activity, and a note at a stated position stays where the script puts it. Verified on PedApp 11.13: main binary $E 2410 -> 3590 and the note at 3390;600; fixed, nothing moves and the note is at 1500;600. Refs #1508 (case 1), mendixlabs#1598 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…carry meaning Synthesised from this cluster's findings: settle a side or pitch from Studio Pro's own documents, find every reader before changing a default (CASE sides encode WHEN order), state a node the builder no longer draws, and keep notes out of a splice's room. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix: flow-graph-geometry cluster — note sides, loop/handler/parameter pitch, merges, CASE outcome anchors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Syncs
ako/mxcli:maininto upstream: 12 commits from fork PR ako#1528. It fixes the flow-graph-geometry cluster: canvas positions, sides and merges that mxcli wrote differently from what a Studio Pro author would draw, and the describe and lint warnings around them.Each defect has its own commit with a failing-first test, a control run, a
mdl-examples/bug-tests/flow-geometry-*.mdlscript and a finding.Fixes #884, #923, #990 and #1587. Fixes cases 1–5 of #1598; case 6 is open, see "Not done here".
Fixes
2 → 0, so a note below its activity drew its line out of its own bottomwhile truewith early returns gave three "NOT equivalent" warnings and three MDL-FLOW01 hits for a lossless flow@anchorhelp said "each end of the outgoing flow", butto:is the flow arrivingjoin finish; merge finish;) and warned that re-exec deletes it, which is no longer truejoin junctionN; merge junctionN;. Elsewhere the warning now says what is true560;200over560;200), or right of the next activity@mergestill winsErrorHandlerPitchis now 130, Studio Pro's median, and the layout counts the handler row@anchor(A: (from: right))was refused (MDL092), andfrom:on a CASE was ignored@anchor(A: (from: right), (empty): (…))sets sides per outcome. CASEfrom:is the merge exit, describe round-trips only non-default sides, and MDL092 reports bad keys@mergekeeps one, and describe states a stored oneThe
@anchorper-outcome form is new MDL syntax. It covers grammar, visitor, builder, describe,mxcli syntax microflow.layout,MDL_QUICK_REFERENCE.md, the docs site, the skill, and the doctype example (02c, pattern 7). The generated parser is not committed.Evidence
The conventions were measured, not assumed, from Studio Pro-authored documents:
1 → 3/3 → 1, which only the activity numbering explains.Controls. Every test fails with the reported symptom when its fix is reverted. End-to-end on an 11.13 app, comparing
mainand this branch:1070;200(inside the box 790..1110)1170;200560;200, the End event425;200$E2410→3590, note3390;6001500;600while truetest microflowsmx check: app copies with every new bug-test script and the full 02c doctype file give the same error set as the pristine copy.
Studio Pro 11.15.0-rc.4, via MCP:
ped_check_errorsreports nothing for the loop merge, the parameter rows, the note lines, the CASE flows or the loop-tail flow. Studio Pro stores exactly the positions this branch writes.make build,make test,make lint,make check-mdlandmake check-findingspass, anddocs-wiki/bug-patterns/flow-graph-geometry.mdis synced.Not done here
@anchorhas no effect over--mcp. This is a separate follow-up.@mergeon CALL WEB SERVICE is still ignored