From 8dbb6f43577b8a86e94ef7aaee196f9743356643 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sun, 18 Jan 2026 15:24:58 -1000 Subject: Implement unified task completion with cache sync (Phase 3 Step 7) Add checkbox UI to Tasks tab for completing Todoist tasks and archiving Trello cards. Fix cache synchronization so completed items stay gone after page reload by deleting them from SQLite cache after API success. - Add HandleCompleteAtom handler routing to Todoist/Trello APIs - Add DeleteTask/DeleteCard store methods for cache removal - Add htmx.process() calls after innerHTML updates in app.js - Add comprehensive tests for completion and cache behavior Co-Authored-By: Claude Opus 4.5 --- web/static/js/app.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'web/static') diff --git a/web/static/js/app.js b/web/static/js/app.js index 2f2cb6f..0f1f087 100644 --- a/web/static/js/app.js +++ b/web/static/js/app.js @@ -106,7 +106,9 @@ async function refreshData() { // Get HTML response and update tab content const html = await tabResponse.text(); - document.getElementById('tab-content').innerHTML = html; + const tabContent = document.getElementById('tab-content'); + tabContent.innerHTML = html; + htmx.process(tabContent); // Update timestamp updateLastUpdatedTime(); @@ -156,7 +158,9 @@ async function autoRefresh() { if (tabResponse.ok) { const html = await tabResponse.text(); - document.getElementById('tab-content').innerHTML = html; + const tabContent = document.getElementById('tab-content'); + tabContent.innerHTML = html; + htmx.process(tabContent); updateLastUpdatedTime(); console.log('Auto-refresh successful'); } -- cgit v1.2.3