Feature: Priority-based sorting and display limit optimization

Backend (server.js):
- Implemented severity-based sorting for current events
- Priority hierarchy: Incident > Change > Awareness > TBD
- Events with same severity sorted by starttime (earliest first)
- Upcoming events remain sorted by starttime only
- Added severityPriority mapping for consistent ordering

Frontend (index.html):
- Reduced display limits for 1080p TVs: 2 current + 2 upcoming = 4 total
- Prevents content overflow on 1080p displays
- 4K displays still auto-scale content appropriately
- Ensures critical incidents always appear first in current events

Testing:
- Verified Incident appears before Change before Awareness
- Verified all 4 events fit on 1080p screen without scrolling

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
cproudlock
2025-10-24 10:01:55 -04:00
parent c9bc2c68a8
commit 49f8274f47
2 changed files with 31 additions and 2 deletions

View File

@@ -463,8 +463,10 @@
let html = '';
// Limit display to fit on TV screen without scrolling
const MAX_CURRENT = 3;
const MAX_UPCOMING = 3;
// 1080p: 2+2 = 4 events max
// 4K: Will scale up automatically via CSS
const MAX_CURRENT = 2;
const MAX_UPCOMING = 2;
// Current Events (limit to MAX_CURRENT)
if (data.current && data.current.length > 0) {