P1: Task reminder anchors create a second Task identity and break root writes #934

Open
opened 2026-10-02 17:41:20 +00:00 by kayg · 0 comments
Owner

P1 — A Task reminder changes the root into a child Task

Evidence: apps/web/src/lib/notes/NoteView.svelte:381 calls ensureBlockIdAt
on the root Task paragraph. The resulting Markdown has a ^block-id token.
crates/calternal-notes-core/src/tasks/line.rs:465, :492 and :526 require
the root mirror to have no block ID. The index uses the same rule. Thus the
reminder adds a second Task identity, and later server title and status writes
do not update this checkbox. The web editor can hide the mismatch until reload.

Fix: give the root reminder an explicit identity that the index and all root
writers recognize. Do not treat every anchored child with the same title as
the root. Keep existing child-identity tests.

Test idea: add the first reminder, reload, then change the parent title and
status through the Task route. Assert exactly one parent projection, a matching
Markdown mirror and a matching Reminders projection. Keep a same-title anchored
child in the fixture and assert that it does not change.

Rule: DESIGN §§2, 9, 40, 41; #659 requires one Task write path across surfaces.

Source: independent read-only review of #659 at 013f6785a. Line numbers refer to that commit. No build or runtime test was run.

## P1 — A Task reminder changes the root into a child Task Evidence: `apps/web/src/lib/notes/NoteView.svelte:381` calls `ensureBlockIdAt` on the root Task paragraph. The resulting Markdown has a `^block-id` token. `crates/calternal-notes-core/src/tasks/line.rs:465`, `:492` and `:526` require the root mirror to have no block ID. The index uses the same rule. Thus the reminder adds a second Task identity, and later server title and status writes do not update this checkbox. The web editor can hide the mismatch until reload. Fix: give the root reminder an explicit identity that the index and all root writers recognize. Do not treat every anchored child with the same title as the root. Keep existing child-identity tests. Test idea: add the first reminder, reload, then change the parent title and status through the Task route. Assert exactly one parent projection, a matching Markdown mirror and a matching Reminders projection. Keep a same-title anchored child in the fixture and assert that it does not change. Rule: DESIGN §§2, 9, 40, 41; #659 requires one Task write path across surfaces. Source: independent read-only review of #659 at 013f6785a. Line numbers refer to that commit. No build or runtime test was run.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#934
No description provided.