Files
cline/patches/@opentui-ui%2Fdialog@0.1.2.patch
Saoud Rizwan ed5f3031b0 fix(cli): silence dialog-container 'not a child of __root__' warning on exit (#12795)
On CLI exit, renderer.destroy() runs root.destroyRecursively() before
React flushes the DialogProvider's passive unmount cleanup, so the
dialog container is already detached when the cleanup calls
renderer.root.remove(container), triggering OpenTUI's 'Renderable with
id dialog-container is not a child of __root__, skipping remove'
warning. Drop the explicit remove from the patched @opentui-ui/dialog
provider cleanup (react + solid): Renderable.destroy() already detaches
from its parent when attached and no-ops when already destroyed.
2026-07-31 14:23:17 -07:00

38 lines
1.4 KiB
Diff

diff --git a/dist/dialog-container-Btgzkwy7.mjs b/dist/dialog-container-Btgzkwy7.mjs
index fa1f29023479d5df2daf399c42f1d492365365aa..9a576b394c551269e6944bbb08fb43f7a7d3a8ca 100644
--- a/dist/dialog-container-Btgzkwy7.mjs
+++ b/dist/dialog-container-Btgzkwy7.mjs
@@ -677,7 +677,7 @@ var DialogContainerRenderable = class extends BoxRenderable {
const renderable = this._dialogRenderables.get(id);
if (renderable) {
this._dialogRenderables.delete(id);
- this.remove(renderable.id);
+ this.remove(renderable);
renderable.destroyRecursively();
this.updateBackdropVisibility();
this.updateBackdropStyle();
diff --git a/dist/react.mjs b/dist/react.mjs
index 157bd9c3ba3101810e02da720b8763425fd7b0fd..72b2249b64db9c947bdb0bdd65d9cd63894ae83b 100644
--- a/dist/react.mjs
+++ b/dist/react.mjs
@@ -169,7 +169,6 @@ function DialogProvider(props) {
renderer.root.add(container);
return () => {
container.destroyRecursively();
- renderer.root.remove(container.id);
manager.destroy();
};
}, [
diff --git a/dist/solid.mjs b/dist/solid.mjs
index 2aea0ede350d79b5a8e533323fe70480bbd7f3ce..d3f518b3d77c10c06aa1ae2b591f995fe2ebda68 100644
--- a/dist/solid.mjs
+++ b/dist/solid.mjs
@@ -192,7 +192,6 @@ function DialogProvider(props) {
unsubscribe();
portalItemCache.clear();
container.destroyRecursively();
- renderer.root.remove(container.id);
manager.destroy();
});
createEffect(() => {