Skip to content

A task ticked in the Tasks plugin stays ticked (#413) - #420

Merged
Joost-8 merged 4 commits into
mainfrom
issue-413-task-ticks
Dec 4, 2026
Merged

Joost-8 merged 4 commits into
mainfrom
issue-413-task-ticks

Conversation

@Joost-8

@Joost-8 Joost-8 commented Dec 4, 2026

Copy link
Copy Markdown
Owner

What changed and why

Since 3.0 a task ticked in an Obsidian Tasks query came back unticked, keeping its done date (- [ ] task ✅ 2026-12-03), at the notebook's next save. A notebook kept as page files took the note's ticks into a stand-in document that the page files then replaced. The ticks now wait until the pages are read, and only boxes that changed in the note since it was last read are taken, so a tick made in the notebook is never undone by a note that has not caught up. Closes #413.

Proof

  • Reproduced in the real-Obsidian rig (Obsidian 1.15.1, a new page-file notebook, the tick written into the note through app.vault.process as the Tasks plugin does): on main the box stayed ☐ and the next save wrote - [ ] Buy milk [[#Page 1]] ✅ 2026-12-04, exactly as reported.
  • Same rig, this branch: tick while closed → ☑ on reopen, [x] kept; untick and tick while open → taken and saved; tick, save, then untick back to the exact earlier text → taken; a canvas tick followed by a page-file re-read while the note still says [ ] → kept; a Tasks tick on one item during an unsaved canvas tick on another → both kept, both saved [x].
  • Tests: tests/view/ink-view-device-pages-ticks.test.ts (7, two fail on main), and adoptTaskStates with a base and ticksDiff in tests/recognition/task-index.test.ts.
  • npm run gates: all 11 steps pass. Two reviewer rounds; their findings are fixed, except the one under Not verified.
  • src/view/ink-view.ts's cap is up 13 lines (10210 → 10223) for the wiring: the pending ticks, the base, the own-text exception and a split import. The logic is in task-index.ts.

Test on the device

  1. In a notebook with a checklist item, open a note with a Tasks query (not done) and tick the item there.
  2. Open the notebook, write a stroke so it saves, and go back to the query: the item stays done.
  3. Untick it in the query, then open the notebook: its box is empty.

Not verified

  • Not run on an iPad or with LiveSync. The reload LiveSync causes was reproduced in the rig, not LiveSync itself.
  • Left as it was: after a held read (a half-synced note file), the next complete read has no "last read" note, so it compares the note with the notebook as before. An unsaved canvas tick made just before such a read could be undone, as on main.
  • Seen in the rig, not looked into: views whose leaf was detached by my script after an error kept reloading on file changes.

🤖 Generated with Claude Code

Joost-8 and others added 4 commits December 4, 2026 03:32
…page files (#413)

The note's ticks were taken into the notebook file's own payload, which the
page files then replaced, so the next save wrote the box back unticked with
the Tasks plugin's done date kept. Ticks are now taken once the pages are read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A page-file notebook is read again whenever another device's page file
arrives; the note can be behind a tick made on the canvas then, and taking
its box would undo that tick. The note's ticks now wait for the page files
with the note as last read, and only boxes that changed in it are taken.
The same comparison keeps an unsaved canvas tick when the Tasks plugin
changes another item. ink-view.ts's cap goes up by 6 lines for the wiring.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In a page-file notebook the note's file holds no ink of its own, so a
re-read whose checklist differs is not skipped as this view's own text:
a Tasks untick right after a tick gives back the exact earlier bytes.
Ticks are also taken when a page comes from a newer FineNotes, which
still saves. ink-view.ts's cap follows (+7, the split import and wiring).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	scripts/checks/file-size.json
@Joost-8
Joost-8 marked this pull request as ready for review December 4, 2026 03:58
@Joost-8
Joost-8 merged commit de732c8 into main Dec 4, 2026
1 check was pending
@Joost-8
Joost-8 deleted the issue-413-task-ticks branch December 4, 2026 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tasks Integration

1 participant