| 1 | import ReactDOM from "react-dom/client"; |
| 2 | import App from "./App"; |
| 3 | import { installDebugBridge } from "./lib/debug"; |
| 4 | import "./index.css"; |
| 5 | |
| 6 | // Install the frontend→Rust log bridge before React mounts so any |
| 7 | // crash during initial render still lands in ~/Library/Logs/claudex. |
| 8 | installDebugBridge(); |
| 9 | |
| 10 | // StrictMode is intentionally OFF. Its dev-only double-invoke of |
| 11 | // effects forced every TerminalPane mount to run `new Terminal()` |
| 12 | // + `term.open()` + WebGL context init + ring-buffer replay |
| 13 | // twice, which on a macOS webview triggers WebGL context |
| 14 | // thrashing and multi-second main-thread stalls every time the |
| 15 | // user switches sessions. See ~/Library/Logs/claudex/claudex.log |
| 16 | // circa 2026-04-11 for the signature `mount begin → unmount → |
| 17 | // mount begin` pattern that proved it. Reinstate once the xterm |
| 18 | // mount path is genuinely idempotent and cheap. |
| 19 | ReactDOM.createRoot(document.getElementById("root")!).render(<App />); |