diff --git a/server-ce/Dockerfile b/server-ce/Dockerfile index 95d959fef8..7aac1f96b1 100644 --- a/server-ce/Dockerfile +++ b/server-ce/Dockerfile @@ -54,6 +54,13 @@ RUN --mount=type=cache,target=/root/.cache \ # Add the actual source files # --------------------------- COPY --parents libraries/ services/ tools/migrations/ /overleaf/ + +# Syntax-check all server-side ESM modules before the expensive webpack +# compile. node --check parses without executing, so it's fast and safe. +# Catches things like escaped backticks from sed substitutions that webpack +# never sees (it only bundles frontend code). +RUN find services/web/app/src services/web/modules -name '*.mjs' | xargs node --check + RUN --mount=type=cache,target=/root/.cache \ --mount=type=cache,target=/root/.yarn/berry/cache,id=server-ce-yarn-cache \ --mount=type=tmpfs,target=/usr/local/share/.cache/yarn \ diff --git a/services/clsi/app/js/ConversionController.js b/services/clsi/app/js/ConversionController.js index 42b83d026c..f17ce7c17d 100644 --- a/services/clsi/app/js/ConversionController.js +++ b/services/clsi/app/js/ConversionController.js @@ -336,9 +336,9 @@ async function thumbnailFromBuild(req, res) { 'pdftocairo', [ '-jpeg', - '-jpegopt', 'quality=82', + '-jpegopt', 'quality=90', '-singlefile', - '-scale-to-x', '380', + '-scale-to-x', '794', '-scale-to-y', '-1', '-f', '1', '-l', '1', diff --git a/services/web/frontend/js/shared/context/layout-context.tsx b/services/web/frontend/js/shared/context/layout-context.tsx index 22ebd481a4..b4ef85685f 100644 --- a/services/web/frontend/js/shared/context/layout-context.tsx +++ b/services/web/frontend/js/shared/context/layout-context.tsx @@ -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'