Skip to content

DAG-aware canvas organization: convergence, crossing reduction and safe preview - #1060

Merged
dovvnloading merged 10 commits into
mainfrom
feat/dag-aware-canvas-organization
Nov 25, 2026
Merged

dovvnloading merged 10 commits into
mainfrom
feat/dag-aware-canvas-organization

Conversation

@dovvnloading

@dovvnloading dovvnloading commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Additional: measurable before/after graph quality

  • Every organization preview now shows straight-line centre-to-centre connection crossings and mean edge length before/after. Crossings are exact for up to 180 visible edges; larger diagrams explicitly show Not measured rather than a biased sample.
  • These are transparent diagnostics for layout decisions, not promises about rendered orthogonal routing. The measurements do not influence or mutate node positions.
  • Added geometry, complexity-bound, and nonmutation tests plus a stronger within-component crossing-reduction fixture.

Implemented

  • Opt-in Directed graph — convergence-aware layout model in Organize graph, alongside the unchanged conversation-tree default.
  • Deterministic size-aware directed layout: accepted topological arrows, longest-path ranks, four forward/backward barycentric ordering passes, measured node footprints and disconnected-component packing.
  • Multi-parent convergence is placed below every accepted predecessor; cyclic/secondary/reference edges remain in the graph and render normally, even when ignored only for rank constraints.
  • Reuses server-side preview, re-computed geometry fingerprint, stale-plan rejection, collision and false-containment invariants, one-step undo, fixed anchors and scoped organization.
  • Safe, explicitly labeled tree fallback for frames/containers and graphs exceeding 400 visible cards or 2,000 eligible edges, to avoid introducing regressions in compound groups.
  • Backward compatible intent payloads: existing tree callers send identical argument lists; DAG adds one optional final argument to preview/apply.
  • Backend topological, group, geometry, undo and convergence tests; frontend SceneStore transport regression; documentation.

Validation: This is a draft PR until CI and relevant local behavior checks pass. It is deliberately independent of the advanced chart engine in PR #1057 and does not claim full ELK-style compound routing yet.

@dovvnloading dovvnloading left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge-readiness review

Reviewed the nine changed files at 266046200e3825b0262bb69377386619d3bf9dec (DAG ranking, layout diagnostics, server preview/apply, client controls and transport, tests and documentation). No blocking findings. The opt-in DAG path preserves tree mode as the default, retains edges when breaking rank cycles, and includes the requested/effective style in the server-side preview fingerprint. Grouped and oversized scenes fall back to tree mode.

Validation: All four required CI jobs passed (Windows Python, frontend, wheel/build, POSIX); MCP Connect and scientific workbench Chromium jobs also passed. Playwright boot-smoke was skipped as expected for PR CI. Independently ran the exact two new Python modules (verified their Git blob hashes) with a lightweight SceneDocument/geometry test double: convergence, varied footprints, cycle priority, docking, edge preservation, crossing reduction (1→0), fallback bounds, diagnostic accuracy/caps, and 150 seeded randomized graphs passed checks for rank clearance, non-overlap, deterministic placement and unchanged edges. This is isolated testing, not a native desktop or full application walkthrough; a local repository clone was blocked by DNS. The PR is five commits behind current main, but the changed files do not overlap main’s intervening changes and GitHub reports it mergeable. No checks or branch protections were bypassed. Recording a review comment rather than self-approving because the connected account is the PR author.

@dovvnloading
dovvnloading marked this pull request as ready for review November 25, 2026 09:52
@dovvnloading
dovvnloading merged commit f6f6eee into main Nov 25, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant