Skip to content

Enhanced Graph 1.2.0

Choose a tag to compare

@github-actions github-actions released this 09 Oct 16:42
· 31 commits to main since this release

Twelve releases of fixes, one feature that changes what the plugin reads, and a
round of work on colour. Everything below was measured on a real vault before it
shipped; where a number is quoted, npm run verify prints it.

Reading a folder instead of the whole vault

The filters panel now scopes the graph to a folder you type, with path suggestions
from your own vault and any number of excluded subfolders. Apply is what makes
it take effect.

This is a build scope, not a hide: notes outside it are not read, so clusters,
insights and the report cover only what is inside. Typed paths replaced a folder
tree, because a tree cannot express an exclusion that has not been created yet.

Three defects in a row came out of it, all fixed and pinned: applying did not tell
the built-in graph to refresh; the built-in graph never applied the scope at all;
and the rebuild refreshed the views against an emptied cache, which is why colours
and folder suggestions disappeared after applying. Measured acceptance, in
verify:vault: scoping to concepts/ gives 27 nodes of 79 with no strays, and the
analysis covers the workspace and nothing else.

Clustering settings

Node weights and the Louvain resolution now live together in a 聚类设置 panel,
in both the standalone view and the built-in graph, with an Apply button and a
reset. Resolution is clamped to 0.5–3. Cluster cores are picked by weighted degree
rather than link count, so a core is the note the cluster's weight actually centres
on.

Sparse communities, judged against the vault

A cluster is now flagged sparse when its cohesion is below 1.5 × the vault's own
density
, not below a fixed 0.15. A fixed number cannot travel between vaults: in a
densely linked one it flags nothing, and in a thinly linked one it flags everything.
Measured on this vault: density 0.136, the flagged cluster sits at 1.05×, the rest
at 2.5–4.4×.

Two measurements, no behaviour change

  • npm run eval:stability — how far the partition moves when the input moves: node
    order 0.718 ARI, 1 % of links dropped 0.857, 5 % 0.751, resolution ±0.1 0.847.
    Only 47 % of clusters keep their core note under a reordering.
  • npm run eval:weights gained a tag signal: tags alone score AUC 0.635 on held-out
    link prediction (the retired type-affinity signal scored 0.54), and 25.0 % of
    held-out links share a tag against 7.6 % of random pairs. Adding tags to the
    shipped model improves it by 0.0071 with a pooled sd of 0.0127 — not significant,
    so the model was left alone.

Types, and colour

Type rows are the types your vault declares, not the eleven the plugin knows.
A note with type: 实验记录 gets its own row, its own count, its own filter and its
own colour, so twenty custom types are twenty rows rather than one other.

Colours are assigned per vault: each build sorts the declared types and hands each
one the next entry of a searched ramp, so two types cannot collide. Measured: 13
declared types, 13 colours; a per-name hash gave 5 distinct colours for 10 custom
names. The ramp is 22 colours, worst pair ΔE 19.0, every one clearing 3:1 on both
the dark and the light canvas.

There is no standard spelling. The plugin does not treat concept as the canonical
form of 概念, and reserves no colour for any type — an earlier release did, and the
result was that the same idea written two ways was painted two colours while two
unrelated custom types could collide.

A type row with nothing left on the graph is greyed, including when the reason is
another rule (the workspace, the structural switch, a tag, a cluster) rather than
its own.

Legend gestures

Left-click a legend row excludes or restores that type or cluster, as before.
Right-click marks every node of it with a dot at the node's centre, drawn on the
same overlay the focus and search marks use, so it follows pan and zoom. A mark is
not a filter — nothing is hidden — and the row is highlighted so it is clear which
group is marked. Right-clicking again clears it. Measured: right-clicking 概念 dots
38 of 38 pages with the drawn node count unchanged at 77, and the overlay canvas
goes from 0 to 5289 lit pixels and back to 0.

Where a switch is applied, and when

  • The built-in graph now asks its engine for a payload when it attaches. It renders
    before the plugin attaches, so the first frame used to show the unfiltered graph:
    a switch that is on by default, 隐藏索引 / 概览 / 日志, looked broken until an
    unrelated repaint.
  • A graph view closed and reopened comes back with the panel its toolbar button says
    is open. The panel is created per view while the mode outlives it, so it used to
    open on the insights under a highlighted 过滤器.
  • 隐藏孤立节点 judges a page by its links in the whole vault, not in the current
    scope: a note whose links all point outside the workspace was being hidden as
    isolated. Structural pages are left to the switch that names them.

Fixed for real, not papered over

The test suite failed roughly one full run in four with four uncaught
document is not defined errors: an enhancer's safety-net timer outlived its jsdom
environment. Tests now record every enhancer they start and stop it in afterEach.
Five consecutive full runs are clean.