Add previous messaging session controls

This commit is contained in:
junjunjunbong authored and Nathan Esquenazi committed 2026-05-17 21:27:32 -07:00
1 parent e6be01c4dd
commit 3a53592107
9 files changed
+118 -6

No files matched your search

+5 -4
View File
@@ -3,7 +3,7 @@
Mirrors the structure of test_1003_appearance_autosave.py to verify the
preferences-panel autosave pattern is wired correctly:
- All 14 preference fields use _schedulePreferencesAutosave (not _markSettingsDirty)
- All 15 preference fields use _schedulePreferencesAutosave (not _markSettingsDirty)
- Password field MUST still call _markSettingsDirty (security: never autosave)
- _preferencesPayloadFromUi covers all 14 fields
- _setPreferencesAutosaveStatus uses the shared i18n keys
@@ -41,6 +41,7 @@ PREFERENCE_FIELDS_AUTOSAVE = [
("settingsShowTps", "show_tps"),
("settingsSimplifiedToolCalling", "simplified_tool_calling"),
("settingsShowCliSessions", "show_cli_sessions"),
("settingsShowPreviousMessagingSessions", "show_previous_messaging_sessions"),
("settingsSyncInsights", "sync_to_insights"),
("settingsCheckUpdates", "check_for_updates"),
("settingsSoundEnabled", "sound_enabled"),
@@ -52,8 +53,8 @@ PREFERENCE_FIELDS_AUTOSAVE = [
]
def test_all_14_preference_fields_have_autosave_payload_entries():
"""_preferencesPayloadFromUi must include all 14 preference fields."""
def test_all_15_preference_fields_have_autosave_payload_entries():
"""_preferencesPayloadFromUi must include all 15 preference fields."""
block = _function_block(PANELS_JS, "_preferencesPayloadFromUi")
for dom_id, field in PREFERENCE_FIELDS_AUTOSAVE:
assert f"$('{dom_id}')" in block, \
@@ -63,7 +64,7 @@ def test_all_14_preference_fields_have_autosave_payload_entries():
def test_preference_fields_use_schedule_autosave_not_mark_dirty():
"""All 13 listener attachments (excluding bot_name's debounce wrapper) must
"""All 14 listener attachments (excluding bot_name's debounce wrapper) must
use _schedulePreferencesAutosave. bot_name uses a wrapper but still
eventually calls _schedulePreferencesAutosave."""
panel = _load_settings_panel_block()