Description
When a device type is deleted via removeDeviceTypeRaw, all placed devices of that type are removed from racks, but cables connected to ports on those devices are not cleaned up. This leaves dangling cable endpoint references in the layout.
Impact
Orphaned cable entries accumulate in the layout data, potentially causing errors during cable rendering or export. This is a pre-existing behavior.
Found By
CodeRabbit review of PR #1465 (round 1, mutators.ts:459)
Suggested Fix
Add cable cleanup to the DELETE_DEVICE_TYPE command (not the raw mutator, since cables need to be restored on undo).
Description
When a device type is deleted via
removeDeviceTypeRaw, all placed devices of that type are removed from racks, but cables connected to ports on those devices are not cleaned up. This leaves dangling cable endpoint references in the layout.Impact
Orphaned cable entries accumulate in the layout data, potentially causing errors during cable rendering or export. This is a pre-existing behavior.
Found By
CodeRabbit review of PR #1465 (round 1,
mutators.ts:459)Suggested Fix
Add cable cleanup to the
DELETE_DEVICE_TYPEcommand (not the raw mutator, since cables need to be restored on undo).