Draw resolves: and generates: in the intent Glue & Outputs diagram - #6960
Merged
Conversation
…6954) The renderer knew nothing about either construct - neither word appeared in intent-diagrams.js - so a model whose automation lives in a register lookup and a few event-driven create-froms drew an ER diagram and nothing else. The BPMN correctly showed only the genuinely human steps, so the picture said the model did almost nothing. Two categories added to renderGlue(), on the existing card + edge pattern: - one card per `resolves:` entry, edged to the record it runs on and labelled with the to-one it fills, plus a second DASHED `reads` edge from the register it reads - the read direction on the picture rather than only in prose. It is the one card with two edges, hence the new optional `reads` on a category; - one card per `generates:` entry, edged to its source - or, when the source is foreign and so has no local node, to the local target it mints - labelled with its target, its trigger WITH the status guard, and its CARDINALITY. The cardinality is the point: two appending rules on one transition, side by side, is a defect that is obvious in a picture and nearly invisible in YAML. `normalize()` defaults both collections like the other twelve, and `cardLabel` now accepts an array of detail lines for a card whose binding needs two. A string detail renders exactly as before, so a model declaring neither construct is byte-identical to today. intent-diagrams.js is the shared renderer (`window.IntentDiagrams`), so the Builder shell gains the cards from the same change. IntentDiagramGlueIT is the guard, and only a browser can be: this is framework-free JavaScript over mxGraph, so every service behind it stays green whether or not a card is drawn. Its fixture is written straight into the workspace rather than cloned from a sample repository - the assertions are about the renderer, so the intent that feeds it belongs beside them, and the test needs no external repository merged first. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Fixes #6954.
The problem
renderGlue()ineditor-intent/js/intent-diagrams.jsdrew a card per form, report, notification, schedule, integration, inbound arrival, outbound departure and roll-up - and knew nothing aboutresolves:orgenerates:; neither word appeared in the file. For a model whose automation lives in those two, the BPMN correctly showed only the genuinely human steps and the diagram showed nothing else, so the picture said the model did almost nothing.The fix
Two categories on the existing card + edge pattern:
resolves:- one card per lookup, edged to the record it runs on, labelled with the moment and the to-one it fills (on create • sets driver), plus a second dashedreadsedge from the register it reads. It is the one card with two edges, hence the new optionalreadson a category descriptor.generates:- one card per create-from, edged to its source (or, when the source is foreign and therefore has no local node, to the local target it mints), labelled with its target, its trigger with the status guard, and its cardinality:→ Declaration/on transition Status == 2 • append. The cardinality is the point - two appending rules on one transition, side by side, is a defect that is obvious in a picture and nearly invisible in YAML.normalize()defaults both collections like the other twelve.cardLabelnow accepts an array of detail lines for a card whose binding needs two; a string detail renders exactly as before, so a model declaring neither construct is byte-identical to today.intent-diagrams.jsis the shared renderer (window.IntentDiagrams), so the Builder shell gains the cards from the same change.Test
IntentDiagramGlueIT- a browser test, because only a browser can catch this: the renderer is framework-free JavaScript over mxGraph, so every service behind it stays green whether or not a card is drawn. Its fixture (a fine identifying its driver from a vehicle-assignment register, then minting a declaration per identification and offering a notice on demand) is written straight into the workspace rather than cloned from a sample repository - the assertions are about the renderer, so the intent that feeds it belongs beside them, and the test needs no external repository merged first. It asserts, inside theGlue & Outputssection specifically, the lookup card +sets driver+ the register node + thereadsedge, the appending create-from's target/trigger/appendbadge, and the button-only one'sbutton.Verified locally, headless:
IntentDiagramGlueITgreen,formatter:validateclean on both touched modules.Noticed while in here, deliberately not changed
ICON.rollup = 'sap-icon--sum'does not exist in the shippedfundamental-styles0.38.0 icon font, so every roll-up card's badge renders as nothing. Pre-existing; a one-word fix but not this issue's scope.eventOf()handlesonCreate/onUpdate/onDeleteand the step axis, but notonTransitionoronPhase- whichnotifications:/integrations:/outbound:also accept. Such a card today gets an empty verb and no edge at all (eventEntityreturns null), so it floats unlabelled. Same family as this issue; fixing it would change the rendering of models that use those bindings, which is why it is reported rather than folded in.expansions,settlements,actions,postings,transitions,posts,aggregates,widgets.🤖 Generated with Claude Code