You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: auto-restore word mode settings + fix storage sync on toggle
Add automatic save/restore of word mode flags when toggling to/from sentence case.
Technical changes:
- Add savedWordModeSettings object to track previous word mode state
- Update setShouldCapitaliseOption() to save flags on sentence case enable
- Update setShouldCapitaliseOption() to restore flags on sentence case disable
- Sync flag changes to browser.storage.sync to keep popup UI in sync
- Guard browser.storage calls with typeof check for test compatibility
Fixes:
- Fix browser.storage sync bug causing incorrect behavior on multiple toggles
- Word mode checkboxes now stay in sync when toggling modes
- Second toggle to sentence case now correctly prevents word capitalization
Tests:
- Add 8 comprehensive mode toggle tests in mode-toggle-typing.test.js
- Test automatic restoration without manual re-enabling
- Test multiple toggle cycles to prevent storage sync regression
- All 87 tests pass across 9 test suites
0 commit comments