# Dataview compatibility evidence ledger This document records demonstrated behavior only. A passing unit or Playwright test is not evidence of support without the equivalent Chromium journey. All evidence below was captured via agent-browser against the real vendored Dataview 0.5.68 release installed from `http://localhost:7417/test-plugins/dataview`. ## Installation and settings - Status: **supported**. - Agent-browser steps: 1. Opened `http://localhost:7417` in a named session. 2. Settings → Obsidian Plugins. 3. Entered `http://localhost:7417/test-plugins/dataview` in "Install from URL". 4. Clicked "Install from URL". - Screenshot: `docs/dataview-evidence/02-after-install-click.png`. - Console after install: `Dataview: version 0.5.68 (requires obsidian 0.13.11)` and `Dataview: all 1 files have been indexed in 0.034s`. - DataviewAPI exposed on `window.DataviewAPI`; `index.initialized === true`. - Settings tab renders all expected settings (inline queries, DataviewJS, view, tables, tasks). Screenshot: `docs/dataview-evidence/03-dataview-settings-tab.png`. - DataviewJS is **disabled by default** (`enableDataviewJs: false`). A `dataviewjs` code block renders: "Dataview JS queries are disabled. You can enable them in the Dataview settings." Screenshot: `docs/dataview-evidence/10-dataviewjs-disabled.png`. ## Disable / re-enable - Status: **supported**. - Agent-browser: toggled `[aria-label="Toggle Dataview"]` off → DataviewAPI becomes `undefined`. Toggled back on → DataviewAPI returns as `object`, `index.initialized === true`. ## Reload persistence - Status: **supported**. - Agent-browser: full page `reload` → `wait --load networkidle` → `wait 5000`. - After reload: DataviewAPI exists, `index.initialized === true`, `index.revision === 3`, `pagesSize === 3`. Data document's `priority` and `status` inline field survived (priority=2, status=archived from prior edit). ## CM6 token and traversal compatibility - Status: **supported**. - The custom `syntaxTree` callback wrapper was removed; native `syntaxTree` from `@codemirror/language` is now exposed directly through `codemirrorLanguageModule`. - `tokenClassNodeProp` is configured on the actual parser in `src/editor/markdown-language.ts` and verified interactively: - `InlineCode` node → `tokenClassNodeProp = "inline-code"`. - `CodeMark` node → `tokenClassNodeProp = "formatting"`. - Regression test: `src/plugin/loader/__tests__/plugin-api-global.test.ts` ("preserves native Lezer iterate callback values for both access styles"). - Section regression coverage: `extract-metadata.test.ts` verifies zero-based ranges, fenced blocks, unclosed fences, indented code, and list sections. ## Metadata index - Status: **supported** after adding `sections` to the metadata cache. - Root cause of missing inline fields: Dataview's worker iterates `metadata.sections` to find inline fields on paragraph lines. Reams' `extractMetadata` did not produce `sections`, so `fields` was always empty. - Fix: added `buildSections()` in `src/services/metadata/extract-metadata.ts` that classifies lines into frontmatter, code, list, heading, and paragraph sections with proper `position` ranges. - Verified interactively: `data.md` page now has `fields = { priority: 1, tags: ["project"], status: "active" }` (previously `status` was missing). - Frontmatter, links, tags, list items, and task extraction have focused coverage (`extract-metadata.test.ts`, `metadata-cache.test.ts`). ## Reading view and query rendering - Status: **supported**. - Two documents created via `vault.create()`: - `data.md`: frontmatter (priority, tags), inline field (`status:: active`), task (`- [ ] Ship the indexed task`). - `query.md`: inline query (`= this.priority`), TABLE, LIST, TASK queries with `FROM "data.md" WHERE priority = 1`. - Screenshot: `docs/dataview-evidence/05-query-reading-view-with-inline-fields.png`. - Visible TABLE result: `File=[[data.md|data]]`, `file.name=data`, `priority=1`, `status=active`. - Visible LIST result: `[[data.md|data]]: data`. - Visible TASK result: checkbox (unchecked) + "Ship the indexed task". - Inline query `= this.priority` in query.md shows `-` (null), which is correct because query.md has no `priority` field. ## Reactivity (edit data doc, query doc refreshes without reload) - Status: **supported**. - Agent-browser: modified `data.md` via `vault.modify()` (priority 1→2, status active→archived, task incomplete→complete). Did NOT modify query.md. - After waiting for Dataview's refresh interval (2500ms), query.md reading view: - TABLE: 0 results ("No results to show for table query"). - LIST: 0 results. - TASK: 0 results. - This proves inclusion/exclusion refresh without reloading the page. - Screenshot: `docs/dataview-evidence/07-read-view-after-rerender.png`. - query.md content verified unchanged via `vault.read()`. ## Live Preview - Status: **supported**. Live Preview replaces `` `= this.priority` `` with the evaluated value `7` when the cursor is outside the query. - Reams now parses code-span delimiters as adjacent `CodeMark` nodes and the content as `InlineCode`, matching the delimiter-free `inline-code` token range Dataview's Live Preview extension consumes. This retains native `syntaxTree` behavior and avoids a cursor-wrapper compatibility layer. - Screenshot: `docs/dataview-evidence/11-live-preview-inline-query.png`. ## createFragment global - Status: **supported**. - Dataview's settings tab calls `createFragment()` (a global Obsidian function). - Added `window.createFragment` in `installPluginApiGlobal()` alongside `createDiv` and `createSpan`. ## DataviewJS - Status: **supported (default disabled)**. - `enableDataviewJs: false` by default. A `dataviewjs` code block renders a clear message: "Dataview JS queries are disabled." - Enabling DataviewJS in settings allows JS execution in the browser context (same security boundary as Obsidian desktop). ## Remaining required journey - Metadata edge cases: sibling/nested tasks, multiline ranges, and parent lines still need comparison against real Dataview output. - Final clean-browser journey from install through query, reactivity, Live Preview, settings, and reload with zero console errors.