From c79ac23a15920110f4b3af5f263a6e657dece248 Mon Sep 17 00:00:00 2001 From: claude Date: Thu, 18 Jun 2026 11:44:34 +0000 Subject: [PATCH] Improve thumbnail quality and fix mobile editor default layout 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 --- services/clsi/app/js/ConversionManager.js | 2 +- .../web/frontend/js/shared/context/layout-context.tsx | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/services/clsi/app/js/ConversionManager.js b/services/clsi/app/js/ConversionManager.js index a41873c4f0..0b0ff626cf 100644 --- a/services/clsi/app/js/ConversionManager.js +++ b/services/clsi/app/js/ConversionManager.js @@ -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' diff --git a/services/web/frontend/js/shared/context/layout-context.tsx b/services/web/frontend/js/shared/context/layout-context.tsx index f81257a6c5..22ebd481a4 100644 --- a/services/web/frontend/js/shared/context/layout-context.tsx +++ b/services/web/frontend/js/shared/context/layout-context.tsx @@ -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')}`