Fix thumbnail quality and mobile vertical split layout
Build and Deploy Verso / deploy (push) Successful in 10m23s
Build and Deploy Verso / deploy (push) Successful in 10m23s
Thumbnails: update the actual thumbnail endpoint (ConversionController.js thumbnailFromBuild) to quality=90 and width=794. The previous fix targeted ConversionManager.js which handles preview mode, not the thumbnail route called by ThumbnailManager.mjs. Mobile layout: move the isMobile guard before the stored-preference check in getInitialLayout(). The autoSave race fix (build 274) stopped future bad writes, but a stale 'flat' in localStorage was still being read on every load, blocking the mobile check. Mobile now always starts in verticalSplit regardless of any stored value. CI: add node --check on all server-side .mjs files in the Dockerfile, after source copy and before webpack compile, so syntax errors like the escaped-backtick incident fail the build immediately. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
8a821bc91d
commit
8fc71d677c
@@ -90,11 +90,13 @@ 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'
|
||||
// On mobile, always start in verticalSplit (editor above, PDF below).
|
||||
// We must check isMobile first: a stale 'flat' in localStorage (written by
|
||||
// a previous autoSave race or a desktop session) would otherwise short-circuit
|
||||
// the mobile check and leave the user stuck in a flat/editor-only layout.
|
||||
// The user can still collapse to flat during a session, but it does not persist.
|
||||
if (isMobile) return 'verticalSplit'
|
||||
if (stored === 'flat') return 'flat'
|
||||
if (stored === 'split') return 'sideBySide'
|
||||
if (stored === 'vertical') return 'verticalSplit'
|
||||
return 'sideBySide'
|
||||
|
||||
Reference in New Issue
Block a user