Releases: Stef4678/cognitree
Release list
CogniTree 1.2.1
Fixes
The duplicate-panel cleanup no longer reads a deprecated API. The command that closes redundant CogniTree tabs identified the panel you are looking at through Workspace.activeLeaf, which Obsidian discourages and which can only be read after a null check. It now asks for the focused view directly with Workspace.getActiveViewOfType — the replacement the deprecation notice names — and keeps its own fallback to the first panel when nothing CogniTree-related is focused. Behaviour is unchanged; the lookup is just API-clean and still finds the panel wherever it happens to be docked.
A redundant assertion in the response parser was dropped. extractJSON asserted non-null on its truncated-payload branch, but the assertion could not change the type: takeTail is a const alias for an expression containing !!tail, so TypeScript already narrows tail to string inside the branch. No behaviour change, and the truncation-recovery fix from 1.2.0 is untouched.
Verification
Release assets are built and attested by GitHub Actions. The suite runs 810 assertions across the smoke and store suites — the panel-cleanup case included, whose fixture now models getActiveViewOfType the way Obsidian resolves it (view instanceof type) — and the production build type-checks and bundles clean.
CogniTree 1.2.0
Fixes
Exported diagrams and outlines are now correct.
- Layered SVG connectors no longer sit 24px left of their nodes. Boxes were drawn at
x + shiftXwhile the curves were drawn at the rawx, so every layered export had its connectors offset by the left padding. Confirmed against a real export, where the root box centre was exactly 24 past its own outgoing path. - Outline export escapes concept names. A name carrying
[,],|,#or^— from the model, or a hand-editedconcept:— closed its own[[…]]link early and corrupted the outline. Those characters are now neutralised in both the link target and the heading.
A truncated model response is recovered instead of silently discarded. When a reply was cut off mid-object, the real payload was unterminated, so it never qualified as a balanced object and a schema the model echoed first won instead — "Connections" then reported none rather than a parse failure. The truncated tail is now repaired and preferred when it looks like a payload, while a stray brace in prose still cannot win.
Batch expand can no longer create the same concept twice. addChildren took its duplicate-name snapshot on entry, so with three workers running, two of them could both pass the check for a shared child name — one note was shadowed in the model and the other orphaned in the vault (X (2).md, or a swallowed File already exists). Name allocation and the note writes now share one critical section. Batch concurrency is unchanged.
Merging a subtree no longer gives a concept two parents. A concept that was skipped — its note stayed behind in the source folder — was also listed under the target, contradicting the concept's own parent frontmatter and the source note's children list.
Deleting a subtree removes its review cards. The notes were trashed but the cards stayed in the tree's review store, so the Review session kept serving questions for concepts that no longer existed. Undo still restores them, since the cards survive the deletion itself.
A doubled panel no longer survives every restart. The "two identical icons in the sidebar" is a saved workspace holding two cognitree-view leaves: an older race added a second tab, Obsidian restored it on every start, and closing it by hand never stuck. Since every panel loads the same tree, a duplicate is always redundant — duplicates are now closed once the layout has finished restoring, keeping the panel you are looking at rather than the first in the tab order.
Notes are written with Vault.process instead of Vault.modify. This is what the API recommends for background writes: it takes the current contents as its input, so a save you make while the plugin is writing is no longer clobbered. Both the vault write paths and the export modal are covered.
Command renamed. "Close extra CogniTree panels" is now "Close extra panels" — Obsidian already shows the plugin name beside a command in the palette.
Verification
Release assets are built and attested by GitHub Actions. Every fix above carries a regression test built from the failing case, and the suite runs 810 assertions across the smoke and store suites. The production build type-checks and bundles clean.
CogniTree 1.1.9
New
- SVG sunburst (radial) export — "Export → SVG sunburst (radial)", for wide trees where the layered graph sprawls. Depth is the radius, arc width is branch size, names wrap onto up to three lines and switch to reading outward when a wedge is narrow.
Fixes
- Sunburst labels stay inside their cells. Three renderer faults made names run out of their own wedge — up to 49 of 104 labels, the worst 145px outside its arc:
- a radial label on the left half was anchored at the ring's outer edge but kept
text-anchor: end, so the whole name was pushed outwards off the circle; - "tangential" labels were never turned along the arc, so a label budgeted against the arc's length was drawn across the ring instead;
- a text block sat on its baselines rather than its glyph box, so even a fitting label poked out of a narrow arc.
- a radial label on the left half was anchored at the ring's outer edge but kept
- Names are shown whole. Label height is measured with the real word wrapper rather than a character count, and rings widen (up to 2.5×) while any name still has to be cut. A name whose arc cannot hold text at all is listed under the drawing instead of disappearing.
- Text is measured per character, calibrated against Inter and Segoe UI at label size. A single average hid the difference between
iandW, so wide-capital names overflowed. - Layered graph boxes no longer overlap. Columns were spaced by leaf count while boxes were sized by character count capped at 240px, so a wide box landed on its neighbour — 65 overlapping pairs on a 105-node tree.
- Long labels wrap instead of being shortened in the layered graph, which also makes the diagram narrower.
- Opening the CogniTree panel twice no longer leaves two identical tabs.
Verification
Release assets are built and attested by GitHub Actions. The label layout is covered by tests for containment against the rendered geometry, box overlap, label fit and the measured width model (786 assertions).
CogniTree 1.1.8
Maintenance release: one real bug fix plus the code-quality warnings from the plugin review. No feature changes — 1.1.7 plus these fixes.
Fixed
- String-valued
tags:produced garbage tags. Frontmatter tags are legitimate YAML as a list, a single string or a number, and the code spread them blindly — sotags: researchbecame#r,#e,#s, … This affected the semantic-index note text (tags are part of the embedded text, so it degraded connection matching) and the vault graph used by Grow a tree from your vault (tag picker and tag clustering). Tags are now normalised in one shared, type-narrowed helper. - The same
any-typed spread also hid a type-safety warning (no-unsafe-assignment) at both call sites; narrowing tounknownbefore inspecting fixes the warning and the bug together. - A vault-tree source-picker callback returned a value where a
voidcallback was expected (Obsidian'saddOptionreturns the component). Behaviour was already correct; the callback is block-bodied now. - An unnecessary regex escape (
\[inside a character class) is gone.
Assets are built and attested by GitHub Actions from tag 1.1.8 (SLSA build provenance). Requires Obsidian 1.13.0 or newer.
CogniTree 1.1.7
Four new capabilities, plus eight bugs found and fixed in their first review pass. Assets are built and attested by GitHub Actions from tag 1.1.7 (SLSA build provenance).
New — fill the notes in
- Deep dive — right-click a node → Write deep dive (or the row's 💡) writes a 350–600 word structured section into the note: mechanism, examples, precise contrasts, open questions, next concepts. Deep dive subtree… does it branch-wide on a budget. Hand edits inside the section survive every rewrite.
- A 💡 badge marks notes that have one (read from frontmatter, so it costs nothing on large trees).
New — smarter connections
- Semantic index — optional
/embeddingspass over your vault (Settings → Semantic index, or the Build semantic index command). Incremental by mtime, batched, budgeted and resumable, cached next to the plugin. - Find connections merges semantic hits with the lexical index, and Ask gains a "related notes elsewhere in your vault" block in its grounding context.
New — remember what you generate
- Review cards — right-click → Create review cards (or for a whole subtree), then study with 🧠 Review or the Review due cards command: Space reveals, 1–4 grade again / hard / good / easy. SM-2-lite scheduling lives in a hidden per-tree store, with a cards due chip.
New — start from what you already have
- Grow a tree from your vault… — pick the note you are reading or one of your tags. CogniTree reads names, tags and links from the metadata cache, arranges them into a tree, and writes reference nodes (🔗) that link to your notes instead of copying them. Source notes are never modified or deleted.
Fixed
- A deep dive containing an
## H2heading was silently dropped on the next write — regions now end only at the plugin's own sections, and stray H2s are demoted. - Refresh deep dive replayed the cached answer for up to 24h, so it looked like nothing happened; refreshes now ask the model.
- Reference-node links used the model's spelling instead of the real note name.
- Growing a tree into an existing name mixed two trees — now refused, and the name you type is the one used.
- A string-valued
tags:in frontmatter was split into one tag per character in the vault graph. - The semantic index rewrote its whole store after every 32 notes (slow on large vaults).
- Ask could start two parallel requests from a double Enter.
- A stale cards due chip when switching trees, a stale 💡 flag after deleting a section by hand, and
deepened/sourcemissing from the JSON export.
CogniTree 1.1.6
Bug-fix release. npm test now runs the suite (pure logic + a store/generator suite driven through an in-memory Obsidian stub).
Tree & storage
- Undo after Delete node + descendants re-attaches the restored branch to its parent, so the notes come back into the tree (they used to be restored to disk but stay invisible).
- Deleting a subtree also clears its descendants from the in-memory model, so the node count no longer over-reports.
- Merging duplicates can no longer strand a note behind a deleted parent: a filename collision is written under a unique name, and a descendant whose concept already exists in the target stays put and is reported.
- Two notes claiming one concept load deterministically (canonical
<name>.mdwins) with a warning instead of silently dropping one.
Generation
- Batch expand:
depthnow means the number of generated levels (depth 1 was a silent no-op) and the node budget is enforced before every expansion, not only between levels. - Tolerant JSON parsing: braces in trailing prose, or a schema skeleton echoed before the real payload, no longer break Discovery/Expansion (balanced-brace extraction, arrays rejected).
- Generate works on keyless local providers (Ollama, LM Studio).
- Generate / Batch / Connections can no longer be started twice concurrently.
Ask, indexing, UI
- Suggested children survives a blank line after the heading.
- The grounding digest character budget now covers its header lines and clips huge descriptions.
- The vault index subscribes to metadataCache once and detaches on unload (no per-keystroke listener fan-out).
- Tree stats report real depth instead of the domain-slugged path length; every tree walk is cycle-safe.
- Smaller fixes: Unicode-safe slugs, explicit
estimated_depth: 0, dead endpoint branch removed, non-stringmessage.contentguarded.
Assets are built and attested by GitHub Actions from tag 1.1.6 (SLSA build provenance).
CogniTree 1.1.5
Follow-up to the Obsidian community-plugin source review:
- Chat-answer rendering now uses Obsidian's createEl / createSpan helpers exclusively — no document.* DOM creation APIs remain in the source
Install: copy main.js, manifest.json and styles.css into your vault at
/.obsidian/plugins/cognitree/ and enable the plugin.
CogniTree 1.1.4
Clears the remaining Obsidian community-plugin source review findings:
- Chat answers render on iOS 16.4+ — the inline Markdown regex no longer uses lookbehinds
- Chat answer DOM is built with Obsidian's createEl helpers instead of document.createElement
Install: copy main.js, manifest.json and styles.css into your vault at
/.obsidian/plugins/cognitree/ and enable the plugin.
CogniTree 1.1.3
Clears the Obsidian community-plugin source review:
- Chat answers are now rendered as DOM nodes via textContent — no innerHTML anywhere in the source
Install: copy main.js, manifest.json and styles.css into your vault at
/.obsidian/plugins/cognitree/ and enable the plugin.
CogniTree 1.1.2
Adds a grounded "Ask about a concept" follow-up chat:
- Ask about a concept from any row, the right-click menu or the command palette
- Streamed answers grounded in a digest of the node's branch and its linked notes
- Presets: Explain, Quiz me, Gaps & contradictions, Next expansion
- Suggested children from an answer can be adopted straight into the tree as new notes
- Ask questions run on a larger first token budget with a live seconds counter; reasoning-budget retries are announced instead of running silently
- New settings: Ask context nodes / Ask context characters
Install: copy main.js, manifest.json and styles.css into your vault at
/.obsidian/plugins/cognitree/ and enable the plugin.