Repository navigation
etherscan-flow: allow canvas-authored pinned on case nodes - #17
Merged
Merged
Conversation
Etherscan Flow now lets a user pin a card so it keeps its x/y through dragging and Tidy Up, and saves that as nodes[].pinned: true. The node schema is additionalProperties: false, so every exported case with a pin failed validation. Add pinned as an optional const-true field reserved for the canvas (the tracer never emits it; absent means unpinned), with a regression test and a note in the output spec and README. Co-Authored-By: Claude Opus 5.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.
Why
Etherscan Flow (BlockSolutions/BlockEtherV3#3689) adds pin position: a user can lock a card so it keeps its
x/ythrough dragging and Tidy Up. The canvas saves this asnodes[].pinned: true, because a pin is case data, like the coordinates it protects.The node definition in
case.schema.jsonisadditionalProperties: false, so any saved or exported case with a pinned card currently fails validation against the published schema.Change
schema/case.schema.json: nodes accept an optional"pinned": { "const": true }, documented as canvas-only. The tracer never emits it, and absent means unpinned (the canvas deletes the field on unpin instead of writingfalse).schema/test_validate.py: regression test.truepasses;false,"true"and1are rejected.references/output-spec.md,README.md: note that nodepinnedis reserved for Etherscan Flow, next to the existing_meta.uinote.Additive and optional: every case the tracer produces today still validates, so
schemaVersionstays1.Verified locally
python schema/validate.py: example okpython -B -m unittest discover -s schema -p 'test_*.py': 34 tests OKpython -B -m unittest discover -s tests -p 'test_*.py': 19 tests OK🤖 Generated with Claude Code