From 052c7f2fbc8c47eebde0141fd0dc008e9baa20fd Mon Sep 17 00:00:00 2001 From: Sandro Date: Sat, 31 Oct 2026 09:39:50 +0100 Subject: [PATCH] fix(tasks): live updates only add real tasks, not fresh Quick Dump notes Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 8 +++++++- frontend/package-lock.json | 4 ++-- frontend/package.json | 2 +- frontend/src/features/triage/TasksView.tsx | 23 +++++++++++----------- 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfcbe03..c7921e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ Das Format folgt [Keep a Changelog](https://keepachangelog.com/de/1.1.0/), die V ## [Unreleased] +## [0.15.2] - 2026-10-31 + +### Fixed +- Aufgaben: Ein neuer Quick-Dump-Eintrag (z. B. per Spracheingabe über das gehaltene Plus) tauchte kurz oben in den Aufgaben auf, obwohl er in die Triage gehört. Live-Änderungen nehmen jetzt nur noch echte Aufgaben auf; eine per „Rückgängig“ zurück in die Triage geholte Aufgabe verschwindet auch sofort aus der Liste. + ## [0.15.1] - 2026-10-31 ### Fixed @@ -365,7 +370,8 @@ Das Format folgt [Keep a Changelog](https://keepachangelog.com/de/1.1.0/), die V - Geteilte Listen (Einkaufs-, Pack- und Checklisten) mit `#Kategorie`-Gruppierung, Mengenangaben und Echtzeit-Abhaken. - Benutzer-, Gruppen- und Admin-Verwaltung (Ersteinrichtungs-Assistent, Einladungscodes, Profilbilder, persönliche API-Keys & Webhook-Ingest `/api/v1/webhooks/ingest`, JSON-Datenexport) sowie CSS-Theme-Engine mit 4 Themes (`Dark`, `Light`, `High Contrast`, `Soft`) und PWA-Unterstützung. -[Unreleased]: https://git.dsit.me/sandrodach/MindSift/compare/v0.15.1...dev +[Unreleased]: https://git.dsit.me/sandrodach/MindSift/compare/v0.15.2...dev +[0.15.2]: https://git.dsit.me/sandrodach/MindSift/compare/v0.15.1...v0.15.2 [0.15.1]: https://git.dsit.me/sandrodach/MindSift/compare/v0.15.0...v0.15.1 [0.15.0]: https://git.dsit.me/sandrodach/MindSift/compare/v0.14.3...v0.15.0 [0.14.3]: https://git.dsit.me/sandrodach/MindSift/compare/v0.14.2...v0.14.3 diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 03f3632..188cf03 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "mindsift-frontend", - "version": "0.15.1", + "version": "0.15.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "mindsift-frontend", - "version": "0.15.1", + "version": "0.15.2", "license": "Unlicense", "dependencies": { "@fontsource-variable/inter": "5.3.0", diff --git a/frontend/package.json b/frontend/package.json index 3df452e..3aee7e4 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "mindsift-frontend", "private": true, - "version": "0.15.1", + "version": "0.15.2", "license": "Unlicense", "type": "module", "scripts": { diff --git a/frontend/src/features/triage/TasksView.tsx b/frontend/src/features/triage/TasksView.tsx index 7921f8c..3637c18 100644 --- a/frontend/src/features/triage/TasksView.tsx +++ b/frontend/src/features/triage/TasksView.tsx @@ -48,6 +48,10 @@ const stopOnControl = (e: React.MouseEvent) => { if ((e.target as HTMLElement).closest('button, select, a, input')) e.stopPropagation(); }; +// Same rule as the server's task query: a fresh Quick Dump note (status inbox) is no task yet +const isTaskThought = (t: Thought) => + t.status === 'kept' || (t.status === 'converted' && t.convertedType === 'task'); + interface TasksViewProps { currentUser?: User | null; onRefreshStats: () => void; @@ -186,13 +190,7 @@ export const TasksView: React.FC = ({ if (msg.event === 'TASK_CREATED') { const created = msg.payload as Thought; - if ( - created && - (created.status === 'converted' || - created.kanbanStatus || - created.taskListId || - created.isCompleted !== undefined) - ) { + if (created && isTaskThought(created)) { setTasks((prev) => { if (prev.some((t) => t.id === created.id)) return prev; if (selectedListIdRef.current !== 'all' && created.taskListId !== selectedListIdRef.current) return prev; @@ -207,17 +205,18 @@ export const TasksView: React.FC = ({ const exists = prev.some((t) => t.id === updated.id); if (!exists) { if ( - (updated.status === 'converted' || - updated.kanbanStatus || - updated.taskListId || - updated.isCompleted !== undefined) && + isTaskThought(updated) && (selectedListIdRef.current === 'all' || updated.taskListId === selectedListIdRef.current) ) { return [updated, ...prev]; } return prev; } - if (selectedListIdRef.current !== 'all' && updated.taskListId !== selectedListIdRef.current) { + // Undone back into the Quick Dump, discarded, or moved to another list + if ( + !isTaskThought(updated) || + (selectedListIdRef.current !== 'all' && updated.taskListId !== selectedListIdRef.current) + ) { return prev.filter((t) => t.id !== updated.id); } return prev.map((t) => (t.id === updated.id ? updated : t));