Commit c030148
committed
feat(settings): drop sub-flag cascade-clear; restore advanced_debug_logging translation; clearer Save-button copy (homeassistant-ai#1164)
Three user-reported fixes from stable-addon testing:
1. Stable add-on's ``translations/en.yaml`` was missing the
``advanced_debug_logging`` description — the schema declares the
toggle in ``config.yaml:49`` but no translation ever shipped, so
the addon Configuration UI showed an unlabelled checkbox. Add the
missing entry (same wording as dev's translation).
2. Big "Save advanced settings" button used to say "Nothing to save."
after the user toggled a feature flag (beta master, Tool Search,
etc.). Feature-flag toggles auto-save on click via
``saveFeatureFlag`` — they never enter ``_advancedDirty``, so the
advanced-save button sees nothing to do. When the restart banner
is already showing (recent feature-flag save), surface that
explicitly: "No advanced changes to save — your feature-flag
toggles already saved on click. Click Restart above to apply
them." Falls back to the original "Nothing to save." copy when
there's no pending restart.
3. Drop the master-off cascade-clear behaviour entirely. The runtime
master gate in ``_apply_feature_flag_overrides`` already forces
every beta sub-flag to False whenever the master is off, so the
tools stay disabled at runtime regardless of file state. Leaving
the sub-flag values in the override file means toggling the
master off → on restores the user's prior sub-flag selections
automatically; the previous cascade-clear forced users to
re-check each sub-flag after every master cycle, which was the
wrong UX trade for an opt-in beta surface.
The master-gate check is unchanged — it still rejects payloads that
try to enable a sub-flag while the effective master is off, so the
"sub true while master false in same payload" inconsistency still
can't land. The cascade-clear was a separate (now-removed) defence.
Tests updated:
- ``test_save_features_master_off_preserves_subflag_values`` — was
``test_save_features_cascade_clears_subflags_when_master_off``;
asserts the new "preserve" semantics.
- ``test_save_features_master_on_restores_runtime_subflag_values``
— new round-trip test for master off → on restoring sub-flags.
- ``test_save_features_payload_master_false_sub_true_rejected_by_gate``
— renamed; asserts gate rejection still covers the inconsistent
payload.
- ``test_save_features_cascade_reads_override_file_not_post_gate_settings``
— deleted (no cascade, no reason to test cascade's read path).
- ``test_save_features_master_off_applied_dict_contains_only_master``
— new no-cascade pin; ``applied`` carries only the master flip.1 parent f0a0d26 commit c030148
3 files changed
Lines changed: 120 additions & 121 deletions
File tree
- homeassistant-addon/translations
- src/ha_mcp
- tests/src/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2338 | 2338 | | |
2339 | 2339 | | |
2340 | 2340 | | |
2341 | | - | |
2342 | | - | |
2343 | | - | |
2344 | | - | |
2345 | | - | |
2346 | | - | |
2347 | | - | |
2348 | | - | |
2349 | | - | |
| 2341 | + | |
| 2342 | + | |
| 2343 | + | |
| 2344 | + | |
| 2345 | + | |
| 2346 | + | |
| 2347 | + | |
| 2348 | + | |
2350 | 2349 | | |
2351 | 2350 | | |
2352 | 2351 | | |
| |||
3546 | 3545 | | |
3547 | 3546 | | |
3548 | 3547 | | |
3549 | | - | |
| 3548 | + | |
| 3549 | + | |
| 3550 | + | |
| 3551 | + | |
| 3552 | + | |
| 3553 | + | |
| 3554 | + | |
| 3555 | + | |
| 3556 | + | |
| 3557 | + | |
| 3558 | + | |
| 3559 | + | |
| 3560 | + | |
| 3561 | + | |
| 3562 | + | |
| 3563 | + | |
| 3564 | + | |
| 3565 | + | |
3550 | 3566 | | |
3551 | 3567 | | |
3552 | 3568 | | |
| |||
4455 | 4471 | | |
4456 | 4472 | | |
4457 | 4473 | | |
4458 | | - | |
4459 | | - | |
4460 | | - | |
4461 | 4474 | | |
4462 | 4475 | | |
4463 | 4476 | | |
| |||
4571 | 4584 | | |
4572 | 4585 | | |
4573 | 4586 | | |
4574 | | - | |
4575 | | - | |
4576 | | - | |
4577 | | - | |
4578 | | - | |
4579 | | - | |
4580 | | - | |
4581 | | - | |
4582 | | - | |
4583 | | - | |
4584 | | - | |
4585 | | - | |
4586 | | - | |
4587 | | - | |
| 4587 | + | |
| 4588 | + | |
| 4589 | + | |
| 4590 | + | |
| 4591 | + | |
| 4592 | + | |
| 4593 | + | |
| 4594 | + | |
| 4595 | + | |
| 4596 | + | |
| 4597 | + | |
4588 | 4598 | | |
4589 | | - | |
4590 | | - | |
4591 | | - | |
4592 | | - | |
4593 | | - | |
4594 | | - | |
4595 | | - | |
4596 | | - | |
4597 | | - | |
4598 | | - | |
4599 | | - | |
4600 | | - | |
4601 | | - | |
4602 | | - | |
4603 | | - | |
4604 | | - | |
4605 | | - | |
| 4599 | + | |
| 4600 | + | |
| 4601 | + | |
| 4602 | + | |
| 4603 | + | |
4606 | 4604 | | |
4607 | 4605 | | |
4608 | 4606 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2767 | 2767 | | |
2768 | 2768 | | |
2769 | 2769 | | |
2770 | | - | |
| 2770 | + | |
2771 | 2771 | | |
2772 | 2772 | | |
2773 | | - | |
2774 | | - | |
2775 | | - | |
2776 | | - | |
2777 | | - | |
2778 | | - | |
2779 | | - | |
| 2773 | + | |
| 2774 | + | |
| 2775 | + | |
| 2776 | + | |
| 2777 | + | |
| 2778 | + | |
| 2779 | + | |
| 2780 | + | |
2780 | 2781 | | |
2781 | 2782 | | |
2782 | 2783 | | |
| |||
2804 | 2805 | | |
2805 | 2806 | | |
2806 | 2807 | | |
2807 | | - | |
2808 | | - | |
| 2808 | + | |
2809 | 2809 | | |
2810 | 2810 | | |
| 2811 | + | |
| 2812 | + | |
2811 | 2813 | | |
2812 | | - | |
2813 | | - | |
| 2814 | + | |
| 2815 | + | |
2814 | 2816 | | |
2815 | 2817 | | |
2816 | 2818 | | |
2817 | 2819 | | |
2818 | 2820 | | |
2819 | | - | |
| 2821 | + | |
2820 | 2822 | | |
2821 | 2823 | | |
2822 | | - | |
2823 | | - | |
2824 | | - | |
2825 | | - | |
2826 | | - | |
2827 | | - | |
| 2824 | + | |
| 2825 | + | |
2828 | 2826 | | |
2829 | 2827 | | |
2830 | 2828 | | |
2831 | 2829 | | |
| 2830 | + | |
2832 | 2831 | | |
2833 | 2832 | | |
2834 | 2833 | | |
| |||
2839 | 2838 | | |
2840 | 2839 | | |
2841 | 2840 | | |
2842 | | - | |
| 2841 | + | |
| 2842 | + | |
2843 | 2843 | | |
2844 | 2844 | | |
2845 | 2845 | | |
2846 | | - | |
| 2846 | + | |
2847 | 2847 | | |
2848 | 2848 | | |
2849 | 2849 | | |
2850 | 2850 | | |
2851 | 2851 | | |
2852 | 2852 | | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
2853 | 2858 | | |
2854 | 2859 | | |
2855 | | - | |
2856 | | - | |
2857 | | - | |
2858 | | - | |
2859 | | - | |
2860 | | - | |
2861 | | - | |
2862 | | - | |
2863 | | - | |
2864 | | - | |
2865 | | - | |
2866 | | - | |
2867 | | - | |
| 2860 | + | |
2868 | 2861 | | |
2869 | | - | |
2870 | | - | |
2871 | | - | |
2872 | | - | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
2873 | 2870 | | |
2874 | 2871 | | |
2875 | 2872 | | |
2876 | 2873 | | |
2877 | | - | |
| 2874 | + | |
2878 | 2875 | | |
2879 | 2876 | | |
2880 | | - | |
2881 | | - | |
2882 | | - | |
2883 | | - | |
2884 | | - | |
2885 | | - | |
2886 | | - | |
2887 | | - | |
2888 | | - | |
2889 | | - | |
| 2877 | + | |
| 2878 | + | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
2890 | 2883 | | |
2891 | 2884 | | |
2892 | | - | |
2893 | 2885 | | |
2894 | 2886 | | |
2895 | 2887 | | |
| |||
2902 | 2894 | | |
2903 | 2895 | | |
2904 | 2896 | | |
2905 | | - | |
2906 | | - | |
2907 | | - | |
| 2897 | + | |
2908 | 2898 | | |
2909 | 2899 | | |
2910 | 2900 | | |
2911 | | - | |
| 2901 | + | |
| 2902 | + | |
2912 | 2903 | | |
2913 | 2904 | | |
2914 | 2905 | | |
2915 | 2906 | | |
2916 | 2907 | | |
2917 | 2908 | | |
2918 | 2909 | | |
2919 | | - | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
| 2918 | + | |
| 2919 | + | |
| 2920 | + | |
| 2921 | + | |
| 2922 | + | |
2920 | 2923 | | |
2921 | | - | |
| 2924 | + | |
| 2925 | + | |
2922 | 2926 | | |
2923 | | - | |
2924 | | - | |
2925 | | - | |
2926 | | - | |
2927 | | - | |
2928 | | - | |
2929 | | - | |
2930 | | - | |
| 2927 | + | |
2931 | 2928 | | |
2932 | 2929 | | |
2933 | 2930 | | |
2934 | 2931 | | |
2935 | | - | |
| 2932 | + | |
2936 | 2933 | | |
2937 | 2934 | | |
2938 | | - | |
2939 | | - | |
2940 | | - | |
| 2935 | + | |
| 2936 | + | |
| 2937 | + | |
| 2938 | + | |
2941 | 2939 | | |
2942 | 2940 | | |
2943 | 2941 | | |
| |||
2953 | 2951 | | |
2954 | 2952 | | |
2955 | 2953 | | |
2956 | | - | |
2957 | 2954 | | |
2958 | 2955 | | |
2959 | 2956 | | |
| |||
2967 | 2964 | | |
2968 | 2965 | | |
2969 | 2966 | | |
2970 | | - | |
2971 | | - | |
2972 | | - | |
2973 | | - | |
| 2967 | + | |
| 2968 | + | |
| 2969 | + | |
| 2970 | + | |
2974 | 2971 | | |
2975 | | - | |
2976 | | - | |
2977 | | - | |
2978 | | - | |
| 2972 | + | |
2979 | 2973 | | |
2980 | 2974 | | |
0 commit comments