Skip to content

[5a] Serve catalog rows and use counts from the host #456

Open

Description

@imnasnainaec

Part of Phase 5 (#428) of the data layer plan.

getCatalogRows, paged by offset, and countUsages; "Word not in the text" from 2e's index; the catalog panel uses them, with read progress and failure from getTextReadStatus.

Done when: the catalog panel shows the same rows, sorts, filters and read status as before, from getCatalogRows and getTextReadStatus, and the selection bar and bulk actions report the same use counts as distinctUsageCount.

Depends on: 2e (#439), 4c (#455).

From the plan

API

Call Kind Request Response Replaces today Issue
getCatalogRows query session, filter, sort, offset, count Rows plus a total selectCatalogRows 5a
countUsages query session, analysis ids How many distinct tokens approve any of them distinctUsageCount 5a

Cross-book answers

Answer Today Planned Freshness Issue
Catalog rows and usage buildCatalogRows over every link getCatalogRows, paged by offset in the host Refetched when named 5a
Use counts distinctUsageCount over the catalog rows countUsages in the host On demand 5a
Forms in the text The concordance's whole-text read in the WebView, run when a catalog filter or the concordance needs it 2e's form-in-text index, read at session open; getCatalogRows filters by it At session open, and per book on a Scripture edit 2e, 5a
Text read status TextReadingStatus over the WebView's read getTextReadStatus Refetched when named 2e, 5a

Activity

  1. imnasnainaec commented on Oct 20, 2026

    @imnasnainaec
    ContributorAuthor

    Filter "Word not in the text" with bookService.isFormInText(project, form).

    • It normalizes form.
    • It returns undefined until every book is read, and while any book has failed. Show no marking then.

    Map getTextReadStatus to the read status shown today:

    • pending, or booksRead < bookCount -> loading
    • rejected -> error; the next request lists the books again
    • failedBookIds non-empty -> partial

    Once listed, the read never lists the books again, so a book added mid-session isn't read. If marking must cover that, subscribe to booksPresent.

    A failed book is read again on the next Scripture save to the project. Until then, isFormInText answers undefined.

  2. imnasnainaec commented on Oct 29, 2026

    @imnasnainaec
    ContributorAuthor

    From #540: the catalog shows a linked sense's gloss where none is typed, while sorting and the "missing gloss" filter still read the typed gloss only. #228 is to decide whether that stays: #228 (comment)

    If it changes to the displayed gloss, getCatalogRows would need every row's sense gloss in the host to sort and filter by.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions