No reviewers
Labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
schaefera/utStudyBIble!137
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/unknown-v11n"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Bibles with an unknown versification (#124): a Bible whose versification the reader has no table for (LXX, KJVA, Vulg, …) is now listed greyed, with the line "Uses the LXX versification, which this version can't read yet.", and has no Install. Until now it installed and then silently never showed in the Bible chooser. An installed one keeps Remove. An update that can't be fetched no longer counts as an update, so its row offers Remove, not a disabled Update.
Remove dialog (#125): it now reads "Removing deletes it from this phone. You can download it again later." (German included).
Closes #124. Closes #125.
Blast radius
Tier: trunk
Trunk paths touched:
sword/src/install/index.rs(IndexEntry.versification,readable_v11n())core/src/bible/installed.rs(a doc comment only)tools/e2e/(the new casemodules-unknown-v11n.sh)Testing tier: standard.
Gate / rollback: revert this merge. No schema or data change. The only change in behaviour is that Install is no longer offered for modules the reader can't open.
Proof
Local gates:
cargo make: rc 0.cargo make app-docker: rc 0. The PSS check passed on its third attempt (179526, then 177249, then 163334 kB, against 176000). That is the mem-check noise known from earlier runs; it adds nothing to memory.cargo make i18n: 134 translated, none untranslated.Fails without the change:
core/src/catalog.rsback at base, the catalog testsa_bible_with_an_unknown_versification_is_listed_greyed_with_the_reasonandan_installed_bible_with_an_unknown_versification_can_be_removedfail (2 of 25).Item::markback toself.repo.is_some(),a_newer_repo_version_with_an_unknown_versification_is_no_updatefails (30 passed, 1 failed).readable_v11n()returningtrue,install::index::tests::the_versification_is_read_and_checked_against_the_tablesfails (9 passed, 1 failed).e2e: the new case
modules-unknown-v11npasses. It checks that the LXX row is listed, its Install is disabled, and pressing it starts no task and makes no request.module-managerpasses too.CI: green on
48542b5.Phone (Plinius), build
fix/unknown-v11n@48542b5, against the live CrossWire lists:modules button LXX install disabled.kjv.confin place.Resources
Stringper index entry (a few bytes each, for 274 entries). No start-up work.Mockup
No mockup. The greyed row reuses the module manager's existing row and note line for modules that can't be installed, as locked modules already have. The dialog change is wording only.
Review
Reviewer:
325f03f: 1 medium finding. An installed unknown-versification Bible with a newer version in the lists got a disabled Update, so Remove was unreachable. Fixed in48542b5with a regression test, and answered in comment 2689.core/src/catalog.rsand its tests, which are leaf paths, so it got no re-review.Review-Confidence: 95/100 (audit). The only deduction (−5) is the leaf-path fix
48542b5made after the review; it has a regression test that fails without it. No missed defect found.Confidence by part
🤖 Generated with Claude Code
Fresh-context review. Level: high. Blast radius: trunk (sword/src/install/index.rs, core/src/bible/installed.rs). Reviewed commit:
325f03f466. Range: origin/main...HEAD.Files reviewed: core/src/bible/installed.rs, core/src/catalog.rs, core/src/catalog/tests.rs, core/src/catalog/action.rs (context), qt/src/module_manager.rs (context), sword/src/install/index.rs, sword/src/install/index/tests.rs, sword/src/module.rs (context), sword/src/v11n.rs (context), qml/pages/ModulesPage.qml, po/de.po, po/utstudybible.schaefera.pot, tools/e2e/cases/modules-unknown-v11n.sh, tools/e2e/lib.sh (context).
Findings:
No findings outside the diff. The rest (readable_v11n matching Module::from_conf's rule, trimming, empty meaning KJV, note ordering, German string, e2e case) checks out.
@ -63,2 +63,3 @@/// versification the reader knows (else it would vanish from the chooser).pub fn installable(&self) -> bool {self.repo.is_some() && !self.entry.locked && self.kind.usable()self.repo.is_some() && !self.entry.locked && self.kind.usable() && self.entry.readable_v11n()medium: an installed Bible with an unknown versification that also has a newer version in the repository can no longer be removed.
Item::marksetsupdate = repo.is_some() && repo version newer than installed.Row::action()returnsDo::Updatebefore it considersDo::Remove, andRow::enabledfor Update needsinstallable, which is now false here. Scenario: SeptLXX v1 is installed (zip import, or a preset from an older build) with Versification=LXX, and the enabled repo lists SeptLXX v2 with LXX. The row shows Update, greyed, with the note "Uses the LXX versification...", and Remove is unreachable. The new testan_installed_bible_with_an_unknown_versification_can_be_removedonly coversupdate: false, so it misses this. Before the change the Update was enabled. Fix: make Row.action() choose Remove when installed && update && !installable (or clearupdateinItem::markwhen the remote entry is not installable), and add a test withupdate: true, installable: false.Round 1, reply to the medium finding (core/src/catalog.rs:65, Remove unreachable when an installed Bible with an unknown versification has a newer repo version): fixed in
48542b5.Item::marknow setsupdateonly when the item isinstallable(), so such a row gets Remove instead of a disabled Update. The same change covers a locked module with a newer version. New testa_newer_repo_version_with_an_unknown_versification_is_no_updatecovers the update=true case and checks the row's action is Remove and enabled offline.cargo makepasses.WIP: Module manager: Bibles with an unknown versification greyed with a reason; clearer remove wording (#124, #125)to Module manager: Bibles with an unknown versification greyed with a reason; clearer remove wording (#124, #125)Merge gate (medium) on
48542b5.48542b5: all 7 statuses succeeded (changes, preset-check, rust, audit, app, e2e, click).Approved.