Skip to content

Kiosk Mode does not auto-activate on app launch when previously enabled #4608

@nstefanelli

Description

@nstefanelli

Summary

When Kiosk Mode is enabled and the Home Assistant app is then force-quit, crashes, or the device reboots, the app launches with Kiosk Mode off. The user has to manually re-toggle it in Settings → Debugging → Kiosk Mode every time.

For the wall-mounted iPad use case Kiosk Mode is designed for, this is a significant gap — an unattended dashboard silently falls back to the normal UI after any restart, and there's no remote way to recover it.

Expected behavior

If KioskSettings.isKioskModeEnabled == true is persisted in GRDB, Kiosk Mode should re-activate automatically when the app next launches.

Actual behavior

The persisted setting is loaded into memory but never acted on. The user must open settings and flip the toggle off and on again.

Where the gap is

Sources/App/Kiosk/KioskModeManager.swift:

  • init() (line ~153) calls Self.loadSettings(), which correctly restores the persisted KioskSettings (including isKioskModeEnabled) from GRDB.
  • isKioskModeActive is initialized to false at line ~54 and is only ever set to true by enableKioskMode() (line ~198), which is called only from explicit user toggling.
  • setup(using:) (called from WebViewController.viewDidLoad) checks if isKioskModeActive — but since isKioskModeActive always starts false, the persisted-enabled state is effectively orphaned.

So loading the setting and activating Kiosk Mode are decoupled, and nothing bridges them on launch.

Suggested approach

In setup(using:) (or somewhere on the launch path that's safe to access Current.application), check settings.isKioskModeEnabled and call enableKioskMode() if it's true. Worth thinking about:

  • Should activation happen before the WebView is fully ready? Probably fine, since setup(using:) already has a hook for "apply initial state if already in kiosk mode."
  • Should there be a "panic recovery" guard so a crash loop inside Kiosk Mode doesn't trap the user (e.g., skip auto-activation if the previous launch crashed)? Probably out of scope for a first pass, but worth noting.

Workaround for users today

Force-quit and relaunch the app — Kiosk Mode will be off. Re-enable from settings.

Environment

  • App version: 2026.4.0+ (Labs feature; first shipped in 2026.4.0)
  • Reproduces on: any iOS / iPadOS device with Kiosk Mode enabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions