diff --git a/PROMPT.md b/PROMPT.md index cd4bf8e..c511d45 100644 --- a/PROMPT.md +++ b/PROMPT.md @@ -569,25 +569,30 @@ pub fn list_files(path: &str) -> Result, String> { --- -## Final Steps Before Commit +## COMPILATION POLICY - CRITICAL -```bash -# Check for warnings -cargo check 2>&1 | grep warning +**NEVER compile during development. NEVER run `cargo build` or `cargo check`. Use static analysis only.** -# Audit dependencies (must be 0 warnings) -cargo audit +### Workflow -# Build both modes -cargo build -cargo build --features desktop +1. Make all code changes +2. Use `diagnostics` tool for static analysis (NOT compilation) +3. Fix any errors found by diagnostics +4. **At the end**, inform user what needs restart -# Verify no dead code with _ prefixes -grep -r "let _" src/ --include="*.rs" +### After All Changes Complete -# Verify no CDN references -grep -r "unpkg.com\|cdnjs\|jsdelivr" ui/ -``` +| Change Type | User Action Required | +|-------------|----------------------| +| Rust code (`.rs` files) | "Recompile and restart **botui**" | +| HTML templates (`.html` in ui/) | "Browser refresh only" | +| CSS/JS files | "Browser refresh only" | +| Askama templates (`.html` in src/) | "Recompile and restart **botui**" | +| Cargo.toml changes | "Recompile and restart **botui**" | + +**Format:** At the end of your response, always state: +- ✅ **No restart needed** - browser refresh only +- 🔄 **Restart botui** - recompile required --- diff --git a/src/ui_server/mod.rs b/src/ui_server/mod.rs index 1560994..a62797b 100644 --- a/src/ui_server/mod.rs +++ b/src/ui_server/mod.rs @@ -56,6 +56,11 @@ const SUITE_DIRS: &[&str] = &[ "goals", "player", "canvas", + "people", + "crm", + "billing", + "products", + "tickets", ]; pub async fn index() -> impl IntoResponse { diff --git a/ui/suite/admin/index.html b/ui/suite/admin/index.html index 65e25e4..817676b 100644 --- a/ui/suite/admin/index.html +++ b/ui/suite/admin/index.html @@ -1,3 +1,5 @@ + +
- - + + diff --git a/ui/suite/analytics/analytics.html b/ui/suite/analytics/analytics.html index a114e9a..46810e3 100644 --- a/ui/suite/analytics/analytics.html +++ b/ui/suite/analytics/analytics.html @@ -1,3 +1,5 @@ + +
@@ -534,6 +536,6 @@
- - + +
diff --git a/ui/suite/attendant/index.html b/ui/suite/attendant/index.html index dfd0846..dd95601 100644 --- a/ui/suite/attendant/index.html +++ b/ui/suite/attendant/index.html @@ -1,5 +1,5 @@ - + @@ -572,4 +572,4 @@ - + diff --git a/ui/suite/billing/billing.html b/ui/suite/billing/billing.html index 5955d9a..9a1928d 100644 --- a/ui/suite/billing/billing.html +++ b/ui/suite/billing/billing.html @@ -1,7 +1,7 @@ - +
@@ -9,26 +9,62 @@

Billing

@@ -42,47 +78,111 @@
- - + + +
- Pending - $0 + Pending + $0
- - - + + + +
- Overdue - $0 + Overdue + $0
- Paid This Month - + Paid This Month +
- - + + +
- Revenue This Month - $0 + Revenue This Month + $0
@@ -91,23 +191,64 @@
- + + + + + + - + + + +
- +
@@ -122,7 +263,11 @@ - +
Actions
@@ -132,18 +277,49 @@
- + + + + + +
- @@ -160,8 +336,11 @@ Actions - - +
@@ -169,18 +348,49 @@
- + + + + + +
- @@ -198,8 +408,11 @@ Actions - - +
@@ -213,44 +426,56 @@
diff --git a/ui/suite/calendar/calendar.html b/ui/suite/calendar/calendar.html index fc2bcf4..5200867 100644 --- a/ui/suite/calendar/calendar.html +++ b/ui/suite/calendar/calendar.html @@ -1,3 +1,5 @@ + +
diff --git a/ui/suite/canvas/canvas.html b/ui/suite/canvas/canvas.html index 2f7d48a..6eb2a0d 100644 --- a/ui/suite/canvas/canvas.html +++ b/ui/suite/canvas/canvas.html @@ -7,58 +7,128 @@
@@ -252,13 +435,15 @@
@@ -266,727 +451,998 @@ diff --git a/ui/suite/crm/crm.html b/ui/suite/crm/crm.html index 4cc9f50..8f4a5bb 100644 --- a/ui/suite/crm/crm.html +++ b/ui/suite/crm/crm.html @@ -1,7 +1,7 @@ - +
diff --git a/ui/suite/dashboards/dashboards.html b/ui/suite/dashboards/dashboards.html index 1f8b6bb..88beb6a 100644 --- a/ui/suite/dashboards/dashboards.html +++ b/ui/suite/dashboards/dashboards.html @@ -1,3 +1,5 @@ + +
diff --git a/ui/suite/designer.html b/ui/suite/designer.html index 622a8e9..9ab723a 100644 --- a/ui/suite/designer.html +++ b/ui/suite/designer.html @@ -1747,6 +1747,11 @@ const toolboxItems = document.querySelectorAll('.toolbox-item'); const canvas = document.getElementById('canvas-inner'); + if (!canvas) { + console.warn('initDragAndDrop: canvas-inner not found'); + return; + } + toolboxItems.forEach(item => { item.addEventListener('dragstart', (e) => { e.dataTransfer.setData('nodeType', item.dataset.nodeType); @@ -1779,6 +1784,11 @@ const canvas = document.getElementById('canvas'); const container = document.getElementById('canvas-container'); + if (!canvas || !container) { + console.warn('initCanvasInteraction: canvas or canvas-container not found'); + return; + } + // Pan with middle mouse or space+drag let isPanning = false; let panStart = { x: 0, y: 0 }; @@ -2295,6 +2305,11 @@ const canvas = document.getElementById('canvas'); const contextMenu = document.getElementById('context-menu'); + if (!canvas || !contextMenu) { + console.warn('initContextMenu: canvas or context-menu not found'); + return; + } + canvas.addEventListener('contextmenu', (e) => { e.preventDefault(); const nodeEl = e.target.closest('.node'); @@ -2312,7 +2327,10 @@ } function hideContextMenu() { - document.getElementById('context-menu').classList.remove('visible'); + const menu = document.getElementById('context-menu'); + if (menu) { + menu.classList.remove('visible'); + } } // Context Menu Actions @@ -2353,14 +2371,20 @@ // Modal Management function showModal(id) { - document.getElementById(id).classList.add('visible'); - if (id === 'open-modal') { - htmx.trigger('#file-list-content', 'load'); + const modal = document.getElementById(id); + if (modal) { + modal.classList.add('visible'); + if (id === 'open-modal') { + htmx.trigger('#file-list-content', 'load'); + } } } function hideModal(id) { - document.getElementById(id).classList.remove('visible'); + const modal = document.getElementById(id); + if (modal) { + modal.classList.remove('visible'); + } } // Save Design @@ -2579,7 +2603,10 @@ } function hideMagicPanel() { - document.getElementById('magic-panel').classList.remove('visible'); + const panel = document.getElementById('magic-panel'); + if (panel) { + panel.classList.remove('visible'); + } } async function analyzeMagicSuggestions() { diff --git a/ui/suite/docs/docs.html b/ui/suite/docs/docs.html index 30493cc..35a62cf 100644 --- a/ui/suite/docs/docs.html +++ b/ui/suite/docs/docs.html @@ -1,3 +1,5 @@ + +
diff --git a/ui/suite/index.html b/ui/suite/index.html index a402a6b..9872ae2 100644 --- a/ui/suite/index.html +++ b/ui/suite/index.html @@ -10,35 +10,37 @@ /> - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + @@ -53,6 +55,9 @@ + + + diff --git a/ui/suite/monitoring/logs.html b/ui/suite/monitoring/logs.html index 2facead..92c35a2 100644 --- a/ui/suite/monitoring/logs.html +++ b/ui/suite/monitoring/logs.html @@ -1,5 +1,5 @@ - +
diff --git a/ui/suite/monitoring/metrics.html b/ui/suite/monitoring/metrics.html index b8d3faf..76189c5 100644 --- a/ui/suite/monitoring/metrics.html +++ b/ui/suite/monitoring/metrics.html @@ -1,5 +1,5 @@ - +
diff --git a/ui/suite/monitoring/monitoring.html b/ui/suite/monitoring/monitoring.html index cb139d8..c84a73e 100644 --- a/ui/suite/monitoring/monitoring.html +++ b/ui/suite/monitoring/monitoring.html @@ -1,3 +1,5 @@ + +

@@ -1374,7 +1376,6 @@ hx-swap="innerHTML" >

- - - + +
diff --git a/ui/suite/monitoring/resources.html b/ui/suite/monitoring/resources.html index 0057c0a..62233d9 100644 --- a/ui/suite/monitoring/resources.html +++ b/ui/suite/monitoring/resources.html @@ -1,5 +1,5 @@ - +
diff --git a/ui/suite/monitoring/services.html b/ui/suite/monitoring/services.html index ddaa28c..866cebf 100644 --- a/ui/suite/monitoring/services.html +++ b/ui/suite/monitoring/services.html @@ -1,10 +1,14 @@ + +
-
+
-- Running @@ -24,14 +28,23 @@
-
-
+
@@ -78,7 +105,14 @@

Service Details

@@ -36,33 +50,83 @@