mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-18 00:46:45 +00:00
* fix(tasks): persist collapsed subtask state across restart #8781 Collapse/expand of a task's subtasks was written by non-persistent actions, so the op-log never captured it and the state reset to expanded on every reload. Route collapse changes through the absolute, replay-safe updateTaskUi op. toggleSubTaskMode now resolves the next _hideSubTasksMode at dispatch time (extracted into a pure getNextHideSubTasksMode helper) and persists that absolute value, so it is captured to the op-log and restored on reload. Remove the old relative toggleTaskHideSubTasks action and its reducer, which was non-deterministic on replay and threw on a missing task. Register [Task] Update Task Ui in the ActionType enum and compaction code map. * test(tasks): add op-log round-trip test for _hideSubTasksMode #8781 The existing updateTaskUi test only asserted the action's persistence metadata. Add a test that runs the value through the full op-log path (dispatch -> capture -> JSON serialize -> convertOpToAction -> reducer replay) and asserts the collapse value survives. The JSON hop is where a dropped value would regress on the sync transport and SQLite op-log backend. |
||
|---|---|---|
| .. | ||
| 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 | ||