Skip to content

do-not-merge - #294

Closed
imnasnainaec wants to merge 15 commits into
mainfrom
pt9-itp-atop-fprasw
Closed

do-not-merge#294
imnasnainaec wants to merge 15 commits into
mainfrom
pt9-itp-atop-fprasw

Conversation

@imnasnainaec

@imnasnainaec imnasnainaec commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

draft pr only for getting Devin's take on the test fixtures in the context of the pt9 import


This change is Reviewable

jasonleenaylor and others added 15 commits August 31, 2026 13:08
The UI half of the PT9 import. The select modal gains the import
button (shown only when the source serves convertible data, via
usePt9ImportAvailability); Pt9ImportModal carries the run, its report,
and its failures, including the too-large refusal recognized by the
RESOURCE_EXHAUSTED platform error code with the documented message
marker as fallback. An import opens read-only: every editing affordance
stays away, a banner carries sync and copy-to-editable, and
CopyToEditableModal clones an import into an editable project. On the
first open of a source with convertible PT9 data and no stored state,
Pt9ConvertPromptModal offers the conversion up front: Yes runs the
import as the only project created, No (or dismissing) persists the
empty draft so the offer never repeats, per the user-questions entry.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The Loader imports isPt9ImportReport from the converter surface that now
owns it, the frontend-mock helper rides this tree with its users, and
the offer and hasDraft tests use the shared ENOENT fixture.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Every editing affordance the read-only import view still offered is gone,
and a sync now reaches the view it refreshed.

- Merge, baseline-split, and arc-split controls read the store's read-only
  flag; the import view's segmentation dispatch is inert as a backstop, and a
  phrase mode entered on the draft no longer carries into the import.
- The import's analysis is cleared before each fetch, so the store's
  mount-time seed cannot pin pre-sync content in the view; a fetch that brings
  back nothing says so in the view area.
- The accepted first-open offer gets its intended single-door report.
- Opening an import runs through the select modal's submit guard, and the
  first-open probe gives up rather than hanging the tab.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Reading a Paratext 9 manifest now goes through one helper that gives up when
the provider never answers, so no caller can wait on it forever.

- The select modal is held inert for the whole of an import open, so a hung
  manifest read had left it with no Escape, no outside-click, and a disabled
  Cancel. A read that never answers is now an ordinary failure: one warning,
  the stored import opens, the modal comes back.
- The first-open probe reads through the same helper and keeps its plain
  try/catch.
- A rejecting fetch behind the report's Open is logged and notified rather than
  escaping the click handler unhandled.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The view derives what to show from the tag rather than having an effect clear
the previous analysis: a fetched analysis and the version it belongs to now
reach the view in the same commit, so the commit that carries a sync's new
modification time has no pre-sync analysis to paint - previously it mounted the
whole interlinear tree on the old content for a frame before the placeholder
replaced it.

Also records that the manifest timeout bounds the wait rather than the read,
PAPI offering no cancellation.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Four minimal PT9 projects under test-data/pt9-projects/, for exercising the
Paratext 9 interlinear import against a running platform - the part no unit
test covers: the platform reading the files, the import service persisting the
result, and the WebView presenting it. Each has one book and a handful of
verses, so an import finishes immediately and its report reads whole.

- PIA is the happy path: two gloss languages over one book, a phrase cluster,
  word parses, a word and parse cluster sharing one range, an approved verse
  hash, an excluded cluster, a punctuation entry, a repeated surface form for
  an ambiguous anchor, and every sense-resolution and bare-word-analysis
  outcome.
- PIB carries all five clusterDrops reasons plus an interlinear file for a
  book the project has no text for.
- PIC covers file identity: a canonical file beside a non-canonical twin,
  one file with no GlossLanguage and one with no BookId, a legacy language
  name, and two raw language values resolving onto one tag.
- PID has a lexicon and word analyses but no interlinear book file, so the
  manifest is non-empty while the conversion reports no languages.
- test-data/pt9-projects/README.md documents how to install and run them and
  tabulates what each covers. The root README's test-data line named a
  fixture removed in #272, so it now describes what the directory holds.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
PIA's text was two near-verbatim verses of Philippians followed by an
unrelated English sentence - a blend that read as scripture without being
it, and invited reading the glosses as a translation.

Its three verses are now invented words throughout, and shorter: a form that
repeats within a verse for the ambiguous anchor, a two-word run for the
phrase cluster, and stem+suffix forms for the parses. Every feature the
project covered it still covers - both gloss languages, the phrase, the
paired word+parse range, the approved hash, the excluded cluster, the
punctuation entry, all five sense-resolution outcomes, and all four
bare-word-analysis outcomes. The README says the text is invented and why
those shapes were chosen.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Importing PIA looked like it produced no glosses. It had produced them - six
records carried an es gloss - but the platform scans interlinear files in
ordinal path order, that order becomes the project's analysisLanguages, and
the WebView renders only analysisLanguages[0]. Interlinear_en sorted ahead of
Interlinear_es, so the language on screen was the deliberately thin one: two
glossed records, both in verse 1, and nothing at all in verses 2 and 3.

PIA's second gloss language is now fr, so Interlinear_es sorts first and the
es glosses are what the view shows. The thin file keeps its job - it still
overlaps es on two tokens so their records merge, and still reads "daxes" as
a single stem where es reads stem plus suffix, so the parses still conflict.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Phrases were represented by one plain two-word cluster in PIA, so the branch
that anchors them had only its happy path exercised. The rest of that branch
now has fixtures too.

PIA gains two verses rather than reworking the existing three, so nothing
already covered shifts:

- verse 4 repeats one two-word run twice and glosses it twice, so the first
  cluster is ambiguous between the two runs and the second, anchoring to the
  run the first left, is marked excluded;
- verse 5 carries a three-word phrase, glossed by both languages, so two
  phrase records merge at one run.

PIB gains the failures, beside a phrase that anchors as a control: one whose
form matches no run of words, and one whose form is blank, which is the
separate guard ahead of the run search. Both count as formMismatch.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

Base automatically changed from fix/pt9-readonly-and-sync-wiring to pt9-parsed-webview September 2, 2026 17:20
Base automatically changed from pt9-parsed-webview to main September 2, 2026 17:57
@imnasnainaec
imnasnainaec deleted the pt9-itp-atop-fprasw branch September 2, 2026 18:30
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.

2 participants