7.6 KiB
7.6 KiB
LCD Builder UI - Bug Summary & Quick Reference
🔴 CRITICAL BUGS (7) - Blocks Core Functionality
Bug #1: Properties Panel Form Changes Not Applied
User Flow: Select Widget → Edit Properties → Click Apply
Status: ❌ BROKEN - Changes don't persist
Root: applyPropertiesFromForm() updates widget object but form doesn't
properly validate and apply all fields
Impact: Users can't modify widget properties - core feature broken
Fix Time: 1-2 hours
Bug #2: Custom Pages Not Saved to Device
User Flow: Create Page → Page appears → Refresh → Page gone
Status: ❌ BROKEN - Pages only in memory, never sent to backend
Root: addPageButton click handler adds to pagesCache but never calls
/api/pages POST endpoint to persist to /pages.json
Impact: All custom pages lost on refresh/reboot - data loss
Fix Time: 1-2 hours
Bug #3: Palette Drag-Drop to Canvas Doesn't Work
User Flow: Drag widget from palette → Drop on canvas → Create widget
Status: ❌ BROKEN - Drag handlers exist but canvas has no drop handler
Root: bindPalette() sets up drag start/end but bindCanvasEvents()
missing dragover/drop handlers
Impact: Primary way to add widgets doesn't work - 50% of create workflow
Fix Time: 1-2 hours
Bug #4: Delete/Copy/Paste Buttons Have No Implementation
User Flow: Select widget → Click Delete/Copy/Paste → Action happens
Status: ❌ BROKEN - Buttons click but handlers are empty
Root: Event listeners attached but callback functions are empty/missing
Impact: Can't manage widgets on canvas, workflow blocked
Fix Time: 2-3 hours
Bug #5: Undo/Redo Buttons Have No Implementation
User Flow: Make changes → Click Undo → Change reversed
Status: ❌ BROKEN - History tracking not implemented
Root: No state snapshots recorded, undo/redo stacks not managed
Impact: Users can't recover from mistakes
Fix Time: 2-3 hours
Bug #6: Canvas Drag-Drop Widget Position Not Tracked
User Flow: Click widget → Drag to new position → Widget follows cursor
Status: ❌ BROKEN - Selection works, dragging doesn't move widget
Root: mousedown sets drag flags but mousemove handler doesn't track
position, no mouseup handler to end drag
Impact: Can't move existing widgets on canvas
Fix Time: 2 hours
Bug #7: Deploy to LCD Doesn't Verify Success
User Flow: Click Deploy → Widgets sent to LCD → Verify rendering
Status: ❌ BROKEN - Shows success but doesn't verify data written
Root: deployOverlay() assumes success after API call completes,
no read-back verification
Impact: User can't tell if deploy actually worked
Fix Time: 1-2 hours
🟠 MAJOR BUGS (4) - Functional Issues
| # | Bug | Impact | Fix Time |
|---|---|---|---|
| 8 | Page dropdown/list out of sync | UI confusion | 1-2 hrs |
| 9 | Widget rendering doesn't match presets | Visual issues | 1-2 hrs |
| 10 | No input validation on properties | Invalid values break UI | 2-3 hrs |
| 11 | No loading states during API calls | UX feels broken | 1-2 hrs |
🟡 MINOR BUGS (5) - UX Polish
| # | Bug | Impact | Fix Time |
|---|---|---|---|
| 12 | No minimum size constraints | Invisible widgets | 30 min |
| 13 | No delete confirmation | Accidental data loss | 30 min |
| 14 | Binding list unorganized | Hard to find values | 1 hr |
| 15 | No hover tooltips | Poor discoverability | 1 hr |
| 16 | No export/import feature | Can't backup pages | 2 hrs |
📊 Implementation Priority
Phase 1: Core Fixes (P0 Critical)
├─ Bug #1: Properties apply ................... 2 hours
├─ Bug #3: Palette drag-drop ................. 2 hours
├─ Bug #4: Delete/Copy/Paste ................. 3 hours
├─ Bug #5: Undo/Redo ......................... 3 hours
├─ Bug #6: Canvas drag tracking .............. 2 hours
├─ Bug #2: Custom page persistence ........... 2 hours
└─ Bug #7: Deploy verification ............... 2 hours
TOTAL: 16 hours → Builder becomes usable
Phase 2: Robustness (P1 Major)
├─ Bug #8: Page sync ......................... 1 hour
├─ Bug #9: Widget rendering .................. 2 hours
├─ Bug #10: Input validation ................. 3 hours
└─ Bug #11: Loading states ................... 2 hours
TOTAL: 8 hours → Builder becomes reliable
Phase 3: Polish (P2/P3)
├─ Bugs #12-16: Minor UX fixes ............... 5 hours
├─ Feature: Binding system ................... 8 hours
├─ Feature: Widget groups .................... 6 hours
└─ Feature: Export/Import .................... 4 hours
TOTAL: 23 hours → Builder becomes powerful
🧪 Testing Checklist
Before builder is considered "working":
Core Functionality
- Create custom page
- Delete custom page
- Load custom page
- Add widget from palette (click)
- Add widget from palette (drag-drop)
- Select widget on canvas
- Move widget by dragging
- Delete widget
- Copy widget
- Paste widget
- Undo last action
- Redo action
Properties & Editing
- Select widget shows properties
- Edit X position works
- Edit Y position works
- Edit Width/Height works
- Edit text works
- Edit colors work
- Changes apply immediately
- Changes appear in preview
Data Persistence
- Custom page saves to device
- Page still exists after refresh
- Overlay widgets persist after deploy
- Widgets render on LCD after deploy
- Custom page survives device reboot
UI/UX
- Loading states shown during API calls
- Error messages clear and helpful
- Page list synced with dropdown
- All widget types render correctly
- Bindings show available values
- Live preview updates in real-time
📋 Code Locations & Key Functions
Main Issues:
-
Properties Form →
builder.js:650-820buildPropertyForm()- Generates form ✓applyPropertiesFromForm()- Applies changes ❌
-
Custom Pages →
builder.js:314-328- Button handler adds to cache but missing API save ❌
-
Canvas Drag-Drop →
builder.js:197-280bindCanvasEvents()- Missing drop handler ❌bindPalette()- Drag start/end exist ✓
-
Canvas Position Tracking →
builder.js:210-228mousedownhandler exists ✓mousemovehandler incomplete ❌mouseuphandler missing ❌
-
Toolbar Buttons →
builder.js:240-280- Delete/Copy/Paste listeners exist but callbacks empty ❌
- Undo/Redo listeners exist but callbacks empty ❌
-
Deploy Function →
builder.js:414-430- Calls API but no verification ❌
🎯 Next Steps
- Read this document to understand current state ✓
- Go to Phase 1 implementation in LCD_BUILDER_FIXES_PHASE1.md (to be created)
- Fix bugs in order - each fix is small, manageable chunks
- Test after each fix - verify it works before moving to next
- After Phase 1 - builder becomes usable
- Phases 2-3 - add robustness and polish
📝 Files Modified
LCD_BUILDER_AUDIT_FINDINGS.md- Full detailed audit report- This file - Quick reference and summary
- Next:
LCD_BUILDER_FIXES_PHASE1.md- Implementation guide for P0 bugs
💡 Key Insight
The good news: This isn't a rewrite. Most code exists and is correct. The bugs are incomplete implementations where code was started but not finished. Each fix is contained and doesn't require major refactoring.
Expected outcome: After 16 hours of Phase 1 fixes, the LCD builder will be fully functional and usable for creating and editing pages.