Skip to content

Add the Paratext 9 import service, storage, provenance, and commands - #273

Open
jasonleenaylor wants to merge 4 commits into
pt9-parsed-converterfrom
pt9-parsed-service
Open

Add the Paratext 9 import service, storage, provenance, and commands#273
jasonleenaylor wants to merge 4 commits into
pt9-parsed-converterfrom
pt9-parsed-service

Conversation

@jasonleenaylor

@jasonleenaylor jasonleenaylor commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

The backend half of the PT9 import, stacked on #272. Supersedes #268.

  • InterlinearProject gains optional pt9Import provenance (per-file hashes and
    the import timestamp). A project carrying it is frozen: storage rejects
    every user write and only the import's own save path replaces its content;
    deleting stays allowed.
  • projectStorage gains savePt9Import (create the source's single import
    project or replace it wholesale), getPt9ImportForSource, and
    createEditableCopy (clone an import's analysis into a new editable project
    with no provenance).
  • pt9ImportService.importPt9Project fetches the parsed payload through the
    platformScripture.Pt9Interlinear projectInterface, rebuilds each referenced
    book's text layer from USJ, converts, and persists - created on first run,
    replaced wholesale on later runs, and kept untouched (staleKept) when the
    source files have vanished.
  • Commands, localized strings for the import project's fixed name and
    description, and the type guards the wire surface needs.

This change is Reviewable

@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2c509e95-16dd-44a7-9110-b60af151670a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

jasonleenaylor and others added 4 commits August 27, 2026 15:52
The backend half of the PT9 import: InterlinearProject gains optional
pt9Import provenance (per-file hashes and the import timestamp), and a
project carrying it is frozen - storage rejects user writes and only the
import's own save path replaces its content, while deleting stays
allowed. projectStorage gains savePt9Import, getPt9ImportForSource, and
createEditableCopy; pt9ImportService.importPt9Project fetches the parsed
payload through the platformScripture.Pt9Interlinear projectInterface,
rebuilds each referenced book's text layer from USJ, converts, and
persists the source's single frozen import. Commands and type guards
round out the wire surface.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The provenance doc names the functions that enforce it (updateAnalysis
and updateProjectMetadata reject, savePt9Import replaces, deleteProject
accepts) and no longer claims view behavior this tree does not contain.
The writing-system fallback is pinned for a non-string setting value,
not only an empty one.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
isPt9ImportReport and its per-book helper now live in the converter's
report module, next to the type they validate and exported through the
converter's public surface, so the types layer no longer imports upward
from the converters. The frontend-mock helper leaves this tree for the
WebView change that uses it, and the ENOENT error fixture has one
definition in test-helpers instead of one per test file.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant