Skip to content

etherscan-flow: allow canvas-authored pinned on case nodes - #17

Merged
homeyong merged 1 commit into
mainfrom
flow-schema-pinned
Oct 19, 2026
Merged

homeyong merged 1 commit into
mainfrom
flow-schema-pinned

Conversation

@homeyong

Copy link
Copy Markdown
Collaborator

Why

Etherscan Flow (BlockSolutions/BlockEtherV3#3689) adds pin position: a user can lock a card so it keeps its x/y through dragging and Tidy Up. The canvas saves this as nodes[].pinned: true, because a pin is case data, like the coordinates it protects.

The node definition in case.schema.json is additionalProperties: 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 writing false).
  • schema/test_validate.py: regression test. true passes; false, "true" and 1 are rejected.
  • references/output-spec.md, README.md: note that node pinned is reserved for Etherscan Flow, next to the existing _meta.ui note.

Additive and optional: every case the tracer produces today still validates, so schemaVersion stays 1.

Verified locally

  • python schema/validate.py: example ok
  • python -B -m unittest discover -s schema -p 'test_*.py': 34 tests OK
  • python -B -m unittest discover -s tests -p 'test_*.py': 19 tests OK

🤖 Generated with Claude Code

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>
@homeyong
homeyong merged commit 91f96cf into main Oct 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant