From 4ab87d2e6fdbe8d9077aa3fc4036d580eb21cc53 Mon Sep 17 00:00:00 2001 From: Aaron Roberts Date: Wed, 10 Jun 2026 10:38:27 +0100 Subject: [PATCH] Extend commit workflow to Describe and Freeform modes All text-output modes (plain_ocr, describe, freeform) now show the full-screen editable result view with metadata fields and Commit Job button. The textarea label reflects the active mode. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/App.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index d72cb6a..29ef466 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -47,8 +47,11 @@ function App() { const [commitLoading, setCommitLoading] = useState(false) const [commitResult, setCommitResult] = useState(null) + // Modes that produce editable text output and can be committed to the DB + const COMMITTABLE_MODES = new Set(['plain_ocr', 'describe', 'freeform']) + // Whether to show the full-screen result view - const showResultView = view === 'new_job' && mode === 'plain_ocr' && !!result + const showResultView = view === 'new_job' && COMMITTABLE_MODES.has(mode) && !!result const handleFileTypeChange = useCallback((newType) => { setImage(null) @@ -258,7 +261,8 @@ function App() { )}

- OCR Text (edit before committing) + {{ plain_ocr: 'OCR Text', describe: 'Description', freeform: 'Result' }[mode] || 'Result'} + (edit before committing)