Improve thumbnail quality and fix mobile editor default layout
Build and Deploy Verso / deploy (push) Successful in 10m18s

Thumbnails: increase CLSI thumbnail from 190px/q50 to 400px/q80.
At 190px/50% JPEG quality, images are noticeably blurry on 2x phone
screens (source needs 380px device pixels but source is only 190px).

Editor mobile layout: getInitialLayout() was returning sideBySide for
any stored 'split' preference (set from a desktop session), even on
mobile. sideBySide on mobile renders vertically via the isMobile check
in main-layout, but the stated default was still wrong. Now on mobile,
any stored value other than 'flat' maps to verticalSplit so the
top-bottom split is always the default; flat is preserved so a user
who explicitly chose editor-only keeps that preference.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
claude
2026-06-18 11:44:34 +00:00
parent 5aab716245
commit c79ac23a15
2 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ const CONVERSION_CONFIGS = {
const PDF_TO_JPEG_CONFIGS = {
preview: { width: 794, quality: 90 },
thumbnail: { width: 190, quality: 50 },
thumbnail: { width: 400, quality: 80 },
}
const PDF_TO_JPEG_INPUT_FILENAME = 'input.pdf'
@@ -90,10 +90,14 @@ const MOBILE_MQ = '(max-width: 767px)'
function getInitialLayout(): IdeLayout {
const stored = localStorage.getItem('pdf.layout')
const isMobile = window.matchMedia(MOBILE_MQ).matches
// flat is the only preference respected on mobile — both 'split' and
// 'vertical' (which may have been stored from a desktop session) map to
// verticalSplit because side-by-side is unusable on a narrow screen.
if (stored === 'flat') return 'flat'
if (isMobile) return 'verticalSplit'
if (stored === 'split') return 'sideBySide'
if (stored === 'vertical') return isMobile ? 'verticalSplit' : 'sideBySide'
return isMobile ? 'verticalSplit' : 'sideBySide'
if (stored === 'vertical') return 'verticalSplit'
return 'sideBySide'
}
const reviewPanelStorageKey = `ui.reviewPanelOpen.${getMeta('ol-project_id')}`