From 648c3206dfb3649f0fa976ab358fcf162397be1d Mon Sep 17 00:00:00 2001 From: nmemmert <67961292+nmemmert@users.noreply.github.com> Date: Wed, 14 Oct 2026 12:56:57 -0400 Subject: [PATCH] Highlight translation differences, first-draft snapshot, verse notes, paste check - Compare translations can highlight the words that differ from the first translation (toggle remembered). - A copy of your notes is kept the first time commentary is shown; "First draft, before commentary" under More shows what changed since. Saving it doesn't count as editing the chunk. - Notes on single verses: a pencil next to each verse in Study, and a note line under each verse in Compare. They merge per verse across devices. - Pasting 15+ words into a note asks "Is this from AI?"; "I wrote it" counts the words as yours again. Co-Authored-By: Claude Sonnet 5.5 --- src/App.jsx | 5 +-- src/components/study/CompareSheet.jsx | 50 +++++++++++++++++--------- src/components/study/FirstDraft.jsx | 36 +++++++++++++++++++ src/components/study/NotesPane.jsx | 13 +++---- src/components/study/PastePrompt.jsx | 42 ++++++++++++++++++++++ src/components/study/ResourcePane.jsx | 7 ++++ src/components/study/ScripturePane.jsx | 14 +++++++- src/pages/StudyPage.jsx | 2 ++ src/test/App.home.test.jsx | 21 ++++++++++- src/utils/compareTranslations.js | 28 ++++++++++++++- src/utils/compareTranslations.test.js | 16 +++++++++ src/utils/mergeStudies.js | 4 +++ src/utils/ownWork.js | 10 ++++++ src/utils/ownWork.test.js | 11 ++++++ 14 files changed, 232 insertions(+), 27 deletions(-) create mode 100644 src/components/study/FirstDraft.jsx create mode 100644 src/components/study/PastePrompt.jsx diff --git a/src/App.jsx b/src/App.jsx index ae41543..a4947b6 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -356,12 +356,13 @@ const AppInner = () => { setProject((current) => (current ? updater(current) : current)); }; - const updateChunk = (chunkId, patch) => { + // `touch: false` saves a change without counting it as an edit (so it doesn't reset "last edited" for recalls and summaries). + const updateChunk = (chunkId, patch, { touch = true } = {}) => { updateProject((current) => ({ ...current, chapters: current.chapters.map((ch) => ({ ...ch, - chunks: ch.chunks.map((c) => (c.id === chunkId ? { ...c, ...patch, editedAt: Date.now() } : c)), + chunks: ch.chunks.map((c) => (c.id === chunkId ? { ...c, ...patch, ...(touch ? { editedAt: Date.now() } : {}) } : c)), })), })); }; diff --git a/src/components/study/CompareSheet.jsx b/src/components/study/CompareSheet.jsx index d02226e..47476fd 100644 --- a/src/components/study/CompareSheet.jsx +++ b/src/components/study/CompareSheet.jsx @@ -5,8 +5,9 @@ import { useApp } from '../../context/AppContext.js'; import { loadProjectById } from '../../utils/projectStorage.js'; import { formatChunkReference, getChunkVerseEntries } from '../../utils/bibleUtils.jsx'; import { READER_TRANSLATIONS, fetchChapter, translationName } from '../../utils/bibleText.js'; -import { alignVerses, translationSpans } from '../../utils/compareTranslations.js'; -import { ownShare, pastedWords, withPaste } from '../../utils/ownWork.js'; +import { alignVerses, differencesFor, markRanges, translationSpans } from '../../utils/compareTranslations.js'; +import { ownShare, pastedWords } from '../../utils/ownWork.js'; +import { usePasteCheck } from './PastePrompt.jsx'; const FIELDS = [['observation', 'Observe'], ['interpretation', 'Interpret'], ['application', 'Apply']]; @@ -48,6 +49,7 @@ const OIA = [ // They are the same notes as on the Study page, and long pastes are tagged the same way. function OiaBoxes({ chunk, updateChunk }) { const share = ownShare(chunk); + const pasteCheck = usePasteCheck(chunk, updateChunk); return (

Your notes{share !== null ? ` · ${share}% your own words` : ''}

@@ -58,9 +60,10 @@ function OiaBoxes({ chunk, updateChunk }) {