1075 patani malay project formatting issues#1080
Open
LeviXIII wants to merge 4 commits into
Open
Conversation
…plication` for repairing duplicated verse cells, addressing issue #848. - Implemented migration logic in `migrationUtils.ts` to handle verse duplication repairs, including a dry-run option. - Updated `merge/resolvers.ts` to apply duplication repair during merges. - Enhanced `verseRangeReorder` utility to support a repair mode for reordering cells post-duplication repair. - Added tests to validate the new repair functionality and ensure stranded cells are correctly repositioned.
…chapter, ensuring accurate handling of multi-book notebooks. - Added tests to verify that duplicates across different books are not incorrectly flagged and that pure single overlaps remain untouched.
14 tasks
Contributor
Author
|
/build |
|
Pre-release: 0.29.0-pr1080-b659104 https://github.com/genesis-ai-dev/codex-editor/releases/tag/0.29.0-pr1080-b659104 |
… repair's dedup logic, so a duplicate cell holding recorded audio (but empty text) is never soft-deleted. Previously the "empty" check only looked at the text value, so audio recorded into a duplicate cell was silently orphaned when the range/single duplicate was collapsed. - Audio-bearing duplicates now become conflicts (both forms carry data) and are left untouched for manual review, exactly like text-vs-text conflicts. A deleted audio attachment (isDeleted: true) does not protect an empty duplicate. - Add `hasAudio` and a concise passage `label` (e.g. "MAT 8:14-15") to each conflict in the repair plan. - After the confirm modal, surface the conflicts as a persistent, non-modal toast that survives past the modal: it lists the specific passages needing manual review, calls out which contain audio, and logs the full list to the console. Shown whether the user applies or cancels. - Add tests for audio preservation, deleted-audio (not protected), and the conflict label/audio flags.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #1075
The Pattani Malay project showed verses merged contrary to source versification, recent translations appearing "missing," and cells stranded out of order. Root cause (traced to #848): a book can end up stored in two versifications at once — verse-range cells (e.g.
MAT 8:14-15) coexisting with single-verse cells (MAT 8:14,MAT 8:15). The codex merge resolver dedupes cells by ID, and the two forms have different IDs, so both survive a merge and translated content gets stranded across them (and the empty duplicates pile up at the end of the file).This PR adds a manual, opt-in repair command — "Codex: Repair Duplicated Verse Cells" — that collapses this duplication and repositions stranded cells without losing content and without changing sync behavior. The merge/sync path is intentionally left unchanged.
Changes
repairModereorder that can pull cells back across intervening milestones.MIGRATIONedit entry (row + history preserved, fully recoverable). Content cells are never deleted. Overlapping-content conflicts (both forms translated, e.g.MAT 12:46-47) are left untouched and reported for manual review.GEN 1:1withEXO 1:1), range-restricted (study-bible note structures / repeated single refs are ignored), and a no-op for non-Bible importer types.Not covered by this PR (tracked separately):
was prototyped and then removed so the merge/sync path stays byte-identical to today; recurrence
is addressed by running the manual command (and existing delete-wins propagation keeps a repaired
project fixed across peers once synced).
Test Checklist
Repair correctness
Safety / no sync regression