Symbol/pin editor safety: schema-constrained edits with net reference migration #3

Closed
opened 2026-02-16 21:46:53 -05:00 by Rbanh · 4 comments
Owner

Problem

Full symbol editing is now possible, but production safety requires stronger guardrails to prevent accidental net breakage and malformed pin tables.

Goal

Harden symbol/pin editing with robust validation and guided migrations.

Scope

  • Add inline validation errors per edited pin row.
  • Enforce unique pin names/numbers with actionable messages.
  • Add explicit migration preview before destructive pin removals/renames.
  • Preserve/refactor pin_ui mappings when pins are renamed.
  • Add optional pin reorder controls with stable offsets.

Acceptance Criteria

  • Invalid symbol edits cannot be applied.
  • Net reference migration outcomes are shown before commit.
  • No orphaned invalid refs after symbol edits.
  • JSON output remains schema-valid after all symbol/pin operations.
## Problem Full symbol editing is now possible, but production safety requires stronger guardrails to prevent accidental net breakage and malformed pin tables. ## Goal Harden symbol/pin editing with robust validation and guided migrations. ## Scope - Add inline validation errors per edited pin row. - Enforce unique pin names/numbers with actionable messages. - Add explicit migration preview before destructive pin removals/renames. - Preserve/refactor `pin_ui` mappings when pins are renamed. - Add optional pin reorder controls with stable offsets. ## Acceptance Criteria - Invalid symbol edits cannot be applied. - Net reference migration outcomes are shown before commit. - No orphaned invalid refs after symbol edits. - JSON output remains schema-valid after all symbol/pin operations.
Rbanh added this to the Phase 2 - Production Polish milestone 2026-02-16 21:47:20 -05:00
Author
Owner

Implemented another safety slice for Issue #3 in commit bb3edfd.

Shipped

  • Hardened pin migration behavior during symbol edits:
    • when pin names are renamed, instances[].properties.pin_ui keys are migrated from old pin name to new pin name across all instances of the symbol.
    • if both old/new keys exist, old key is removed to avoid duplicate stale state.
  • During symbol apply, stale pin_ui entries for removed pins are cleaned up across all instances using that symbol.
  • Improved symbol edit feedback to indicate when pin mappings were removed from metadata/nets.

Validation

  • Syntax checks pass.
  • Existing tests pass.

Remaining for Issue #3

  • Add inline per-row validation rendering (not just feedback text).
  • Add explicit migration preview UI before destructive symbol pin removals.
  • Add targeted regression tests for pin_ui migration cases.
Implemented another safety slice for Issue #3 in commit `bb3edfd`. ### Shipped - Hardened pin migration behavior during symbol edits: - when pin names are renamed, `instances[].properties.pin_ui` keys are migrated from old pin name to new pin name across all instances of the symbol. - if both old/new keys exist, old key is removed to avoid duplicate stale state. - During symbol apply, stale `pin_ui` entries for removed pins are cleaned up across all instances using that symbol. - Improved symbol edit feedback to indicate when pin mappings were removed from metadata/nets. ### Validation - Syntax checks pass. - Existing tests pass. ### Remaining for Issue #3 - Add inline per-row validation rendering (not just feedback text). - Add explicit migration preview UI before destructive symbol pin removals. - Add targeted regression tests for pin_ui migration cases.
Author
Owner

Implemented another validation-hardening slice for Issue #3 in commit c02b146.

Shipped

  • Added inline symbol editor validation UX:
    • per-row invalid highlighting (invalidRow) for malformed pin rows
    • inline validation text area in symbol editor (symbolValidation)
  • Validation now reports row-level issues for missing/invalid fields instead of only generic message.
  • Duplicate pin-name detection now highlights offending rows inline.
  • Validation state clears live while editing row fields.
  • Validation state clears on successful symbol apply.

Validation

  • Syntax checks pass.
  • Existing tests pass.

Remaining for Issue #3

  • Migration preview UI before destructive pin removals.
  • Optional per-row pin reorder UX and offset assist.
  • Add dedicated frontend regression tests for validation visuals/flow.
Implemented another validation-hardening slice for Issue #3 in commit `c02b146`. ### Shipped - Added inline symbol editor validation UX: - per-row invalid highlighting (`invalidRow`) for malformed pin rows - inline validation text area in symbol editor (`symbolValidation`) - Validation now reports row-level issues for missing/invalid fields instead of only generic message. - Duplicate pin-name detection now highlights offending rows inline. - Validation state clears live while editing row fields. - Validation state clears on successful symbol apply. ### Validation - Syntax checks pass. - Existing tests pass. ### Remaining for Issue #3 - Migration preview UI before destructive pin removals. - Optional per-row pin reorder UX and offset assist. - Add dedicated frontend regression tests for validation visuals/flow.
Author
Owner

Implemented a major symbol/pin safety pass in main via commit fcad4b2.

Delivered:

  • Added explicit Preview Migration flow in Symbol editor.
  • Added migration impact summary before commit (renames, removed pins, dropped net nodes, removed pin_ui entries, affected nets).
  • Added destructive-edit guardrail: Apply is blocked for destructive symbol edits unless migration preview has been acknowledged for the current draft.
  • Added unique pin-number validation (in addition to unique names) with inline row highlights and actionable messages.
  • Added pin reorder controls (Up/Down) in symbol pin rows.
  • Any symbol/pin-row/body edits invalidate prior migration acknowledgment and require re-preview.

Validation:

  • npm test passes after changes.
Implemented a major symbol/pin safety pass in `main` via commit `fcad4b2`. Delivered: - Added explicit `Preview Migration` flow in Symbol editor. - Added migration impact summary before commit (renames, removed pins, dropped net nodes, removed `pin_ui` entries, affected nets). - Added destructive-edit guardrail: Apply is blocked for destructive symbol edits unless migration preview has been acknowledged for the current draft. - Added unique pin-number validation (in addition to unique names) with inline row highlights and actionable messages. - Added pin reorder controls (Up/Down) in symbol pin rows. - Any symbol/pin-row/body edits invalidate prior migration acknowledgment and require re-preview. Validation: - `npm test` passes after changes.
Author
Owner

Final closure summary:

  • Symbol/pin editing now enforces schema-like constraints with inline row validation.
  • Unique pin names and numbers enforced.
  • Destructive symbol edits require explicit migration preview/ack.
  • Pin rename migration preserves/refactors pin_ui and net references; pin reorder controls added.

Key commits: c02b146, fcad4b2, bb3edfd.

Final closure summary: - Symbol/pin editing now enforces schema-like constraints with inline row validation. - Unique pin names and numbers enforced. - Destructive symbol edits require explicit migration preview/ack. - Pin rename migration preserves/refactors `pin_ui` and net references; pin reorder controls added. Key commits: `c02b146`, `fcad4b2`, `bb3edfd`.
Rbanh closed this issue 2026-02-18 21:03:08 -05:00
Sign in to join this conversation.
No Label
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Rbanh/schemeta#3
No description provided.