Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

fix(mine): release the viewer budget and observer when the grid re-renders

nirholas4f2179b0b698
diff --git a/src/mine.js b/src/mine.js
index f17719fcd..de2228464 100644
--- a/src/mine.js
+++ b/src/mine.js
@@ -437,6 +437,12 @@ function render() {
const grid = $('mn-grid');
const items = visibleItems();
+ // innerHTML detaches the previous cards, so drop the observer and viewer
+ // bookkeeping that still points at them. Without this a few filter switches
+ // leave the budget spent on nodes that are no longer on the page.
+ posterlessObserver.disconnect();
+ while (liveViewers.length) disposeViewer(liveViewers[liveViewers.length - 1]);
+
if (!items.length) {
grid.dataset.state = 'empty';
grid.innerHTML = emptyHTML();