Skip to content

fix: keep finished-sketch list in history order - #58

Merged
jeffglousher merged 1 commit into
jackControls:mainfrom
jeffglousher:fix/finished-sketch-history-order
Aug 22, 2026
Merged

fix: keep finished-sketch list in history order#58
jeffglousher merged 1 commit into
jackControls:mainfrom
jeffglousher:fix/finished-sketch-history-order

Conversation

@jeffglousher

Copy link
Copy Markdown
Collaborator

Summary

  • end_sketch still appended to finished after fix: insert sketches and datums at the history cursor #49, so rollback → new sketch → end left the new sketch last in finished_sketches() while the feature tree had it mid-history.
  • Live teardown now sorts finished by the same key as project restore: index of feature_id in document.features().features.
  • The existing new_sketch_is_inserted_at_the_build_cursor test now also asserts finished names are Sketch1, Sketch3, Sketch2 (not append order).

Fixes #52.

Test plan

  • cargo test -p nbcad-sketch --test solid_history — 4 passed, including new_sketch_is_inserted_at_the_build_cursor

@jackControls please review; do not merge until you sign off.

end_sketch now sorts finished by feature-tree index so mid-history inserts match the restore path.

@jackControls jackControls left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Reviewed the feature-order fix and regression coverage. Sorting finished sketches by feature-tree position correctly handles insertion at a moved build cursor, while unknown IDs remain safely ordered last. The focused solid-history test passes locally. Approved; I did not merge.

@jeffglousher
jeffglousher merged commit f187127 into jackControls:main Aug 22, 2026
6 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.

[follow-up] Finished-sketch list still appends after mid-history insert

2 participants