[PR #448] [MERGED] feat: implement react-devtools support #1323

Closed
opened 2026-03-14 09:30:38 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/448
Author: @msmps
Created: 12/27/2025
Status: Merged
Merged: 12/28/2025
Merged by: @kommander

Base: mainHead: feat/react-dev-tools-20251227210353


📝 Commits (4)

  • 3397787 feat(react): update host config
  • c17d043 feat(react): integrate React DevTools support
  • 875b8f9 feat(react): add @types/ws dev dependency
  • cde9b1f feat(react): update dependencies and improve devtools integration

📊 Changes

7 files changed (+192 additions, -65 deletions)

View changed files

📝 bun.lock (+75 -55)
📝 packages/react/README.md (+29 -0)
📝 packages/react/package.json (+16 -2)
packages/react/src/reconciler/devtools-polyfill.ts (+33 -0)
packages/react/src/reconciler/devtools.ts (+10 -0)
📝 packages/react/src/reconciler/host-config.ts (+5 -0)
📝 packages/react/src/reconciler/reconciler.ts (+24 -8)

📄 Description

Summary

  • Add React DevTools support for debugging OpenTUI terminal applications.

Changes

  • Add optional peer dependencies for react-devtools-core and ws
  • Create DevTools polyfills for environments (WebSocket, browser globals)
  • Conditionally initialize DevTools when DEV=true environment variable is set
  • Filter internal components (ErrorBoundary) from DevTools for cleaner inspection
  • Document setup and usage in README

Usage

Install optional dependency

bun add --dev react-devtools-core@7

Start DevTools

npx react-devtools@7

Run app with DevTools enabled

DEV=true bun run your-app.ts

Screenshot

image

🔄 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/448 **Author:** [@msmps](https://github.com/msmps) **Created:** 12/27/2025 **Status:** ✅ Merged **Merged:** 12/28/2025 **Merged by:** [@kommander](https://github.com/kommander) **Base:** `main` ← **Head:** `feat/react-dev-tools-20251227210353` --- ### 📝 Commits (4) - [`3397787`](https://github.com/anomalyco/opentui/commit/33977871c211baf008ced8530955ed5c9fd222c9) feat(react): update host config - [`c17d043`](https://github.com/anomalyco/opentui/commit/c17d04305d6a118aa8a06d4b8991bfa6a2fb71ac) feat(react): integrate React DevTools support - [`875b8f9`](https://github.com/anomalyco/opentui/commit/875b8f9779ff55917203e0e2d84ca61651a8bc00) feat(react): add @types/ws dev dependency - [`cde9b1f`](https://github.com/anomalyco/opentui/commit/cde9b1f11d216954ca37405e9016cf3be4bcdd63) feat(react): update dependencies and improve devtools integration ### 📊 Changes **7 files changed** (+192 additions, -65 deletions) <details> <summary>View changed files</summary> 📝 `bun.lock` (+75 -55) 📝 `packages/react/README.md` (+29 -0) 📝 `packages/react/package.json` (+16 -2) ➕ `packages/react/src/reconciler/devtools-polyfill.ts` (+33 -0) ➕ `packages/react/src/reconciler/devtools.ts` (+10 -0) 📝 `packages/react/src/reconciler/host-config.ts` (+5 -0) 📝 `packages/react/src/reconciler/reconciler.ts` (+24 -8) </details> ### 📄 Description ## Summary - Add React DevTools support for debugging OpenTUI terminal applications. ## Changes - Add optional peer dependencies for `react-devtools-core` and `ws` - Create DevTools polyfills for environments (WebSocket, browser globals) - Conditionally initialize DevTools when `DEV=true` environment variable is set - Filter internal components (ErrorBoundary) from DevTools for cleaner inspection - Document setup and usage in README ## Usage ### Install optional dependency ```sh bun add --dev react-devtools-core@7 ``` ### Start DevTools ```sh npx react-devtools@7 ``` ### Run app with DevTools enabled ```sh DEV=true bun run your-app.ts ``` ## Screenshot <img width="800" height="600" alt="image" src="https://github.com/user-attachments/assets/11ab128d-8e58-4a60-9793-1e370aea5b4e" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:30:38 +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#1323
No description provided.