fix(npcs): stop TipTap crash black screen in secondary windows

Guard TipTap getHTML under StrictMode, wrap secondary window roots in WindowErrorBoundary, and add stability regression tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ivan Fontosh
2026-07-30 09:10:47 +08:00
parent e687303c57
commit 04c75cd725
15 changed files with 305 additions and 64 deletions
+6 -3
View File
@@ -3,6 +3,7 @@ import { createRoot } from 'react-dom/client';
import '../shared/ui/globals.css';
import { EditorI18nProvider } from '../editor/i18n/EditorI18nContext';
import { WindowErrorBoundary } from '../shared/ui/WindowErrorBoundary';
import { SceneEditorApp } from './SceneEditorApp';
@@ -13,8 +14,10 @@ if (!rootEl) {
createRoot(rootEl).render(
<React.StrictMode>
<EditorI18nProvider>
<SceneEditorApp />
</EditorI18nProvider>
<WindowErrorBoundary title="Редактор сцены">
<EditorI18nProvider>
<SceneEditorApp />
</EditorI18nProvider>
</WindowErrorBoundary>
</React.StrictMode>,
);