Conversation
A catalogue member was invisible to calm diff. Adding or removing one reported no change at all, and hasChanges stayed false, so calm diff --exit-code passed. An unchanged member appeared in no bucket, so the Hub painted it with no diff status. The catalogue is a choice block, so it is read as one more declaration source and expandAlternatives flattens it into the existing partition. Members land in the buckets that already exist. No new buckets, no change to NodeChange or hasChanges. An items schema that declares a node directly is not read, matching validation and the pattern renderer. The allOf traversal was written for prefixItems only, so it becomes findField, which takes what the caller is after. Reporting a change in obligation is out of scope and filed as finos#3111. It reproduces on main with no items involved.
YoofiTT96
force-pushed
the
feat/2859-vscode-picker-items
branch
from
September 15, 2026 22:05
5979c49 to
83089e7
Compare
28 tasks
YoofiTT96
marked this pull request as ready for review
September 18, 2026 11:11
This branch has not been deployed
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.
Description
A pattern may declare nodes and relationships under
itemsas well asprefixItems. The VS Code pattern picker read onlyprefixItems, so choosing a pattern with a catalogue produced a starter architecture with the catalogue nodes missing and nothing said why.The picker is a scaffold, not
calm generate. It asks nothing, takes the first alternative wherever a pattern offers a choice, and fills unpinned strings with[[PLACEHOLDER]]. A catalogue now gets exactly that treatment, so one member lands on the canvas for the author to edit, copy or delete.Part of #2859.
PR sequence
Five stacked PRs, each reviewable alone, in this order:
prefixItemsalternatives — the pre-existing gaps that had to be fixed firstitemsin pattern validationitemsin generationitemsin the pattern diagramitemsin the VS Code pattern pickerGitHub will not let a cross-fork PR target a branch in my fork, so all of them sit on
mainand each diff carries the ones below it. The commit to review here is the last one.The decision worth knowing
A catalogue counts as a declaration site only when it carries
oneOforanyOf.itemsapplies one schema to every position after the entries, so a member declared directly there is not a choice and stays unread — the same linePATTERN-DECISIONS.mddraws, and the same one validation, generation and the diagram already draw.That leaves the change at one helper.
instantiateNodealready recurses into the first alternative, so a catalogue reuses the existing path rather than adding a second branch.Why the move out of the JSX
vitest.config.tssetsenvironment: 'node', so the package cannot render a React component in a test, andinstantiateFromPatternwas module-private insidePatternPicker.tsx. It moves unchanged intopattern-instantiation.ts, matching theBuildingBlockCreator.tsx/building-block-doc.tspair beside it. The move is most of the line count in the diff and changes no behaviour.Gotcha
This makes a catalogue reachable from the picker; it does not add a decision UI. The picker still takes the first alternative of a
prefixItemsdecision and of a catalogue, and it still scaffolds one catalogue member rather than several. That heuristic predates this PR and now applies at one more site.Separately, the extension runs no pattern validation at all — it depends on
@finos/calm-modelsand Ajv, not on@finos/calm-shared, andvalidateCalmArchitecturechecks an architecture against the CALM meta-schema. The rules in #3060 reach the CLI and not the editor. That gap is older than #2859 and is not addressed here.Type of Change
Additive. A pattern that uses no
itemsscaffolds exactly as before.Affected Components
cli/)calm/)calm-ai/)calm-hub/)calm-hub-ui/)calm-server/)calm-widgets/)docs/)shared/)calm-plugins/vscode/)Commit Message Format ✅
feat(vscode): instantiate items catalogues in the pattern pickerTesting
Eight tests in a new
pattern-instantiation.test.ts, the first tests this logic has had. They cover a positional entry, the first alternative of aprefixItemsdecision, a catalogue member landing after the positional entries, ananyOfcatalogue, a catalogue relationship, anitemsblock that declares a node directly, anitemsblock that only holds a$ref, and an empty pattern.Mutation-tested twice. Stop reading the catalogue and three of the eight fail. Drop the
oneOf/anyOfguard and one fails.Before the change, a pattern declaring
gatewayand apostgres/mysqldecision positionally, with acache/queuecatalogue, scaffoldedgatewayandpostgresonly. It now also scaffoldscache.calm-plugins/vscodepasses 15 files and 163 tests. Lint reports 0 errors and 5 warnings, all pre-existing in other files. The extension builds clean.Checklist
🤖 Generated with Claude Code