feat: add JavaScript error handling to app system
Add comprehensive error handling infrastructure to the new app template
system, matching the functionality from the legacy base.html template.
Changes:
- Create convey/static/error-handler.js as standalone error handling module
- Captures window.error and unhandledrejection events
- Updates status icon to red (🔴) with red glow on any JS error
- Displays error log panel at bottom of viewport with error details
- Provides window.showError() for manual error display via modal
- HTML-escapes all error text for security
- Update convey/templates/app.html to include error handling
- Load error-handler.js FIRST before all other scripts to catch early errors
- Add error modal HTML structure for manual error display
- Add #error-log div for automatic error logging at bottom
- Update convey/static/app.css with error handling styles
- Add .status-icon.error style (red box-shadow glow)
- Add #error-log styles (fixed bottom panel, dark theme, monospace)
Error state takes precedence: status icon becomes red with glow when any
JS error occurs, regardless of WebSocket connection state. Error log shows
detailed messages: "❌ message @ file:line" for errors and "⚠️ Promise:
reason" for unhandled rejections.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>