TODO: refactor items as checkboxes (notifications, theming)#11
TODO: refactor items as checkboxes (notifications, theming)#11jerryagenyi merged 11 commits intomainfrom
Conversation
…ls S1/S2/S3, sortable streams
- Add 10s timeout to play proxy to prevent hanging on Icecast issues - Wrap upstream.resume() in try/catch for error resilience - Add res.headersSent guard to prevent double responses - Deduplicate streamIds in setStreamOrder() to prevent duplicates Follow-up to deep review feedback.
…llbar, UX v2 doc - Notification types: simple modal for duplicate name/source; full error UX for real failures - Update UX: bell icon, auto-check on load, modal on click; single header-update-bell-btn - Contact/Event: preserve each other when saving; remove collapsible; contact validate on entry - Layout: remove size-full/flex-1 so one plain page scroll (no inner scrollbar) - Stream labels: S1 - name (hyphen not em dash) - docs: UI-UX-RECOMMENDATIONS-v2.md (glassmorphism); TODO updates
…anager glass-card
…rs + diagnosis link)
📝 WalkthroughWalkthroughThis PR applies a glassmorphism design system across the frontend (many components and pages), updates related CSS tokens and UI elements, makes minor dashboard API adjustments (default parameter and a fallback renderer), and adds an IcecastService guard to prevent automatic restart after a manual stop. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
public/index.html (1)
487-495:⚠️ Potential issue | 🟡 MinorDuplicate
@keyframes fadeIndefinition will cause override.There's a duplicate
@keyframes fadeIndefined here (lines 488-491) that conflicts with the earlier definition at lines 405-414. The earlier one usestranslateY(-8px)whilst this one usestranslateY(10px). The second definition will override the first, which may cause unexpected animation behaviour for elements using the.fade-inclass.Consider removing or renaming one of these definitions to avoid confusion.
🔧 Suggested fix: Remove duplicate or rename
Either remove lines 488-491 if the first definition is preferred, or rename one of them:
- `@keyframes` fadeIn { - from { opacity: 0; transform: translateY(10px); } - to { opacity: 1; transform: translateY(0); } - }Or rename to distinguish them:
- `@keyframes` fadeIn { + `@keyframes` fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }public/components/HeaderComponent.js (1)
217-260:⚠️ Potential issue | 🔴 CriticalBug:
originalContentis undefined and will cause a ReferenceError.At line 255, the code references
originalContentto restore the button state, but this variable is never defined in the update bell button click handler scope. This will throw aReferenceErrorwhen the update check completes without finding an update.Compare with the logout handler at line 277 which correctly captures
originalContentbefore modifying the button.🐛 Proposed fix
bellBtn.addEventListener('click', async () => { if (this.updateAvailable) { // Show update modal if update is available this.showUpdateModal(); } else { // Manual check if no update available console.log('🔄 Header update check requested'); + // Capture original content before changing + const originalContent = bellBtn.innerHTML; + // Show loading state bellBtn.innerHTML = ` <span class="material-symbols-rounded text-sm animate-spin">refresh</span> `; bellBtn.disabled = true;
🧹 Nitpick comments (2)
public/index.html (2)
1531-1570: Inconsistent notification styling between types.The
showNotificationmethod applies different styling approaches:
successtype uses the dedicatedtoast-successclass (line 1537) which has proper glassmorphism withbackdrop-filterinfoanderrortypes use genericglass-cardclass which may not have the same visual treatmentConsider creating
toast-infoandtoast-errorclasses similar totoast-successfor visual consistency, or ensureglass-cardprovides equivalent styling.♻️ Suggested approach
const colors = { - 'info': 'glass-card border-blue-500/30 text-blue-300', + 'info': 'toast-info', 'success': 'toast-success', - 'error': 'glass-card border-red-500/30 text-red-300' + 'error': 'toast-error' };Then add corresponding CSS classes in the style block:
.toast-info { background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.3); backdrop-filter: blur(20px); animation: slideIn 0.3s var(--ease-emphasized); } .toast-error { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); backdrop-filter: blur(20px); animation: slideIn 0.3s var(--ease-emphasized); }
1482-1528: Polling intervals are not stored or cleaned up.The
setIntervalcalls for status polling (lines 1486, 1511, 1520) don't store their return values, making it impossible to clear them later. If the dashboard is used in a context where it could be re-initialised, this could lead to multiple overlapping intervals.For a full-page dashboard this is typically acceptable, but consider storing interval IDs if you anticipate component lifecycle management in the future.
♻️ Suggested approach for future-proofing
+ this.pollingIntervals = []; + // Poll every 5 seconds for critical status updates - setInterval(async () => { + this.pollingIntervals.push(setInterval(async () => { // ... existing code - }, 5000); + }, 5000)); // Check security warnings every 30 seconds - setInterval(async () => { + this.pollingIntervals.push(setInterval(async () => { // ... existing code - }, 30000); + }, 30000));Add a cleanup method:
destroy() { this.pollingIntervals.forEach(id => clearInterval(id)); this.pollingIntervals = []; }
…ePath debug error
Moves the two recent future-refactor items into the main TODO list as unchecked items at the top:
Removes duplicate bullets from Reference section.
Summary by CodeRabbit
New Features
Style
Bug Fixes / Behaviour
Chores