You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(screenshot): re-enable the theme guard around dashboard captures
The ThemeGuard bracket in capture_dashboard_images was commented out on
the premise that upstream Puppet had fixed the cold-render settheme
dispatch that made it necessary (#1909). That fix never shipped:
balloob/home-assistant-addons#89 is merged to that repo's master but
unreleased -- it landed after the 2.6.0 version bump (#88), and
puppet/config.yaml still reads 2.6.0 with no settheme entry in its
CHANGELOG. Every deployment on a released Puppet therefore still has the
theme persisted onto the engine token user's profile and synced to that
user's live web and mobile sessions, with nothing restoring it.
The upstream fix is also narrower than the disable assumed. Its title is
exact -- "don't dispatch settheme when no theme/dark was requested" -- so
a capture passing theme= or dark_mode=true still writes even once it
ships. The bracket is therefore restored unconditionally rather than
gated on engine version.
ha_get_dashboard_screenshot already documents the restore ("The engine
user's saved theme preference is restored after the capture (best
effort)"), so the disabled bracket also left the tool description
promising behaviour the code did not perform.
TestCaptureBracketDisabled asserted the bracket stayed off; it is
inverted to TestCaptureBracket, which now asserts the snapshot/restore
sessions open and the clobbered theme is written back, including on the
capture-failure path.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Nm7tyA1nfxNCWFXaR3AxV
0 commit comments