Allow users to override mounted face on full depth devices
📋 Migrated from rackarr/rackarr#207 Originally created by @Idealcoder on 2025-12-25
Problem
I want to add custom devices with don't take up the full length of the rack.
Proposed solution
Allow the user to change the "Mounted Face" option from "Both" to "Front" or "Rear" on a device. It currently can't be changed from "Full" for a custom device.
Alternatives considered
I tried adding a custom device of type "Blank Panel". This is also stuck on "Full", which doesn't make sense for a Blank Panel!
How important is this to you?
Critical - blocking my use of Rackarr
I'd argue that the override should be possible for all devices, top to bottom, everywhere. If the user has particularly long or short rack and wants to stuff something behind another typically full-length device, they can do that irl and this app should make it possible to implement as well. Case in point: server can be custom-built by the user to be really short and fit PDU behind it - can't put that in the app though. This would likely deal with #151 (Should they do that - ehh debatable, but let 'em. Also cable arms when)
Case in point: server can be custom-built by the user to be really short and fit PDU behind it - can't put that in the app though.
100% agree. As an example in my rack (which is just one of those small network cabinets), I've got a bracket holding a bunch of RasPis sitting at the front, and a PDU behind it (among other stuff in the cabinet). No way to put that into the app which is a tad frustrating.
I just came here looking for this feature. Glad to see it's in progress. I wanted to model out my existing rack and require this feature to do it. Thanks!
I'd argue that the override should be possible for all devices, top to bottom, everywhere. If the user has particularly long or short rack and wants to stuff something behind another typically full-length device, they can do that irl and this app should make it possible to implement as well. Case in point: server can be custom-built by the user to be really short and fit PDU behind it - can't put that in the app though. This would likely deal with #151 (Should they do that - ehh debatable, but let 'em. Also cable arms when)
oh agreed - it will be. I worded this specifically because the main issue is that full-depth devices are where this issue is most problematic. Though thank you for emphasizing this, will make sure it does work as such.
Implementation Plan
Summary
Enable the "Mounted Face" dropdown for ALL devices, not just half-depth ones. Currently full-depth devices are locked to "both" - users should be able to override this to "front" or "rear".
Key Files
src/lib/components/EditPanel.svelte- Face selector (line ~537)
TDD Test Cases (Write First)
File: src/tests/EditPanel.test.ts - Add new tests:
describe('Mounted Face selector', () => {
it('face dropdown is enabled for full-depth devices', async () => {
// Setup: render EditPanel with a full-depth server selected
const { getByLabelText } = render(EditPanel, { /* props */ });
const faceSelect = getByLabelText('Mounted Face');
expect(faceSelect).not.toBeDisabled();
});
it('changing face on full-depth device updates layout', async () => {
// Setup: select a full-depth device
// Action: change face from "both" to "front"
// Assert: layout store reflects the change
});
it('face change is undoable', async () => {
// Setup: select device, change face
// Action: undo
// Assert: face reverts to original
});
});
File: src/tests/collision.test.ts - Verify existing face tests cover overrides:
it('full-depth device with overridden face allows opposite-face placement', () => {
// Place a server at U1 with face overridden to "front"
// Assert: can place another device at U1 with face "rear"
});
Implementation Steps
1. Remove disabled condition from EditPanel.svelte
File: src/lib/components/EditPanel.svelte
<!-- BEFORE (line ~537) -->
<select
id="device-face"
...
disabled={isFullDepthDevice}
>
<!-- AFTER -->
<select
id="device-face"
...
>
2. Update helper text
{#if isFullDepthDevice}
<p class="helper-text">Default: full-depth. Override if device is shorter than expected.</p>
{/if}
Files to Modify
src/tests/EditPanel.test.ts- Add face dropdown testssrc/lib/components/EditPanel.svelte- Removedisabled={isFullDepthDevice}, update helper text
Acceptance Criteria
- [ ] Face dropdown is enabled for all devices (including full-depth)
- [ ] Changing face on a full-depth device persists correctly
- [ ] Collision detection works with overridden face values
- [ ] Undo/redo works for face changes on full-depth devices
Related
- Depends on #151 being fixed first (blank panel bug) to ensure proper is_full_depth detection