fix(tasks): live updates only add real tasks, not fresh Quick Dump notes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2303ccce68
commit
052c7f2fbc
4 files changed
+21
-16
No files matched your search
+7
-1
@@ -6,6 +6,11 @@ Das Format folgt [Keep a Changelog](https://keepachangelog.com/de/1.1.0/), die V
|
|||||||
|
|
||||||
## [Unreleased]
|
## [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
|
## [0.15.1] - 2026-10-31
|
||||||
|
|
||||||
### Fixed
|
### 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.
|
- 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.
|
- 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.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.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
|
[0.14.3]: https://git.dsit.me/sandrodach/MindSift/compare/v0.14.2...v0.14.3
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "mindsift-frontend",
|
"name": "mindsift-frontend",
|
||||||
"version": "0.15.1",
|
"version": "0.15.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "mindsift-frontend",
|
"name": "mindsift-frontend",
|
||||||
"version": "0.15.1",
|
"version": "0.15.2",
|
||||||
"license": "Unlicense",
|
"license": "Unlicense",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource-variable/inter": "5.3.0",
|
"@fontsource-variable/inter": "5.3.0",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "mindsift-frontend",
|
"name": "mindsift-frontend",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.15.1",
|
"version": "0.15.2",
|
||||||
"license": "Unlicense",
|
"license": "Unlicense",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -48,6 +48,10 @@ const stopOnControl = (e: React.MouseEvent) => {
|
|||||||
if ((e.target as HTMLElement).closest('button, select, a, input')) e.stopPropagation();
|
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 {
|
interface TasksViewProps {
|
||||||
currentUser?: User | null;
|
currentUser?: User | null;
|
||||||
onRefreshStats: () => void;
|
onRefreshStats: () => void;
|
||||||
@@ -186,13 +190,7 @@ export const TasksView: React.FC<TasksViewProps> = ({
|
|||||||
|
|
||||||
if (msg.event === 'TASK_CREATED') {
|
if (msg.event === 'TASK_CREATED') {
|
||||||
const created = msg.payload as Thought;
|
const created = msg.payload as Thought;
|
||||||
if (
|
if (created && isTaskThought(created)) {
|
||||||
created &&
|
|
||||||
(created.status === 'converted' ||
|
|
||||||
created.kanbanStatus ||
|
|
||||||
created.taskListId ||
|
|
||||||
created.isCompleted !== undefined)
|
|
||||||
) {
|
|
||||||
setTasks((prev) => {
|
setTasks((prev) => {
|
||||||
if (prev.some((t) => t.id === created.id)) return prev;
|
if (prev.some((t) => t.id === created.id)) return prev;
|
||||||
if (selectedListIdRef.current !== 'all' && created.taskListId !== selectedListIdRef.current) return prev;
|
if (selectedListIdRef.current !== 'all' && created.taskListId !== selectedListIdRef.current) return prev;
|
||||||
@@ -207,17 +205,18 @@ export const TasksView: React.FC<TasksViewProps> = ({
|
|||||||
const exists = prev.some((t) => t.id === updated.id);
|
const exists = prev.some((t) => t.id === updated.id);
|
||||||
if (!exists) {
|
if (!exists) {
|
||||||
if (
|
if (
|
||||||
(updated.status === 'converted' ||
|
isTaskThought(updated) &&
|
||||||
updated.kanbanStatus ||
|
|
||||||
updated.taskListId ||
|
|
||||||
updated.isCompleted !== undefined) &&
|
|
||||||
(selectedListIdRef.current === 'all' || updated.taskListId === selectedListIdRef.current)
|
(selectedListIdRef.current === 'all' || updated.taskListId === selectedListIdRef.current)
|
||||||
) {
|
) {
|
||||||
return [updated, ...prev];
|
return [updated, ...prev];
|
||||||
}
|
}
|
||||||
return 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.filter((t) => t.id !== updated.id);
|
||||||
}
|
}
|
||||||
return prev.map((t) => (t.id === updated.id ? updated : t));
|
return prev.map((t) => (t.id === updated.id ? updated : t));
|
||||||
|
|||||||
Reference in new issue
Block a user