Dashboard graph: stable layout for large families
tsk-arqb7gxq4cex open
Problem (reported by Oliver, maity seq 41226, screenshot att-ahawr2r7pzbs): the family-scope graph on the maity KTW, about 930 entries over 3 members, has these faults:
- it starts tiny;
- nodes fly in from everywhere and jitter hard while loading;
- the layout sometimes never settles, and a loose part stays stuck far away from the rest (one long line out of the picture).
The problem already exists in 0.11.18, so it is not a regression from the lib cut.
Scope (ktw-core.js layoutTick/settleLayout, ktw-graph.js):
- Start from structured seed positions scaled to the canvas: topics or members as clusters, entries around their topic. No random burst from the origin.
- Run the simulation to convergence with a real cooling/alpha schedule and a stop criterion. With
motionoff, draw only once the layout has settled. - Keep disconnected components together, with a bounded centre pull or component packing, so nothing drifts off.
- Fit/zoom to the content once the layout has settled.
Tests:
- a large synthetic family fixture (≥1000 entries, several components) with a measurement that asserts convergence within N ticks and a bounded bounding box, with no outlier past k× the median distance;
- the existing snapshots/traces are updated only where the change is intended, and the PR body explains each one.
Review: ktw-review-team (3), ≥2 approvals, no open findings. Do not start before #752's release is cut, and rebase on main.