Rebase PR #5162 (rename busy_input_mode -> default_message_mode; flip the default from 'queue' to 'steer') onto current origin/master WITHOUT dropping the shipped #5170 localStorage persistence mirror. Rename the mirror machinery to the new setting name for consistency: _BUSY_INPUT_MODES -> _DEFAULT_MESSAGE_MODES (values unchanged) _normalizeBusyInputMode -> _normalizeDefaultMessageMode (fallback now 'steer') _persistBusyInputMode -> _persistDefaultMessageMode _readPersistedBusyInputMode -> _readPersistedDefaultMessageMode window._busyInputMode -> window._defaultMessageMode (+ renamed exports) localStorage: write the new 'hermes-default-message-mode' key; read it with a fallback to the legacy 'hermes-busy-input-mode' key so an existing user's persisted preference survives the rename. Preserve #5170 behavior at every mirror site under the new names: - boot success -> window._defaultMessageMode=_persistDefaultMessageMode(...) - boot FAILURE -> window._defaultMessageMode=_readPersistedDefaultMessageMode() (NOT a hardcoded 'steer' — a saved 'interrupt'/'queue' must still apply when the server is unreachable; do not regress #5167/#5132) - preferences autosave, settings-panel load, and _applySavedSettingsUi all persist through _persistDefaultMessageMode(...) Tests updated for the rename while keeping the persistence-behavior assertions (test_1062, test_5145, test_5167); test_5167 gains explicit guards that the load-failure path reads the persisted pref and never hardcodes a literal mode, plus autosave/panel-load mirror-write coverage. Co-authored-by: Rod Boev <rod.boev@gmail.com>
This commit is contained in:
1 parent
1f2dac90df
commit
b931ae2f9b
17 files changed
+438
-236
No files matched your search
@@ -10,11 +10,11 @@ class TestBusyInputSettingsSearchTerms:
|
||||
|
||||
def test_busy_input_field_has_supplemental_search_terms(self):
|
||||
"""The busy-input field must expose the supplemental terms from HTML."""
|
||||
assert 'data-settings-search="message default while running queue interrupt steer"' in INDEX_HTML, (
|
||||
assert 'data-settings-search="busy input mode message default while running queue interrupt steer"' in INDEX_HTML, (
|
||||
"busy-input field must expose supplemental search terms in data-settings-search"
|
||||
)
|
||||
assert "Busy input mode" in INDEX_HTML, (
|
||||
"busy-input field label must still be present in the HTML"
|
||||
assert 'data-i18n="settings_label_default_message_mode"' in INDEX_HTML, (
|
||||
"busy-input field label must stay wired to the renamed i18n key in the HTML"
|
||||
)
|
||||
|
||||
def test_settings_index_uses_field_text_for_busy_input(self):
|
||||
|
||||
Reference in new issue
Block a user