mirror of
https://github.com/BradGroux/veritas-kanban.git
synced 2026-10-11 06:07:54 +00:00
Detail-level mutations (subtasks, comments, observations, verification steps) previously called invalidateQueries(['tasks']) on success, which triggered a full GET /api/tasks re-fetch — even though the mutation response already contained the complete updated task. Replaced with patchTaskInCaches() helper that does an in-place cache update of both the list cache (['tasks']) and individual task cache (['tasks', id]). The existing polling interval and WebSocket events still handle eventual consistency for multi-client scenarios. Affected hooks (11 total): - useAddSubtask, useUpdateSubtask, useDeleteSubtask - useToggleSubtaskCriteria - useAddComment, useEditComment, useDeleteComment - useAddObservation, useDeleteObservation - useAddVerificationStep, useUpdateVerificationStep, useDeleteVerificationStep Added 12 regression tests verifying each mutation patches the cache without triggering full-list invalidation. All 95 tests pass (83 existing + 12 new). |
||
|---|---|---|
| .. | ||
| src | ||
| .env.example | ||
| components.json | ||
| favicon.svg | ||
| index.html | ||
| package.json | ||
| tailwind.config.js | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
| vitest.config.ts | ||