Repository navigation
Live co-editing: what changed between two versions of a design, and what each change touched (#5184) - #7683
Draft
CamWight wants to merge 12 commits into
Draft
Live co-editing: what changed between two versions of a design, and what each change touched (#5184)#7683CamWight wants to merge 12 commits into
CamWight wants to merge 12 commits into
Conversation
CamWight
force-pushed
the
coedit-x1-5184
branch
3 times, most recently
from
October 30, 2026 12:47
186410d to
5645b10
Compare
This was referenced Oct 30, 2026
CamWight
force-pushed
the
coedit-x1-5184
branch
2 times, most recently
from
November 1, 2026 22:19
c703df2 to
5f7dada
Compare
CamWight
force-pushed
the
coedit-x1-5184
branch
2 times, most recently
from
November 5, 2026 16:35
50c09da to
ddd8162
Compare
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
CamWight
force-pushed
the
coedit-x1-5184
branch
3 times, most recently
from
November 7, 2026 02:03
b04fbf5 to
6c446cd
Compare
CamWight
force-pushed
the
coedit-x1-5184
branch
2 times, most recently
from
November 8, 2026 13:26
5f5ef6b to
dc93723
Compare
…angency-labs#5184, CE8) `Feature::field_role` and `Feature::definition` in doc say which of a feature's saved fields are who it is, names kept for its inputs and picks, heavy payloads, fields evaluation writes back (pinned body names, a linked design's face names), and what a person sets. timeline.inspect and timeline.edit's unknown-field message read them instead of the engine's private NOT_EDITABLE and heavy_fields; the design compare will too. No behaviour change: a test pins timeline.inspect's definition, omitted fields and inputs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tangency-labs#5184, X1-1) `doc::design_diff::diff(base, head)` lists the features, parameters, components and joints that were added, removed, changed, moved, renamed or (un)suppressed, with each changed input's expression and value before and after, and the design's other fields that differ. Items pair by id with the base's, which must be the changeset's parent; `Document::next_item_id` now counts every id in use, so a new item never takes one. A parameter whose expression is the same but whose value follows another is `Recomputed`, and what uses a changed parameter is listed with it. What evaluation writes back is not a person's change: pinned body names (`Feature::field_role`, CE8), a sketch solved again for something it uses, and a placement its joints moved are `Resolved`; a sketch whose points moved with nothing it uses changed is a drag. View state is ignored. Heavy fields are compared where they are, and each design's parameters are evaluated at most once. `Touched` is its one projection: the components, features, joints and parameters of the base a person edited, or that something was added inside, and `overlaps` intersects two of them through the component tree (an addition inside never overlaps). Each of the design's own fields (materials, render, name...) is a target of its own and overlaps only an edit of the same field; a units change overlaps everything the other side touched, additions included, since every length is read in them. Pure, no model evaluation; nothing calls it yet. A mutation fuzz runs changesets of a damaged or hostile design through both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CamWight
force-pushed
the
coedit-x1-5184
branch
from
November 9, 2026 12:34
dc93723 to
4f00d5d
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Live co-editing: what changed between two versions of a design, and what each change touched (#5184)
Nothing changes for the person using SolidCraft yet: nothing calls it. Live co-editing needs to tell people when their changes and someone else's touch the same thing. This compares two versions of a design and says what changed, feature by feature, and which other parts each change reached, for the merge and overlap warnings to come.
A live co-editing slice (#5184, claim #7547). It is pure: nothing calls it yet. The merge and overlap warnings in later slices read it.
#7682 (the testkit crate) has landed, so this PR holds only its own two commits:
Features: one definition of inputs, derived and bookkeeping fields (CE8).
Feature::field_roleandFeature::definitionin doc say which of a feature's saved fields are:timeline.inspectandtimeline.edit's unknown-field message read them, instead of the engine's privateNOT_EDITABLEandheavy_fields. No behaviour change: a test pinstimeline.inspect's definition, its omitted fields and its inputs.The design compare (X1-1).
Changes a default: no
What it does
doc::design_diff::diff(base, head)lists the features, parameters, components and joints that were added, removed, changed, moved, renamed or (un)suppressed. Each changed input comes with its expression and value before and after. The design's other fields that differ are listed by name.Document::next_item_idnow counts every id in use, so a new item never takes one.Recomputed. What uses a changed parameter is listed with it.Resolved): what evaluation writes back.A sketch whose points moved with nothing it uses changed is a drag, so it counts as an edit.
Touchedis its one projection. It holds the components, features, joints and parameters of the base that a person edited, or that something was added inside.overlapsintersects two of them through the component tree:Tests
Resolved.changesets_from_anyone_never_panic): 3,097 testkit mutations of a rich design's JSON (sketch, parameter, nested components, placement, joint, materials, comments, metadata). Each one is read and compared both ways, then put throughTouchedandoverlaps.Checks
Latest, on this head
4f00d5d9fover main38598a786, local, Windows,--profile ci, on each of its two commits:fmt,cargo check --lockedwith all targets,listsandlayerspass.-D warningsondocandengine, all targets, fails only on two errors that main has on Windows on its own, in files this PR doesn't change:crash_tests.rs:209(Windows: clippy -D warnings fails on an unused variable in crash_tests.rs #13160) andschema/slicers_tests.rs:46, a test helper whose callers run only on Unix (from Agents and scripts: Installed Slicers describes its exact parameters and reply (#13306) #13340).doc's library tests: 682 passed, 0 failed (661 passed, 0 failed with CE8 alone).edittests: 55 passed, 1 failed. The failure isinserting_variable_fillet_control_preserves_parameters_at_existing_positions, which fails on main too and is listed intests/KNOWN_FAILING_TESTS(solidcore#430).ef966d46a).What this rebase changed: main's #12729 added
pub mod csv;on the line where X1-1 addspub mod design_diff;. Both are kept, in sorted order.Before, on
dc93723f3over main1e6b1ec20, local, Windows,--profile ci, on each of its two commits:fmt,listsandlayerspass.-D warningsondocandengine, all targets, passes. It ran withunused_variablesallowed, because main fails it on Windows on its own (crash_tests.rs:209, a variable only used on Unix: Windows: clippy -D warnings fails on an unused variable in crash_tests.rs #13160).doc's library tests: 672 passed, 2 failed (651 passed, 2 failed with CE8 alone).edittests: 55 passed, 1 failed.tests/KNOWN_FAILING_TESTS.8706d623f), anddocandenginebuild with all targets after that merge.No full gate on this head.
What this rebase changed:
timeline.inspect's reply: main now builds it from typed structs (OmittedField,FeatureInput, Agents and scripts: the timeline editing commands describe their exact parameters and reply (#12547) #12602). CE8 fills them from its definition, and the reply is unchanged.Merging with others: most open PRs on the same files merge cleanly, or only need two neighbouring lines kept. Two need more:
feature_effectsright afterheavy_fieldsincmd/edit.rs. CE8 removesheavy_fields, which is nowFeature::definition, andfeature_effectsdoesn't use it. Whichever lands second dropsheavy_fieldsand keepsfeature_effects.crates/doc/Cargo.tomlbeside ours. Both stay, inCargo.locktoo.Before, on
ddd816291over main8312bf0cb, local, Windows,--profile ci:fmtpasses; the workspace builds with all targets; clippy-D warningsondocandengine, all targets, passes;doc's library tests: 627 passed, 2 failed, both listed intests/KNOWN_FAILING_TESTS; the engine'sedittests: 53 passed, 1 failed,inserting_variable_fillet_control_preserves_parameters_at_existing_positions, also listed there (solidcore#430). No full gate on this head.What this rebase changed:
touching(a feature's saved choice of what a join makes of pieces that only touch): the compare's list of a feature's fields names it, and it is carried as it is, since it changes the result.newer_file(Opening a design from a newer SolidCraft: it opens with a notice instead of being refused #12166, what a newer SolidCraft saved that this build keeps for the next save): bookkeeping, beside the format the file was saved in, so not a change of the design.timeline.inspect: main no longer returnsboolean_diagnostics(Merge develop into main: SolidCraft on the SMLib kernel (v1.1.0-alpha) #11351), so CE8's test no longer lists it among the reply's keys.Vec2andVec3: the compare's tests take them fromsolidcore_record, where they now live.doc/src/tests.rs: main's new tests and CE8's sit side by side; all are kept.Before, on
50c09da67over main6cee7a91b, local, Windows,--profile ci:fmtpasses; clippy-D warningsondocandengine, all targets, passes;doc's library tests: 563 passed, 0 failed, 1 ignored; the engine'seditandtimelinetests: 206 passed, 0 failed. No full gate on this head.What this rebase changed:
edit_tests.rs: main addedassistant_toggle_is_refused_headlessly_without_changing_the_documentwhere CE8'stimeline.inspecttest goes, and both stay.params.rs: main's Parameters: one meaning for value in every reply; round reported numbers (#10747) #10812 gave each rowvaluein base units anddisplay_valuein the shown unit, both rounded as reported. The compare'sparam_rows_inkeeps both. A parameter is stillRecomputedwhen its value changes, now judged in base units.Before, on
5f7dada8cover main446590dca:fmtandlistspass; clippy ontestkit,doc,ioandengine, all targets, passes; the library tests of those four crates, the engine's included for the first time: 3,866 passed, 0 failed, 12 ignored. That run was onaf2771978; this head only formats one test's list. No full gate since this rebase.What this rebase changed:
Component.history_hidden(#10393) is a saved field, so a comparison lists it and the component test changes it.timeline.inspectkeeps main'stypeandtype_namebeside CE8's definition. Tests added beside others on main indoc/src/tests.rsandedit_tests.rsare all kept.The notes below are from earlier rebases:
Latest, on this head
c703df2f7over main7366fe0ec:fmtpasses; clippy ontestkit,doc,ioandengine, all targets,-D warnings, passes; the tests oftestkit,docandio: 736 passed, 0 failed, 4 ignored. No full gate has run since this rebase, and the engine's tests didn't run in this pass; one gate runs before it leaves draft.What changed in this rebase:
print_faces:mainadded this field toDocument, the flat face a slicer export lays on the bed. The compare now reports it among the named fields, because it changes what an export writes, and its test has a row for it.The checks below are from before this rebase.
Local gate (Windows) over the whole co-editing stack (#7682, #7683, #7684 and #7685 together) on main 66bd64c:
Then each PR's branch was rebased onto main ab67126. The only conflict was two new tests side by side in
doc/src/tests.rs; both are kept. The new crates' Cargo.lock lines are at the workspace's 0.27.1. On that main, each branch builds with its lock as committed (cargo check --locked --tests), and each slice's own tests pass again:solidcraft-doclibrary, 517 passed;collaborationtests, 33 passed;solidcraft-collab-wire, 16 passed, and the engine's size checks on real bodies.