mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
SuperSync accessToken was being overwritten with empty string due to Formly's resetOnHide: true behavior. When form re-renders or user navigates, the accessToken field resets to empty, and the merge logic was allowing this empty value to overwrite saved credentials. Solution: Add defensive merge logic to filter out empty/undefined/null values from form before merging with saved config. This prevents form state issues from clearing credentials while still allowing updates when users provide new non-empty values. Also fixes undefined stateName variable in is-related-model-data-valid.ts that was preventing tests from running. - Add filtering of empty values in _updatePrivateConfig() - Add comprehensive test coverage: * SuperSync token preservation (resetOnHide scenario) * SuperSync token updates with new values * WebDAV password preservation * LocalFile path preservation * Boolean false value preservation (not filtered as empty) * Multiple empty fields scenario * Mixed empty and non-empty fields - Protect all sync providers from similar form state issues Test Coverage: 24 tests (up from 19), all passing Confidence: 95% - Root cause clearly identified and addressed |
||
|---|---|---|
| .. | ||
| app | ||
| assets | ||
| environments | ||
| static | ||
| styles | ||
| test-helpers | ||
| typings | ||
| _common.scss | ||
| favicon.ico | ||
| hammer-config.class.ts | ||
| index.html | ||
| karma.conf.js | ||
| main.ts | ||
| manifest.json | ||
| polyfills.ts | ||
| styles.scss | ||
| test.ts | ||
| tsconfig.app.json | ||
| tsconfig.spec.json | ||
| tsconfig.worker.json | ||