Skip to content

feat(weather): add display_errors setting#774

Draft
nicomiguelino wants to merge 3 commits intomasterfrom
feat/weather-display-errors
Draft

feat(weather): add display_errors setting#774
nicomiguelino wants to merge 3 commits intomasterfrom
feat/weather-display-errors

Conversation

@nicomiguelino
Copy link
Copy Markdown
Contributor

@nicomiguelino nicomiguelino commented Apr 6, 2026

User description

Summary

  • Adds display_errors setting to screenly.yml and screenly_qc.yml
  • Calls setupErrorHandling() in main.ts to surface errors on-screen via panic-overlay when enabled
  • Adds display_errors to e2e screenshot mock settings and documents it in README.md

PR Type

Enhancement, Documentation, Tests


Description

  • Add display_errors app setting

  • Enable startup error overlay handling

  • Document debugging option in README

  • Include setting in screenshot mocks


Diagram Walkthrough

flowchart LR
  cfg["display_errors setting"]
  yml["Screenly configuration files"]
  app["Weather app initialization"]
  docs["README and e2e setup"]
  yml -- "defines" --> cfg
  cfg -- "activates" --> app
  cfg -- "documented in" --> docs
  cfg -- "mocked in" --> docs
Loading

File Walkthrough

Relevant files
Tests
screenshots.spec.ts
Update screenshot mocks for new setting                                   

edge-apps/weather/e2e/screenshots.spec.ts

  • Add display_errors to screenshot mock settings
  • Keep e2e environment aligned with app config
+1/-0     
Enhancement
main.ts
Initialize error handling during app startup                         

edge-apps/weather/src/main.ts

  • Import setupErrorHandling from shared app package
  • Call setupErrorHandling() on DOMContentLoaded
  • Enable on-screen error surfacing during startup
+3/-0     
Documentation
README.md
Document new debugging settings option                                     

edge-apps/weather/README.md

  • Document display_errors in settings table
  • Describe it as an advanced debugging option
  • Note default value as false
+1/-0     
Configuration changes
screenly.yml
Add display errors app configuration                                         

edge-apps/weather/screenly.yml

  • Add display_errors setting definition
  • Set default value to false
  • Mark setting as optional and advanced
  • Describe it as boolean-style debug control
+11/-0   
screenly_qc.yml
Mirror display errors QC configuration                                     

edge-apps/weather/screenly_qc.yml

  • Add display_errors setting definition
  • Set default value to false
  • Mark setting as optional and advanced
  • Mirror production config for QC environment
+11/-0   

- Add display_errors setting to screenly.yml and screenly_qc.yml
- Call setupErrorHandling() in main.ts on DOMContentLoaded
- Add display_errors to e2e screenshot mock settings
- Document display_errors in README.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

PR Reviewer Guide 🔍

(Review updated until commit 576e0ff)

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

PR Code Suggestions ✨

No code suggestions found for the PR.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a display_errors setting to the Weather edge app and wires in the shared setupErrorHandling() hook so runtime failures can be surfaced via the panic-overlay mechanism (plus updates docs and screenshot-test mocks).

Changes:

  • Added display_errors to screenly.yml and screenly_qc.yml (marked as optional + advanced).
  • Invoked setupErrorHandling() during app startup in src/main.ts.
  • Documented display_errors in the app README and included it in the e2e screenshot mock settings.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
edge-apps/weather/src/main.ts Calls shared error-handling setup on DOM ready.
edge-apps/weather/screenly.yml Adds display_errors manifest setting.
edge-apps/weather/screenly_qc.yml Adds display_errors manifest setting for QC.
edge-apps/weather/README.md Documents the new setting in the configuration table.
edge-apps/weather/e2e/screenshots.spec.ts Ensures screenshot mocks include display_errors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +150 to +151
setupErrorHandling()

Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

With setupErrorHandling() enabled, errors thrown during initialization will only surface via panic-overlay if they reach window.onerror/unhandledrejection. The current top-level try/catch logs and swallows initialization failures, which likely prevents the on-screen error overlay from ever appearing for those failures. Consider rethrowing after logging (or conditionally rethrowing when display_errors is enabled) so the overlay can render the error.

Copilot uses AI. Check for mistakes.
@nicomiguelino nicomiguelino marked this pull request as ready for review April 6, 2026 23:08
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

Persistent review updated to latest commit 576e0ff

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

PR Code Suggestions ✨

No code suggestions found for the PR.

@nicomiguelino nicomiguelino marked this pull request as draft April 7, 2026 03:55
nicomiguelino and others added 2 commits April 6, 2026 21:27
- Use unindented list style for categories
- Move schema_version after properties in display_errors help_text

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Drop try/catch so unhandled errors propagate to panic-overlay
- Move signalReady() to end of happy path

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants