Repository navigation
feat(persistence)!: expose every note range and type reserved collection names - #327
Merged
Merged
Conversation
An error occurred while trying to automatically change base from
refactor/remove-old-sync-engine
to
feat/sync-v2-importer
October 14, 2026 18:19
A note created on Quran.com can carry several verse ranges. The device already stored all of them, but the public Note held one range and StoredNote.toNote() showed only the first (S4). Note now has ranges: List<NoteRange>, in the note's own order and never empty, and the startSura/startAyah/endSura/endAyah fields are gone. The new public NoteRange (persistence.model) mirrors sync-v2's internal one, which isn't exported to iOS. Creating a note still takes one range. NOTE-12 now passes without its knownIssue, so no scenario knownIssue is left. BREAKING CHANGE: Note(body, startSura, startAyah, endSura, endAyah, lastUpdated, id) is now Note(body, ranges, lastUpdated, id). Read a note's verses from note.ranges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… names Creating or renaming a collection to a reserved name (Favorites in any case or surrounding spacing, or a name starting with system:) threw a plain IllegalArgumentException. It now throws ReservedCollectionNameException(name), next to DuplicateCollectionNameException and ReadOnlyCollectionException, so apps can tell it apart. It extends IllegalArgumentException, so existing catches keep working. The repository and QuranDataService docs list it, and the create and rename tests assert the typed error and its name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared exported the collection model as Collection. mobile-sync-spm re-exports Shared, so the class shadowed Swift's Collection protocol in every file that imports MobileSync. Name it BookmarkCollection in Swift with @ObjCName; Kotlin and the JVM keep Collection. Also list ReadOnlyCollectionException and DuplicateCollectionNameException in the KDoc of updateCollection's timestamp overload, as the overload without a timestamp does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Note now carries a list of NoteRange instead of one start and end, so the notes list lists each range, like the Android demo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mohamede1945
force-pushed
the
feat/note-ranges
branch
from
October 14, 2026 19:07
b8ac2c0 to
f046f13
Compare
mohamede1945
changed the base branch from
refactor/remove-old-sync-engine
to
main
October 14, 2026 19:07
mohamede1945
added this pull request to stack #329
October 14, 2026 19:15
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
The last mobile-sync change the iOS adoption needs.
Notenow hasranges: List<NoteRange>, using a new publicNoteRange(startSura, startAyah, endSura, endAyah).startSura/startAyah/endSura/endAyahfields are removed, so there is one source of truth.ImportNote.knownIssue(NOTE-12). No scenarioknownIssueremains.ReservedCollectionNameException(name). It is thrown on create and rename for names starting withsystem:and for "Favorites" in any case or spacing. It extendsIllegalArgumentException, so existing catches still match.Collectionis exported to Swift asBookmarkCollection(@ObjCName). Through@_exported import Shared, a class namedCollectionwould otherwise shadowSwift.Collectionin every file that imports MobileSync.Compatibility
Note.ranges,BookmarkCollectionand the reserved-name error. That work is in a local quran-ios branch and a mobile-sync-spm branch, waiting for a mobile-sync release.Note, and itsIllegalArgumentExceptioncatches still work.Tests
./gradlew allTests --continuepasses, along with:umbrella:linkDebugFrameworkIosSimulatorArm64and:demo:android:assembleDebug.xcodebuild.:sync-pipelines:jvmTest --rerunpassed 3 runs in a row.🤖 Generated with Claude Code