The thumbnail-rail refactor hoisted <Document> to wrap both the rail and the main page so the PDF loads once. That moved the width-measuring scroll container INSIDE <Document>, which only renders its children after the PDF finishes loading. The old `useEffect(..., [])` ran on component mount — when the container was still absent — so the ResizeObserver never attached, `width` stayed null, and the main <Page> collapsed to width 0. Replace the mount-effect measurement with a callback ref: the ResizeObserver now attaches the instant the container node mounts, regardless of when that happens relative to PDF load. Disconnects cleanly on unmount / re-attach. Verified: tsc clean, vite build succeeds, preview-pdf-smoke (incl. the resize/debounce case) passes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| backend | ||
| frontend | ||
| src-tauri | ||
| __init__.py | ||
| install_llama_prebuilt.py | ||
| install_python_stack.py | ||
| LICENSE.AGPL-3.0 | ||
| package-lock.json | ||
| package.json | ||
| setup.bat | ||
| setup.ps1 | ||
| setup.sh | ||
| Unsloth_Studio_Colab.ipynb | ||