Description
Fixed the unhandled promise rejection issue in WindowResizers.tsx by adding try/catch to the onResized callback.
Root Cause
The WindowResizers.tsx component calls checkWindowState() in the onResized callback without error handling. When the Tauri window state APIs fail (e.g., during DevTools interaction), the rejected promise becomes an unhandled promise rejection.
Fix
Added try/catch wrapper around await checkWindowState() in the callback.
Changes
src/components/cortex/titlebar/WindowResizers.tsx: Added try/catch in onResized callback
PR
CortexLM/cortex-ide#57
Testing
- Open DevTools
- Click Console tab
- No unhandled promise rejection should appear
This fix resolves issue #20036