()
| 22 | } |
| 23 | |
| 24 | export function clearTodoBatch() { |
| 25 | cancelTodoAutoClear(); |
| 26 | todoState.tasks.clear(); |
| 27 | todoState.pendingCreates.clear(); |
| 28 | todoState.panelOpen = false; |
| 29 | todoState.autoOpenedForBatch = false; |
| 30 | $('todo-panel').classList.remove('has-tasks', 'open'); |
| 31 | $('todo-list').innerHTML = ''; |
| 32 | $('todo-summary').textContent = ''; |
| 33 | $('todo-progress-bar').style.width = '0%'; |
| 34 | $('todo-progress-bar').classList.remove('all-done'); |
| 35 | $('todo-badge').textContent = '0'; |
| 36 | $('todo-badge').classList.remove('done'); |
| 37 | scheduleSessionCacheSave(); |
| 38 | } |
| 39 | |
| 40 | function syncTodoPanelLifecycle(tasks) { |
| 41 | const hasTasks = tasks.length > 0; |
no test coverage detected