fix: clarify unsaved-settings confirmation (#610)

Issue: #610
User-Visible: yes
This commit is contained in:
Claude
2026-09-23 06:36:39 +00:00
committed by claude[bot]
parent fb615f9d5d
commit 1dba818581
60 changed files with 548 additions and 398 deletions
+14
View File
@@ -72,6 +72,20 @@ function relocateEditorPatch(patch, cardSource, editorSource) {
// `find` обязан встречаться в файле ровно один раз: патч, который ложится «куда
// попало», проверяет не то, что объявлен проверять. Это контролирует --check.
const MUTANT_DEFINITIONS = [
{
id: 'discard-confirm-action-icon-falls-back-to-lock',
guard: 'node demo/smoke_discard_copy.mjs',
because: '#610 AC3/AC4: unsaved-settings discard uses save-off in both places, but other '
+ 'warnings retain the lock fallback. Ignoring the per-request action override silently '
+ 'restores the misleading open-lock glyph only inside the destructive action button.',
patches: [{
file: 'src/hp-confirm.ts',
find: " <ha-icon icon=${request.confirmIcon || (destructive\n"
+ " ? 'mdi:trash-can-outline' : 'mdi:lock-open-variant')}></ha-icon>",
replace: " <ha-icon icon=${destructive\n"
+ " ? 'mdi:trash-can-outline' : 'mdi:lock-open-variant'}></ha-icon>",
}],
},
{
id: 'range-line-clamps-every-keystroke',
guard: 'node demo/smoke_range_line_draft.mjs',
+7
View File
@@ -27,6 +27,13 @@
/** @type {SmokeLink[]} */
export const SMOKE_LINKS = [
{
symbols: ['confirmIcon', 'HpConfirmRequest'],
smokes: ['smoke_discard_copy.mjs', 'smoke_dialog_polish_603.mjs'],
because: '#610: the production-bundle witnesses open all four unsaved-settings '
+ 'confirmations, verify both rendered glyphs and actions, then prove an unrelated warning '
+ 'still uses the fallback lock glyphs; source imports cannot prove the rendered dialog',
},
{
symbols: ['rangeLine', 'committedRangeLineValue'],
smokes: ['smoke_range_line_draft.mjs', 'smoke_dialog_config_parity.mjs'],