Repository navigation
v0.7.8 — two interaction fixes: collapse-by-default and swallowed clicks
Two bugs in how the card handles interaction, both reported from daily use.
Groups reopened expanded despite "Collapse groups by default"
Expanding a group to triage an incident wrote that choice to localStorage
permanently. Nothing ever removed it — so after every entity in the group
recovered and the group disappeared, the override survived. The next entity to
go down brought the group back already expanded, ignoring the setting.
"Expand all" pinned every group open the same way.
- Collapse overrides are dropped once a group has no incidents left, so a group
that comes back starts at your configured default. Expanding a group that is
still down persists across reloads exactly as before. - Only deviations from
collapse_by_defaultare stored, so changing the setting
in the card editor now takes effect on groups you'd previously touched. - Stored state is namespaced per group by mode — an unresolved integration
(unknown) and an area-less entity (unassigned) no longer share an entry.
One-time effect: the first load after updating discards the old stored blob
(it holds exactly the stale entries this fixes), so any deliberately-expanded
groups reset to your default once.
Buttons needing two clicks, especially in the confirm dialogs
A browser only delivers a click if the press and the release land on the same
element. The card rebuilds its entire innerHTML on render, so any repaint
arriving between the two destroyed the button under the cursor and the click was
never dispatched.
Repaints were arriving constantly: Home Assistant hands every card a new hass
object on every state change anywhere in the instance, and the card repainted
unconditionally for all of them — thousands of full rebuilds an hour on a large
system, none of which its own output depended on.
- Repaint only when Sentinel's own sensor actually changed.
- Hold repaints for the duration of a press and flush on release, so an incident
update landing mid-click can no longer swallow it. - Relative ages ("4m", "2h") now refresh on their own 30s tick instead of
relying on those incidental repaints — skipped over an open dialog, a hidden
tab, or a focused filter box.
Measured in a browser with real clicks and a repaint firing mid-press:
0/1 delivered before, 4/4 after.
Side benefit: the card no longer rebuilds its DOM for unrelated state changes,
which is a meaningful drop in frontend work on instances with a lot of entities.
Full changelog: v0.7.7...v0.7.8