Auto-select branch containing active snapshot on reload
When activeBranchSelections is empty (after reload or tab switch), selectBranchContaining is called with the effective active ID so the highlighted branch matches the active snapshot ring. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
0c707b43f3
commit
fd14d4f1a6
1 file changed
+4
@@ -3675,6 +3675,10 @@ function buildTimeline() {
|
|||||||
let tree = null;
|
let tree = null;
|
||||||
if (branchingEnabled) {
|
if (branchingEnabled) {
|
||||||
tree = buildSnapshotTree(allRecords);
|
tree = buildSnapshotTree(allRecords);
|
||||||
|
// Auto-select branch containing the active snapshot on first render
|
||||||
|
if (activeBranchSelections.size === 0 && effectiveActiveId && tree.byId.has(effectiveActiveId)) {
|
||||||
|
selectBranchContaining(effectiveActiveId, tree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── Expanded mode: one row per branch ──
|
// ── Expanded mode: one row per branch ──
|
||||||
|
|||||||
Reference in new issue
Block a user