Repository navigation
Test against Obsidian's real cache; redraw bases opened before Tasklines loads - #76
Merged
Merged
Conversation
The fake vault guesses Obsidian's list items with a regex, and it differed from Obsidian on 9 of 10 sample notes (callouts, code, comments, loose lists, setext headings and more). Capture what Obsidian 1.15.1 reports for sample notes in test-vault/Cache samples/ and check extraction against it. This found one bug: a four-space subtask under a tab-indented task lost its nesting, because extract threw away the parent Obsidian reported. The indent check guarded against a root parent of 0 for lists on line 0, but Obsidian uses -1 there, so it now only applies when the parent is line 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A base that opened before Tasklines registered its views kept showing "Unknown view type: tasklines" until reopened: after installing or turning on the plugin, or after trusting a vault's plugins on first open. When the plugin loads after the layout is ready, reopen bases that show a visible error. Normal startup is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The redraw has no automated test because it depends on Obsidian's workspace, so check it by hand on desktop before each release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 25, 2026
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
1. Extraction is tested against Obsidian's real metadata cache
test-vault/Cache samples/: callouts, blockquotes, code fences and indented code, comments and frontmatter, setext headings, numbered lists, lists with blank lines between items, mixed tab and space indentation, odd checkbox markers, and Windows line endings. The folder is outsideProjects/, so the test bases don't show these notes.tests/fixtures/obsidian-cache.json, which holds the list items and headings Obsidian 1.15.1 reported for those notes.tests/obsidian-cache.test.ts, which runsextractTasksagainst that data. Expected tasks, nesting and sections were checked by hand.tests/fixtures/README.mdandimport-cache-snapshot.tsgive the recapture steps. AGENTS.md now treats this fixture as the reference for note structure.Why:
tests/fake-vault.tsguesses the cache with a regex, and it differed from Obsidian on 9 of the 10 notes. The plugin was right in almost every case because it uses Obsidian's real data. The fake vault was wrong, so tests built on it couldn't catch structure bugs.Bug found: a four-space subtask under a tab-indented task lost its nesting.
extract.tsthrew away the parent Obsidian reported, because of an indent check meant to handle a root parent of 0 for lists on line 0. Obsidian actually uses -1 there, so the check now only applies when the parent is line 0.2. Bases opened before Tasklines loads now redraw
A base that opened before Tasklines registered its views kept showing "Unknown view type: tasklines" until it was reopened. This happens after installing or turning on the plugin with a base open, or after choosing "Trust author and enable plugins" when opening a vault for the first time. When the plugin loads after the layout is ready,
reopenBasesShowingErrorsreopens bases that show a visible error. Every base has a hidden, empty.bases-errorelement, so the check only counts a visible one with text. Normal startup is unchanged.Testing
npm run build,npm run lintandnpm testpass (1,602 tests).Notes for review
![[x.base]]embeds) aren't redrawn; the note still needs reopening.🤖 Generated with Claude Code