mode switch bugfix

This commit is contained in:
3clyp50 2026-01-22 08:54:33 +01:00
parent 2b867f00f0
commit fdfdd45419
2 changed files with 8 additions and 4 deletions

View file

@ -334,6 +334,7 @@ export async function poll() {
);
}
afterMessagesUpdate(response.logs);
processGroupStore.applyModeSteps();
}
lastLogVersion = response.log_version;

View file

@ -1558,9 +1558,13 @@ function addProcessStep(group, id, type, heading, content, kvps, timestamp = nul
// Toggle step (store directly modifies DOM - single source of truth)
processGroupStore.toggleStep(groupId, id);
// Clear user-pinned flag when manually toggling
// (allows auto-collapse to work again on next expansion)
step.removeAttribute("data-user-pinned");
// If manually expanded, set pinned flag to prevent auto-collapse
// If collapsed, remove it
if (step.classList.contains("step-expanded")) {
step.setAttribute("data-user-pinned", "true");
} else {
step.removeAttribute("data-user-pinned");
}
});
step.appendChild(stepHeader);
@ -2077,7 +2081,6 @@ function createStepActionButtons(stepElement) {
}
});
btnContainer.appendChild(btn);
return btnContainer;
}