Skip to content

feat: port position validation for half-depth devices #254

@ggfevans

Description

@ggfevans

Parent Epic

Part of #71 (Network Interface Visualization and Connectivity)

Summary

Ensure interface port positions are valid for the device's depth configuration.

Problem Statement

  • Half-depth devices (is_full_depth: false) only occupy front OR rear face
  • Interfaces with position: 'rear' on a front-only device are invalid
  • Need validation and/or auto-correction

Acceptance Criteria

  • Add validation in Zod schema (custom refinement)
  • Warn user if port position conflicts with device depth
  • Consider: auto-assign position based on device face placement
  • Document behavior in SPEC.md

Validation Rule

// If device is half-depth and placed on front face:
// All interfaces should have position: 'front' (or undefined, defaulting to front)

Dependencies

References

  • Half-depth logic: src/lib/components/Rack.svelte line 176-183

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions