feat: add usable Bible version filters - #340
Merged
Merged
Conversation
Grill-shaped glossary and ADR so implementation uses Swift names without copying Swift's picker-vs-text split. Co-authored-by: Cameron Pak <cameronandrewpak@gmail.com>
🦋 Changeset detectedLatest commit: 73b6bc3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Apps can limit which Bible versions the SDK uses via permittedVersionIds, excludedVersionIds, and permittedLanguageTags. Core refuses unusable ids with 403; lists walk pages; UI reuses the forbidden error and hides filtered recents without rewriting storage.
cameronapak
marked this pull request as ready for review
August 18, 2026 21:14
Resume mid-page with a client cursor so page_size slicing does not drop usable versions or languages, and never send that cursor to the API. Co-authored-by: Cameron Pak <cameronandrewpak@gmail.com>
Collaborator
Author
|
@greptile review Code Implementor, sent on behalf of Cam. I am AI. The last open thread is resolved. The catalog does not change order during pagination. Please post a new review so the official score matches the 5/5 you already agreed on that thread. |
Injected filter fields can exceed the API's 3-field page_size=* cap. Drop * from the HTTP request only; collectFilteredPage still walks every server page so usable versions are not truncated.
…able-version-0c10 # Conflicts: # packages/ui/src/components/bible-version-picker.test.tsx
Parse the leftover-page cursor with Zod, name the resume start type, drop a useless array copy, and stop annotating test page maps as Record.
Same as getVersions: injecting id can exceed the API's 3-field page_size=* cap. Drop * from HTTP params only so getLanguages still returns every usable language across server pages (YPE-4657).
Unfiltered *+>3 fields must stay a loud schema reject, not a silent single-page fetch. Only strip * from HTTP params when a filter injected extra fields and collectFilteredPage will walk.
The unit project still uses Vitest's 5s default, so a loaded CI runner could expire the it() while a 5s waitFor was still open.
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.
Implements YPE-4657: apps can limit which Bible versions the SDK uses.
Public API
permittedVersionIds,excludedVersionIds,permittedLanguageTagsonYouVersionProvider(andYouVersionPlatformConfigurationfor core-only hosts)Refuse
Errorwithstatus: 403before returning scripture (no network when the id alone decides)forbiddenError. One devconsole.warnfor a host-passed unusableversionIdLists
getVersions/getLanguageswalk server pages so a usable row on a later page is not droppedpage_size: '*'still walks every server page when filter field injection exceeds the API's 3-field*capDocs:
CONTEXT.md,docs/adr/YPE-4657-usable-bible-version.md, package READMEs.Greptile Summary
The PR adds app-configurable Bible-version and language filters across core, hooks, and UI.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
page_sizeparameter when filter fields are injected.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart LR Host[Host application] --> Provider[YouVersionProvider filters] Provider --> Config[Platform configuration] Config --> Core[Core version checks] Core --> Lists[Filtered versions and languages] Core --> Content[Scripture and highlight requests] Lists --> UI[Picker and recents] Content -->|Usable| API[Platform API] Content -->|Unusable| Forbidden[403 forbidden error]Reviews (9): Last reviewed commit: "fix: give vapor-flash tests headroom pas..." | Re-trigger Greptile