mirror of
https://github.com/PerpetualSoftware/pad.git
synced 2026-10-03 12:10:31 +00:00
288283b3af
Three follow-ups from Codex's review of the soft-delete filter on item-link queries: 1. MEDIUM — GetParentMap now JOINs items on both sides and filters on deleted_at IS NULL. handlers_dashboard.go uses this map directly to detect orphaned tasks (items not present in the map are flagged), so without the filter a task whose parent had been soft-deleted would silently fail to appear as orphaned. 2. LOW — Revert the deleted_at filter on getItemLink (lowercase, private). Its only caller is the post-insert readback in CreateItemLink, which means filtering buys nothing user-facing and introduces a delete-race window where a successful INSERT returns nil. SetParentLink's readback was switched from GetItemLinks to getItemLink for the same reason. User-facing surfaces still go through GetItemLinks (plural) and GetParentForItem, both of which retain the filter. 3. LOW — Add an explicit comment in export.go documenting that item_links are exported in full (including links to soft-deleted items), and why that intentionally diverges from the user-facing query behavior. Tests: TestGetParentMap_ExcludesSoftDeletedEndpoints exercises the dashboard regression path on both source-side and target-side soft-delete, plus the restore round-trip.