Skip to content

Attempt to make a layout engine that takes the topology and LayoutSpe…#107

Merged
pragmatrix merged 11 commits intomasterfrom
incremental-layout
Feb 24, 2026
Merged

Attempt to make a layout engine that takes the topology and LayoutSpe…#107
pragmatrix merged 11 commits intomasterfrom
incremental-layout

Conversation

@pragmatrix
Copy link
Owner

…cs from external sources and layouts incrementally

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Introduces an incremental layout engine that can recompute geometry based on an external topology + algorithm, and wires it into the desktop system to replace the prior “build full layout tree then place” approach.

Changes:

  • Added IncrementalLayouter (with LayoutTopology / LayoutAlgorithm) to support incremental measure/place and emit only changed rects.
  • Switched DesktopSystem layout application to use incremental recomputation and removed the separate rects cache.
  • Refactored OrderedHierarchy to store hierarchy relationships in a single node-state map (parent + ordered children) and added exists().

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
layout/src/lib.rs Exposes the new incremental layouter module publicly.
layout/src/incremental_layouter.rs Implements incremental recompute, caching, eviction, and unit tests.
desktop/src/desktop_system.rs Replaces old layout building/placing with incremental recompute + change application; integrates hit testing + rect lookup with the layouter.
desktop/src/aggregates/ordered_hierarchy.rs Consolidates hierarchy state into a single nodes map and adds exists() for topology queries.
.github/copilot-instructions.md Documents new guidance around single source of truth, hierarchy representation, and invariant handling.

@pragmatrix pragmatrix merged commit a398779 into master Feb 24, 2026
5 of 8 checks passed
@pragmatrix pragmatrix deleted the incremental-layout branch February 24, 2026 09:45
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.

2 participants