@ch4acko3/dsh-turn-fold 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/inline-source.cjs +12 -1
- package/package.json +1 -1
package/inline-source.cjs
CHANGED
|
@@ -872,7 +872,18 @@ function __ch4acko3DshTurnFoldRenderEntries(entries, nodeStore, renderNode, sess
|
|
|
872
872
|
activityEntries.push(next);
|
|
873
873
|
j++;
|
|
874
874
|
}
|
|
875
|
-
var
|
|
875
|
+
var foldKeyPrefix = "activity:" + String(sessionId) + ":" + String(turn) + ":";
|
|
876
|
+
var foldKey = foldKeyPrefix + String(entry.key);
|
|
877
|
+
// Preserve an open group's identity when earlier activity joins it during streaming.
|
|
878
|
+
if (!__ch4acko3DshTurnFoldOpenKeys.has(foldKey)) {
|
|
879
|
+
for (var foldKeyIndex = 1; foldKeyIndex < activityEntries.length; foldKeyIndex++) {
|
|
880
|
+
var openFoldKey = foldKeyPrefix + String(activityEntries[foldKeyIndex].key);
|
|
881
|
+
if (__ch4acko3DshTurnFoldOpenKeys.has(openFoldKey)) {
|
|
882
|
+
foldKey = openFoldKey;
|
|
883
|
+
break;
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
}
|
|
876
887
|
// Focus inside an already-open group belongs to its native disclosure rows.
|
|
877
888
|
// Keep their parent stable when a streaming Session snapshot renders again.
|
|
878
889
|
var selected = !__ch4acko3DshTurnFoldOpenKeys.has(foldKey) && activityEntries.some(function (activityEntry) { return interactionKeys.has(activityEntry.key); });
|