Skip to content

Commit 907c8e7

Browse files
committed
void update boundary provenance
1 parent 79ef713 commit 907c8e7

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

src/void/api/solids.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3384,6 +3384,13 @@ function edgeKey(a, b) {
33843384
const allFeatures = api.features.list() || [];
33853385
const featureIndexById = new Map(allFeatures.map((f, i) => [String(f?.id || ''), i]));
33863386
const eligibleSketchIds = new Set();
3387+
const activeEditFeatureId = String(api.document?.getAtomicEditFeatureId?.() || '');
3388+
const activeEditFeature = activeEditFeatureId
3389+
? (allFeatures.find(f => String(f?.id || '') === activeEditFeatureId) || null)
3390+
: null;
3391+
const activeSketchEditId = activeEditFeature?.type === 'sketch'
3392+
? String(activeEditFeature.id || '')
3393+
: '';
33873394
const getFeatureIndex = (fid) => {
33883395
const key = String(fid || '');
33893396
if (!key) return -1;
@@ -3410,10 +3417,14 @@ function edgeKey(a, b) {
34103417
}
34113418
return false;
34123419
};
3413-
for (const feature of allFeatures) {
3414-
if (feature?.type !== 'sketch') continue;
3415-
if (hasFutureSourceDependency(feature)) continue;
3416-
eligibleSketchIds.add(String(feature?.id || ''));
3420+
// Guardrail: do not auto-mutate historical sketches during solids
3421+
// rebuilds triggered by other features. Only the actively edited
3422+
// sketch may auto-refresh derived refs / face attachments.
3423+
if (activeSketchEditId) {
3424+
const feature = allFeatures.find(f => String(f?.id || '') === activeSketchEditId) || null;
3425+
if (feature?.type === 'sketch' && !hasFutureSourceDependency(feature)) {
3426+
eligibleSketchIds.add(activeSketchEditId);
3427+
}
34173428
}
34183429
let derivedChanged = false;
34193430
for (const feature of allFeatures) {

0 commit comments

Comments
 (0)