[PR #289] [MERGED] fix(solid): Call lifecycle dispose on renderer.destroy #424

Closed
opened 2026-03-02 23:46:26 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/289
Author: @veracioux
Created: 11/9/2025
Status: Merged
Merged: 11/12/2025
Merged by: @kommander

Base: mainHead: fix/framework-lifecycle-dispose


📝 Commits (7)

  • 3f398e1 fix(solid): Call lifecycle dispose on testSetup.renderer.destroy
  • fe815db Merge remote-tracking branch 'upstream/main' into fix/framework-lifecycle-dispose
  • f0403ea feat(renderer): Add CliRenderer.onDestroy callback
  • 1096e5a feat(solid): Pass onDestroy with dispose() to renderer
  • 8975d29 Merge remote-tracking branch 'upstream/main' into fix/framework-lifecycle-dispose
  • 1843812 style: Format code
  • 84f1e57 style: Format packages/solid/README.md

📊 Changes

3 files changed (+29 additions, -6 deletions)

View changed files

📝 packages/core/src/renderer.ts (+11 -0)
📝 packages/solid/README.md (+2 -2)
📝 packages/solid/index.ts (+16 -4)

📄 Description

Changes:

  • Add onDestroy callback to CliRendererOptions
  • Call solidjs dispose() in onDestroy

Addresses #288 for solidjs.


This is a proof of concept for fixing #288.

A potential alternative would be to add a dispose or onDestroy parameter to CliRendererConfig.

I only added it to the solidjs testSetup because I currently need it to write the opencode TUI tests. After your feedback, I can also add it to the production solidjs render and react+vue (if applicable).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/289 **Author:** [@veracioux](https://github.com/veracioux) **Created:** 11/9/2025 **Status:** ✅ Merged **Merged:** 11/12/2025 **Merged by:** [@kommander](https://github.com/kommander) **Base:** `main` ← **Head:** `fix/framework-lifecycle-dispose` --- ### 📝 Commits (7) - [`3f398e1`](https://github.com/anomalyco/opentui/commit/3f398e17ed46acd358326158e5bab58b35072342) fix(solid): Call lifecycle dispose on testSetup.renderer.destroy - [`fe815db`](https://github.com/anomalyco/opentui/commit/fe815db83585d655832069a8673af2540e95fdfb) Merge remote-tracking branch 'upstream/main' into fix/framework-lifecycle-dispose - [`f0403ea`](https://github.com/anomalyco/opentui/commit/f0403ea7ddac43d4bb8c115f81a4cf635be30b43) feat(renderer): Add CliRenderer.onDestroy callback - [`1096e5a`](https://github.com/anomalyco/opentui/commit/1096e5a62246ff84e08d83d78a77608d1f47c758) feat(solid): Pass onDestroy with dispose() to renderer - [`8975d29`](https://github.com/anomalyco/opentui/commit/8975d298f2c300258f94692ad5b8c4c7e89d3482) Merge remote-tracking branch 'upstream/main' into fix/framework-lifecycle-dispose - [`1843812`](https://github.com/anomalyco/opentui/commit/18438128beef442adeae70fef608f8fcb7644a13) style: Format code - [`84f1e57`](https://github.com/anomalyco/opentui/commit/84f1e57939670cc0f7159bb5131f4375d0e522f8) style: Format packages/solid/README.md ### 📊 Changes **3 files changed** (+29 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/renderer.ts` (+11 -0) 📝 `packages/solid/README.md` (+2 -2) 📝 `packages/solid/index.ts` (+16 -4) </details> ### 📄 Description Changes: - Add onDestroy callback to CliRendererOptions - Call solidjs `dispose()` in `onDestroy` Addresses #288 for solidjs. --- <del> This is a proof of concept for fixing #288. A potential alternative would be to add a dispose or onDestroy parameter to `CliRendererConfig`. I only added it to the solidjs testSetup because I currently need it to write the opencode TUI tests. After your feedback, I can also add it to the production solidjs `render` and react+vue (if applicable). </del> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 23:46:26 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#424
No description provided.