* fix: Prevent auto-scale from overriding manual PDF zoom changes
The recent fit mode feature added a useEffect that recalculates and sets
the initial scale whenever firstPageDims changes. However, firstPageDims
is derived from pageBaseDims state which updates on every page re-render.
This caused manual zoom changes to be immediately overwritten:
1. User clicks zoom button
2. setScale triggers page re-renders
3. handleLoadPage updates pageBaseDims
4. firstPageDims reference changes
5. useEffect fires and resets scale to initial value
Fix: Add isInitialScaleSet ref to ensure auto-scaling only happens once
per document load, preserving user's manual zoom adjustments.
* fix: Allow fitMode toggle to re-scale PDF after manual zoom
The previous fix prevented auto-scale from overriding manual zoom, but
it also prevented the fitMode toggle from working. This adds tracking
of the previous fitMode value so that changing fitMode resets the
isInitialScaleSet flag and allows re-scaling.
Also adds changeset entry for the fix.
* chore: Remove changeset for unreleased feature fix
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Fix highlight scrolling on virtualized PDFs
Use instant scroll for multi-page navigation (>1 page) to avoid layout
shift issues when virtualization loads/unloads pages during smooth scroll.
Smooth scroll only used for single-page navigation where layout is stable.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* handle storybook
* Fix indexes story import failure in CI
Revert conditional meta pattern that confused Storybook's vitest plugin
during story discovery, causing "Failed to fetch dynamically imported
module" errors in CI.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>