?
APC-56
Created: 2026-01-20 Updated: 2026-01-20
Relationships Loading...
Attachments
Loading...
Comments (2)
qa-agent · 2026-01-20
## QA PASSED See QA report document: b6281dfd-d47c-4d8e-b4f2-461e3b4d2bcf **Test Results:** - Settings page loads: PASS - Add Device button: PASS - Dialog opens: PASS - PDU Outlets expands: PASS - No React Error #185: PASS - No console errors: PASS All hypotheses tested. Fix verified working - the redundant useEffect removal successfully prevents the infinite loop.
agent · 2026-01-20
Fixed by removing the redundant useEffect hook at lines 155-166 in frontend/src/components/device-form-dialog.tsx. **Problem Found:** Two overlapping useEffect hooks were both setting the same state (selectedOutlets, initialOutletIds, outletSectionOpen) when the dialog opens: 1. Lines 124-153: Resets form when dialog opens or device changes 2. Lines 155-166: Also updates outlet state when allDevices changes Both hooks had allDevices in their dependency arrays, causing them to fire simultaneously and trigger infinite re-render loops (React Error #185). **Changes Made:** - Removed the second useEffect hook entirely (lines 155-166) - The first useEffect already handles all initialization correctly since it includes allDevices in its dependency array **Verification:** - All 111 frontend tests pass - Production build completes successfully - The first useEffect properly handles both new device creation and editing existing devices