Repository navigation
Run write-back on the sample notes' task lines - #77
Merged
Merged
Conversation
The real-cache test showed which lines are tasks in callouts, blockquotes, numbered lists and other tricky notes, but not that they can be ticked or edited safely. Feed the 63 task lines from those notes into the per-line suites (toggle, edit, board, calendar, bulk) alongside task-lines.json, and tick, untick and set a due date on each task inside its whole note, checking that no other line or line ending changes and the note's tasks and nesting stay the same. No bugs found; the suite grows from 1,602 to 2,494 tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
tests/fixture-lines.ts(new): one list of task lines for the per-line suites. It holds the hand-written cases intask-lines.jsonplus the 63 task lines from the sample notes intests/fixtures/obsidian-cache.json. The writeback, edit, board, calendar and bulk suites now use it instead of readingtask-lines.jsonthemselves.tests/obsidian-cache.test.ts: a "write-back in place" test per sample note. It ticks, unticks and sets a due date on each task inside its whole note, then checks:tests/fixtures/README.mdandAGENTS.mddescribe the above.Why
The real-cache test added in #76 showed which lines Obsidian treats as tasks in callouts, blockquotes, numbered lists, CRLF notes and odd markers. It didn't show that those lines can be ticked or edited safely. Before this change,
task-lines.jsonhad two blockquote cases and no callouts. Writing to the wrong place is the worst failure for this plugin, so these lines now get the same byte-safety, toggle and edit checks as the hand-written fixtures. New sample notes are covered automatically.Results
npm run build,npm run lintandnpm testpass.Tests only; nothing changes for users.
🤖 Generated with Claude Code