Skip to content

Dev: notification types, update UX, contact/event fixes, single scrollbar, UX v2 doc#9

Merged
jerryagenyi merged 6 commits intomainfrom
dev
Feb 2, 2026
Merged

Dev: notification types, update UX, contact/event fixes, single scrollbar, UX v2 doc#9
jerryagenyi merged 6 commits intomainfrom
dev

Conversation

@jerryagenyi
Copy link
Copy Markdown
Owner

@jerryagenyi jerryagenyi commented Feb 2, 2026

Merges dev into main. Includes: notification types (simple modal for duplicate name/source); update bell UX (auto-check, modal); contact/event save preservation, no collapsible, contact validate on entry; single page scroll (no inner scrollbar); stream label hyphen; UI-UX-RECOMMENDATIONS-v2.md. UX polish can be done on a separate branch from dev.

Summary by CodeRabbit

  • New Features

    • Header update bell: auto-check on load, badge display, modal on update; manual check still available.
  • Improvements

    • Inline real-time validation for contact fields with per-field error messages.
    • Contact and event sections now always expanded (simplified interface).
  • Bug Fixes

    • Dedicated simple modal for duplicate stream/name errors.
  • Known Issues

    • WhatsApp marked “Not working”; event details/contact saving may not persist as intended.

- 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
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 2, 2026

📝 Walkthrough

Walkthrough

This PR adds per-field contact validation and persistence, removes collapsible event/contact UI, introduces duplicate-stream detection with a simple modal in FFmpegStreamsManager, and changes update notification UX to a header bell with badge and modal behaviour.

Changes

Cohort / File(s) Summary
Contact & Event UI / Data
public/components/ContactManager.js, public/components/EventManager.js
Added persistent contact fields (email, phone, whatsapp) and event fields (title, subtitle, image, description). Introduced per-field validators (validateEmailField, validatePhoneField, validateWhatsAppField) and setFieldValidationState. Removed collapse/expand UI; always-render expanded details. Synchronized DOM inputs and in-memory state; added per-field error containers and live validation wiring.
Stream Error Handling
public/components/FFmpegStreamsManager.js, public/streams.html
Added isDuplicateError(message) and showDuplicateModal(title, message); duplicate-name/source errors now show a simple modal instead of the troubleshooting notification. Applied duplicate handling across start/restart/update/start-all flows. Switched stream title delimiter from em dash to hyphen.
Update Notification & Header
public/components/HeaderComponent.js, TODO.md
Reworked update UX to a single header bell (header-update-bell-btn) that auto-checks on load, shows badge when updateAvailable, and opens an update modal. Adjusted icon, styling, aria/title text, and guarded release URL opening. Notes in TODO.md reflect new notification and duplicate handling behaviour.
Docs & Layout
docs/UI-UX-RECOMMENDATIONS-v2.md, public/index.html, TODO.md
Added a large UI/UX design reference (glassmorphism, components, animations, accessibility, CSS snippets). Minor layout class adjustments in public/index.html. Updated TODO with notification, duplicate, and component status notes.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant User as "User (UI)"
    participant Header as "HeaderComponent"
    participant Streams as "FFmpegStreamsManager"
    participant API as "Server / FFmpeg API"
    participant Modal as "Duplicate Modal"

    User->>Header: Click start/start-all/update action
    Header->>Streams: invoke start/update flow
    Streams->>API: Send start/update request
    API-->>Streams: Respond with error (duplicate)
    Streams->>Streams: isDuplicateError(message) -> true
    Streams->>Modal: showDuplicateModal(title,message)
    Modal-->>User: Display duplicate modal (simple)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 I hopped through fields and trimmed each fence,

Emails, phones now validated, intense.
Duplicate streams — a gentle modal chime,
Bells ring updates, neat and on time.
A dashboard burrowed in glassy design.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures all major changes in the PR: notification types, update UX improvements, contact/event fixes, scrollbar adjustments, and UX v2 documentation additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
public/components/HeaderComponent.js (1)

225-257: ⚠️ Potential issue | 🟠 Major

Fix undefined originalContent in the update-check flow.
originalContent is referenced in finally but never defined, which throws and can leave the button disabled when no update is found.

🐛 Suggested fix
-                    // Show loading state
+                    const originalContent = bellBtn.innerHTML;
+                    // Show loading state
                     bellBtn.innerHTML = `
                         <span class="material-symbols-rounded text-sm animate-spin">refresh</span>
                     `;
                     bellBtn.disabled = true;
🤖 Fix all issues with AI agents
In `@public/components/ContactManager.js`:
- Around line 102-106: The contact-save payload is overwriting potentially newer
event fields (eventTitle, eventSubtitle, eventImage, aboutDescription); before
building the payload in ContactManager.js (where those fields are set), refresh
or re-read the latest event data from the shared EventManager/state (or fetch
the current event record) and merge those values with the contact form values so
you only send updated contact fields and preserve any newer event edits; update
every payload-construction site (the occurrences around lines 102-106, 231-244,
269-274) to pull the canonical event fields first (e.g., via the EventManager
getter or current props/state) and merge rather than blindly overwriting.

In `@public/components/FFmpegStreamsManager.js`:
- Around line 55-91: The modal creation in showDuplicateModal uses global IDs
('duplicate-modal-message' and 'duplicate-modal-ok') which can collide if
multiple modals exist; fix by replacing those document-level ID references with
scoped queries on the modal (use modal.querySelector('[data-duplicate-message]')
and modal.querySelector('[data-duplicate-ok]') or set unique data- attributes on
the created elements) and attach listeners to those scoped elements (e.g., bind
the OK click to the scoped ok element and use modal.querySelector to find the
message element before setting textContent), leaving isDuplicateError unchanged.

In `@TODO.md`:
- Line 45: Update the TODO checklist text that currently reads "Event Details &
Your Contcact components — Not working as should. details not saving for
contact. event details collapsible doesnt open after saving details." by
correcting the typos: change "Contcact" to "Contact" and "doesnt" to "doesn't",
and normalize casing/punctuation so it reads clearly (e.g., "Event Details &
Your Contact components — not working as they should; details not saving for
contact, and the event details collapsible doesn't open after saving details.").

Comment thread public/components/ContactManager.js
Comment thread public/components/FFmpegStreamsManager.js
Comment thread TODO.md Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@TODO.md`:
- Line 41: The checklist line for "Contact: WhatsApp" is marked complete but
states "Not working"; update the TODO entry by either unchecking that item or
splitting it into two lines: keep a checked "Contact: WhatsApp — initial
implementation" and add a new unchecked follow-up like "Contact: WhatsApp — fix
validation/wa.me builder (not working)". Ensure the placeholder text and
requirements (digits 10–15, no leading zero, backend validation, ContactManager,
wa.me/<digits>) are preserved in the new lines so reviewers can track what's
implemented vs what still needs fixing.
🧹 Nitpick comments (1)
public/components/FFmpegStreamsManager.js (1)

65-91: Add keyboard escape handling for accessibility.

The modal correctly uses scoped queries with data attributes (addressing the previous review), and handles backdrop click and OK button dismissal. However, it lacks keyboard escape handling, which is expected for accessible modal dialogs.

♿ Proposed fix for keyboard accessibility
         const ok = modal.querySelector('[data-duplicate-ok]');
         const close = () => modal.remove();
         if (ok) ok.addEventListener('click', close);
         modal.addEventListener('click', (e) => { if (e.target === modal) close(); });
+        modal.addEventListener('keydown', (e) => { if (e.key === 'Escape') close(); });
     }

Comment thread TODO.md
- [x] **Sortable streams (optional)** — Up/down buttons on dashboard; `POST /api/streams/reorder`; order persisted in `config/streams.json` (`_order`); listener page uses same order and S1/S2/S3 labels without refresh.

- [x] **Contact: WhatsApp** — Country code enforced (digits 10–15, no leading zero); validation backend + ContactManager; `wa.me/<digits>` built on listener page; placeholder "e.g. +44 7123 456789 (country code required)".
- [x] **Contact: WhatsApp** — Country code enforced (digits 10–15, no leading zero); validation backend + ContactManager; `wa.me/<digits>` built on listener page; placeholder "e.g. +44 7123 456789 (country code required)". Not working
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix checklist status: marked done but says “Not working”.

A checked item shouldn’t describe a broken state. Either uncheck it or split into “implemented” (checked) plus a new unchecked “fix not working” follow‑up.

🤖 Prompt for AI Agents
In `@TODO.md` at line 41, The checklist line for "Contact: WhatsApp" is marked
complete but states "Not working"; update the TODO entry by either unchecking
that item or splitting it into two lines: keep a checked "Contact: WhatsApp —
initial implementation" and add a new unchecked follow-up like "Contact:
WhatsApp — fix validation/wa.me builder (not working)". Ensure the placeholder
text and requirements (digits 10–15, no leading zero, backend validation,
ContactManager, wa.me/<digits>) are preserved in the new lines so reviewers can
track what's implemented vs what still needs fixing.

@jerryagenyi jerryagenyi merged commit 74cf98f into main Feb 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant