Skip to content

feat: extend undo/redo for interface and cable operations #268

@ggfevans

Description

@ggfevans

Parent Epic

Part of #71 (Network Interface Visualization and Connectivity)

Summary

Extend the undo/redo system to support interface and cable operations.

Current Undo Support

  • Device add/remove/move
  • Rack property changes
  • Layout settings changes

New Operations to Support

  • Add interface to device type
  • Remove interface from device type
  • Edit interface properties
  • Create cable
  • Delete cable
  • Edit cable properties
  • Bulk interface add

Technical Approach

Use existing history store pattern:

  • Snapshot relevant state before operation
  • Push to history stack
  • Restore on undo

Considerations

  • Device type changes affect all placements of that type
  • Cable deletion orphans connection data
  • Bulk operations should be single undo step

Acceptance Criteria

  • All interface operations undoable
  • All cable operations undoable
  • Bulk operations undo as single step
  • Redo works correctly
  • History limit respected (existing: 50 steps)

Dependencies

References

  • History store: src/lib/stores/history.svelte.ts

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions