Skip to content

Add HA screensaver flow, auth hardening, and tablet recovery fixes#27

Open
loopy321 wants to merge 10 commits intomsp1974:devfrom
loopy321:screensaver
Open

Add HA screensaver flow, auth hardening, and tablet recovery fixes#27
loopy321 wants to merge 10 commits intomsp1974:devfrom
loopy321:screensaver

Conversation

@loopy321
Copy link
Copy Markdown
Contributor

@loopy321 loopy321 commented Mar 30, 2026

Summary

This PR improves the companion app for dedicated Home Assistant tablet use.

It adds reliable HA-driven screensaver navigation, preserves the original local screen-off fallback, hardens long-lived WebView auth behavior, improves crash/boot/display recovery, and fixes fullscreen/dashboard rendering issues.

Included changes

  • Add idle-driven HA screensaver navigation with ui_idle reporting
  • Preserve original local screen-off behavior when no screensaver dashboard path is configured
  • Fix screensaver re-entry after temporary dashboard navigations and revert flows
  • Fix partial settings updates so screen_timeout changes do not accidentally disable screensaver behavior
  • Preserve external_auth on HA path navigation
  • Add SPA navigation with fallback to full page load when HA returns a same-route/no-op result
  • Restore correct startup routing to /view-assist/clock when no HA dashboard is configured
  • Harden HA token expiry and refresh handling for long-lived WebView sessions
  • Improve display/app recovery after boot, app loss, and foreground loss scenarios
  • Fix fullscreen/window inset issues that caused top-bar/shifted rendering
  • Fix explicit screen-off actions so they physically turn off the display without immediate wake-up
  • Apply a final cleanup pass to remove dead code and reduce duplication

Validation

Validated on the Lenovo tablet with HA log checks:

  • build/install succeeds
  • app starts on the expected home route
  • idle transitions into screensaver correctly
  • temporary dashboard navigation with revert returns to clock and then re-enters screensaver
  • blank screensaver path restores original local screen-off behavior
  • explicit screen-off switch/action turns the display off
  • boot/display recovery brings the app back visibly after restart scenarios
  • observed runs no longer reproduced the prior HA auth failures

Notes

This branch was developed alongside matching vaca and view_assist custom component changes. Some behaviors in this app PR assume those integration-side updates are present.

Related changes

This PR is one part of a coordinated update across the companion app and Home Assistant integrations.

Related PRs:

These changes are designed to work together to improve:

  • screensaver activation and recovery
  • dashboard navigation and revert behavior
  • WebView authentication stability
  • fallback to local screen-off behavior when no screensaver dashboard is configured

Recommended rollout: merge and deploy all three together.

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.

2 participants