// Dashboard render helper: `paintAtomic`, the atomic-swap render the tab modules // use. Pure: no DOM or module state captured, so any tab module can import it // without ordering concerns. Relative times and durations are // `@hive/shared/time.js`. // Atomic-swap render: build into an off-DOM DocumentFragment, then commit // with a single `replaceChildren`. Avoids an intermediate empty-state // flash on poll cycles even when the builder allocates a lot of nodes. export function paintAtomic(liveRoot, build) { const buf = document.createDocumentFragment(); build(buf); liveRoot.replaceChildren(buf); }