fix: сохранить identity карточек Masonry после reload (#561)

Сводная панель теперь использует канонический порядок карточек Home Assistant и не переносит локальные настройки между визуальными колонками после remount.

Issue: #561
User-Visible: yes
This commit is contained in:
Sergey Matyunin
2026-09-13 02:04:45 +03:00
parent d6b33b115b
commit bb35af993a
54 changed files with 744 additions and 425 deletions
+13
View File
@@ -140,6 +140,19 @@ const MUTANT_DEFINITIONS = [
replace: ' .checked=${dialog.draft.show_on_mobile} ?disabled=${dialog.busy}',
}],
},
{
id: 'summary-masonry-identity-uses-visual-dom-path',
guard: 'npx tsc -p tsconfig.test.json && node scripts/fix-test-build.mjs '
+ '&& node --test --test-name-pattern="full Masonry reload uses canonical" '
+ 'test/summary-panel.test.mjs',
because: '#561 AC1/AC7: a full Masonry reload must derive each preference slot from '
+ 'the canonical cards array, never the responsive visual-column DOM path',
patches: [{
file: 'src/summary-panel-identity.ts',
find: " const slot = `masonry-v2:${cardIndex}${suffix ? `/${suffix}` : ''}`;",
replace: ' const slot = structuralPath(start); // mutant: visual DOM path becomes persistent identity',
}],
},
{
id: 'summary-animation-stale-completion-unguarded',
guard: 'npx tsc -p tsconfig.test.json && node scripts/fix-test-build.mjs '