Skip to content

Conversation

@ohah
Copy link
Owner

@ohah ohah commented Feb 11, 2026

feat/react-native-devtools-electrobun

Purpose

Add a desktop app for React Native developers that runs on Electrobun and provides Metro debugger (Chrome DevTools) only, aligned with the existing Inspector (Tauri) layout and dev workflow.

Work content

  • New package: @ohah/chrome-remote-devtools-react-native-devtools

    • Electrobun + React 19 + Vite + Tailwind 4; same stack and look as Inspector (title bar, tabs, buttons, tooltips).
    • Single feature: Metro debugger. User sets Metro URL in settings; app fetches Metro targets and shows them as tabs; each tab loads the DevTools frontend URL in an iframe.
  • CORS and window controls

    • Metro/DevTools requests are done from the main process via RPC (fetchUrl) to avoid CORS in the renderer. getMetroTargets uses this when available.
    • Custom title bar (native title bar hidden): drag region, Refresh, Settings, then Minimize / Maximize / Close (same order as Tauri Inspector). Window actions are implemented with RPC handlers in the Bun main process (closeWindow, minimizeWindow, toggleMaximizeWindow).
  • Clipboard and Permissions-Policy

    • Iframe has allow="clipboard-read *; clipboard-write *" for Copy in DevTools. Vite dev server and preview send Permissions-Policy: clipboard-read=(*), clipboard-write=(*) so the top-level document allows clipboard for itself and iframes.
  • Monorepo integration

    • Port 2420 for the app; scripts/dev.ts includes a REACT_NATIVE_DEVTOOLS service (default on) that runs the app with HMR. AGENTS.md updated with the new package and flow.

How to test

  • From repo root: bun run dev (or set INCLUDE_REACT_NATIVE_DEVTOOLS=false to disable). Open the React Native DevTools URL (e.g. from Service URLs).
  • Set Metro URL in settings, start Metro and an RN app, then select a target and use the embedded DevTools (e.g. Console, Copy object with dev server for clipboard). Use title bar: Refresh, Settings, Minimize, Maximize, Close.

Additional info

Electrobun (Metro debugger–only) is also tracked in the Issues tab for visibility (see #130).

Relates to #128
Relates to #130

…bugger

- Add @ohah/chrome-remote-devtools-react-native-devtools package (Electrobun + React + Vite)
- Metro debugger only: Metro URL settings, target list, iframe DevTools UI
- CORS workaround: fetchUrl RPC from main process; window controls RPC (close/minimize/maximize)
- Custom title bar (hidden native): drag region, Refresh/Settings, then window controls (Tauri order)
- Permissions-Policy for clipboard in dev server; iframe allow clipboard-read/write *
- Port 2420; dev script REACT_NATIVE_DEVTOOLS service; AGENTS.md package list
@ohah ohah self-assigned this Feb 11, 2026
@ohah ohah added the enhancement New feature or request label Feb 11, 2026
@github-actions
Copy link

github-actions bot commented Feb 11, 2026

Integration Tests

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit 7780989.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Feb 11, 2026

📊 Test Results

✅ Test Status: PASSED

📸 Screenshots

Screenshots are available as artifacts. Download them here.

Artifact name: playwright-screenshots

Screenshot files
  1. test-client-rn-2.png (test-client-rn-2)
  2. test-client-web-1.png (test-client-web-1)
  3. test-client-web-2.png (test-client-web-2)
  4. test-client-rn-1.png (test-client-rn-1)

…ument codesign

- Disable maximize-to-restore (toggleMaximizeWindow) to avoid CEF freeze
- Minimize from maximized: unmaximize then minimize
- Fix fetchUrl RPC handler type (params?: unknown) for defineRPC schema
- Document macOS codesign/notarize in README and electrobun.config comments
ohah added 2 commits February 12, 2026 03:43
- Set app.name and identifier in electrobun.config.ts
- Set index.html title to React Native DevTools
…tion

- Title bar drag region, nav buttons, window controls (min/max/close)
- Mainview styles (index.css) and entry (main.tsx)
- scripts/dev.ts: REACT_NATIVE_DEVTOOLS service, package.json deps and workspace
@github-actions
Copy link

📱 Maestro iOS Test Results

FAILED

Maestro iOS tests have completed. Check the workflow run for details.

@github-actions
Copy link

📱 Maestro Android Test Results

FAILED

Maestro Android tests have completed. Check the workflow run for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant