diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 83c5d12..d0d04b0 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -54,10 +54,8 @@ function App() { const COMMITTABLE_MODES = new Set(['plain_ocr', 'describe', 'freeform']) const MODE_LABELS = { plain_ocr: 'OCR Text', describe: 'Description', freeform: 'Freeform' } - // Show the full-screen result view when any committable mode has a result (or is loading) - const showResultView = view === 'new_job' && ( - Object.keys(modeResults).length > 0 || (loading && COMMITTABLE_MODES.has(mode)) - ) + // Show the full-screen result view once at least one committable mode has a result + const showResultView = view === 'new_job' && Object.keys(modeResults).length > 0 const handleFileTypeChange = useCallback((newType) => { setImage(null) @@ -254,7 +252,7 @@ function App() {
- {/* ── Full-screen OCR result view (plain_ocr + result) ── */} + {/* ── Full-screen OCR result view ── */} {showResultView ? ( + {/* Run additional modes */} +
+ +
+ + {loading + ? <> Processing... + : <> Analyze} + + {error &&

{error}

} +
+
+ {/* Image + Text */}
{imagePreview && typeof imagePreview === 'string' ? (