Conversation
Owner
|
Will look at this for v1.3. |
classicsc
requested changes
Sep 17, 2026
classicsc
left a comment
Owner
There was a problem hiding this comment.
I'd like clearer feedback on attaching a Mokuro file. Test for page matches at that time and reject it if there's no applicable data. If it's a partial match, warn about it.
Author
|
Thanks for your review. I should have time this weekend to fix all everything. |
Owner
I'm going to be away for at least a week or more, so don't worry if it takes a while to hear back on the changes. |
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.
This PR adds support for Mokuro OCR files.
I used Claude for this change but reviewed all the code and did manual verification.
Screenshots
Gif
iPad
Testing
A. Database migration — no data loss
This is the highest-consequence risk on the branch. If lightweight migration
fails,
loadPersistentStorescallsfatalError, so the app hard-crashes onlaunch with no recovery path. There is an automated V2→V3 test, but it uses a
synthetic store — this section verifies a real one.
A0. Setup — do this first, or migration is never exercised
Running this branch on a clean simulator creates a V3 store directly and proves
nothing. You must upgrade over an existing V2 store.
main(or any commit before this branch) and run the applastReadPageis non-zeroA1. Migration succeeds
A2. No data lost
For each manga noted in A0:
A3. Post-migration writes work
A4. Second launch
re-migrated or left in a half-state each launch)
B. Existing functionality — regressions
These surfaces were touched by the
TextClusterrefactor (.observations→.lines) or by the file-picker consolidation. All three OCR surfaces consume thesame
TextClustertype, so a mistake in the refactor shows up in more than one.B1. Archive import — HIGHEST regression risk
The two
.fileImportermodifiers were collapsed into one mode-driven importer.If that's wrong, the existing Import button breaks.
+Import button opens the file picker.cbzand.zipfiles+Import button still works(proves the shared picker's mode resets correctly)
B2. Manga reader — OCR and interaction
B3. Other OCR surfaces (same
TextClustertype)colors are blue/green
B4. Library management
C. New mokuro functionality
C1. Attach / remove
.mokurofiles rather than greying them all outC2. OCR source is correct
Use a
.mokurogenerated from the CBZ itself (mokuro "my_manga.cbz" --unzip),so
img_pathnames match the archive's entry names.Box colours encode both source and direction:
text). Pairing is filename-only, so this holds even when the page counts are
identical
D. Known limitations — expected behaviour, not bugs
Listed so they aren't mistaken for regressions during review.
but never blocks an attach. Deliberate: rejecting would block legitimate files
(e.g. a mokuro run that included a cover the CBZ lacks). It does mean attaching
the wrong volume of a series can still show wrong text, since generic
001.jpgnames pair against anything.
removed: mokuro orders its
pagesarray alphabetically byimg_path, which neednot be the archive's reading order, so equal page counts do not imply equal
ordering — a real 166-page volume was still misaligned by one. A file whose names
don't match falls back to Vision rather than guessing. Generating the
.mokurofrom the CBZ makes the names line up.
to spy on the OCR actor. The pairing contract is unit-tested instead.
.mokurohas no declared UTI, soUTType(filenameExtension:)yields adynamic type. Picker filtering is covered by C1.
E. Before opening the PR
just test-plan MaruMangaTestsgreenjust test-plan MaruVisionTestsgreenjust test-plan MaruWebTestsgreen (MaruWebTests.swift was modified by the refactor)just build Debugcleanjalocale run