Clear diagnostics UI immediately, then refresh

This commit is contained in:
Aaron
2025-12-13 12:24:58 -05:00
parent 0e3b144cd7
commit e993d19886

View File

@@ -159,6 +159,9 @@ export async function initDiagUI({ elements, toast }) {
await clearDiagLog(); await clearDiagLog();
uiBuffer.length = 0; uiBuffer.length = 0;
appendUi("info", "Cleared diagnostics"); appendUi("info", "Cleared diagnostics");
// Immediately reflect empty log in UI, then refresh from server
if (logBox) logBox.textContent = "";
render([]);
await refresh(); await refresh();
} catch (e) { } catch (e) {
toast?.(e.error || "Failed to clear log", "error"); toast?.(e.error || "Failed to clear log", "error");