diff --git a/docs/plans/current_spec.md b/docs/plans/current_spec.md.bak similarity index 100% rename from docs/plans/current_spec.md rename to docs/plans/current_spec.md.bak diff --git a/docs/plans/ui_ux_bugfixes_spec.md b/docs/plans/ui_ux_bugfixes_spec.md new file mode 100644 index 00000000..331c9c23 --- /dev/null +++ b/docs/plans/ui_ux_bugfixes_spec.md @@ -0,0 +1,525 @@ +# 📋 Plan: UI/UX and Backend Bug Fixes - Multi-Issue Resolution + +**Created**: December 5, 2025 +**Status**: Planning Complete - Ready for Implementation + +--- + +## 🧐 UX & Context Analysis + +The user has identified **12 distinct issues** affecting usability, consistency, and functionality. These span both frontend (UI/UX) and backend (API/data) concerns. + +### Issue Summary Matrix + +| # | Issue | Category | Severity | Component | +|---|-------|----------|----------|-----------| +| 1 | Uptime card not updated when editing proxy host | Backend/Frontend | High | ProxyHostForm, UptimeService | +| 2 | Certificates missing delete action | Frontend | Medium | CertificateList | +| 3 | Inconsistent app sizing between IP and domain access | Frontend/CSS | Medium | index.css, Layout | +| 4 | Notification Provider template dropdown invisible text | Frontend | High | Notifications | +| 5 | Templates should be in Provider section with assignment | Frontend | Medium | Notifications | +| 6 | Banner/header sizing issues (tiny on desktop, huge on mobile) | Frontend | Medium | Layout | +| 7 | Mobile drawer icon should be on left side | Frontend | Low | Layout | +| 8 | Mobile view should show logo instead of banner | Frontend | Low | Layout | +| 9 | CrowdSec card buttons truncated on smaller screens | Frontend | Medium | Security | +| 10 | /security/crowdsec shows blank page | Frontend | High | CrowdSecConfig, Layout | +| 11 | Reorganize sidebar: Users → Account Management under Settings | Frontend | Medium | Layout, Router | +| 12 | Missing loading overlay when adding/removing ACL from proxy host | Frontend | High | ProxyHosts, useProxyHosts | + +--- + +## 🤝 Handoff Contracts (API Specifications) + +### Issue #1: Uptime Card Sync on Proxy Host Edit + +**Problem**: When editing a proxy host (e.g., changing name or domain), the associated UptimeMonitor is not updated. Users must manually delete and recreate uptime cards. + +**Current Behavior**: `syncMonitors()` only creates new monitors or updates name; it doesn't handle domain/URL changes properly. + +**Required Backend Changes**: + +```json +// PUT /api/v1/proxy-hosts/:uuid +// Backend should automatically trigger uptime monitor sync when relevant fields change +{ + "request_payload": { + "name": "Updated Name", + "domain_names": "new.example.com", + "forward_host": "192.168.1.100", + "forward_port": 8080 + }, + "response_success": { + "uuid": "abc123", + "name": "Updated Name", + "domain_names": "new.example.com", + "uptime_monitor_synced": true + } +} +``` + +**Implementation**: Modify `updateProxyHost` handler to call `UptimeService.SyncMonitorForHost(hostID)` after successful update. The sync should update URL, name, and upstream_host on the linked monitor. + +--- + +### Issue #2: Certificate Delete Action + +**Problem**: Certificates page shows no actions in the table. Delete button only appears conditionally and conditions are too restrictive. + +**Frontend Fix**: Always show delete action for custom and staging certificates. Improve visibility logic. + +```tsx +// CertificateList.tsx - Actions column should always render delete for deletable certs +// Current condition is too restrictive: +// cert.id && (cert.provider === 'custom' || cert.issuer?.toLowerCase().includes('staging')) +// AND status check: cert.status !== 'valid' && cert.status !== 'expiring' + +// New condition: Remove status restriction, allow delete for custom/staging certs +// Only block if certificate is in use by a proxy host +``` + +--- + +### Issue #3: Inconsistent App Sizing + +**Root Cause**: `body { zoom: 0.75; }` in `index.css` causes different rendering based on browser zoom behavior when accessed via IP vs domain. + +**Solution**: Remove the `zoom: 0.75` property and instead use proper CSS scaling or adjust layout max-widths for consistent sizing. + +```css +/* BEFORE */ +body { + zoom: 0.75; /* REMOVE THIS */ +} + +/* AFTER */ +body { + margin: 0; + min-width: 320px; + min-height: 100vh; + /* Use consistent font sizing and container widths instead */ +} +``` + +--- + +### Issue #4: Notification Template Dropdown Invisible Text + +**Problem**: In `ProviderForm`, the template ` + +// AFTER + + + + + + + {externalTemplates.map(t => )} + + + + + {templateSelection === 'custom' && ( + <> +