Skip to content

serval-admin: serval-builds: support chapter-aware project book display#3847

Open
marksvc wants to merge 1 commit intomasterfrom
task/sb-chapters
Open

serval-admin: serval-builds: support chapter-aware project book display#3847
marksvc wants to merge 1 commit intomasterfrom
task/sb-chapters

Conversation

@marksvc
Copy link
Copy Markdown
Collaborator

@marksvc marksvc commented May 5, 2026

Recently a change was made in the backend where Serval builds might be
reported with chapter numbers, indicating a partial book. This patch
modifies the Serval builds tab to display that chapter information.
Unfortunately, it may not be possible to actually test this behvaiour
very easily until we start to use partial book drafting. It is
possible to see the new frontend behaviour by modifying the backend to
re-write data with chapter lists.

In draft-jobs.component.ts there is a change to using a new
DraftJobsProjectBooks instead of projectBooks. This is so the new
feature doesn't need to also be implemented in the draft jobs
component.

Screenshot showing chapter numbers in table row: (note: I didn't try to make the chapter usage make sense in this example screenshot; this is just to show the information)
Screenshot_20260505_163422

Screenshot showing chapter numbers in expanded details:
Screenshot_20260505_163446


This change is Reviewable

@marksvc marksvc requested a review from Copilot May 5, 2026 22:43
@marksvc marksvc added e2e Run e2e tests for this pull request will require testing PR should not be merged until testers confirm testing is complete labels May 5, 2026
@marksvc marksvc marked this pull request as draft May 5, 2026 22:43
@marksvc marksvc added testing not required and removed will require testing PR should not be merged until testers confirm testing is complete labels May 5, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Serval Administration “Serval builds” UI to display chapter-aware scripture ranges (partial-book builds) by parsing chapter ranges from backend scriptureRange strings and formatting them for display.

Changes:

  • Extend ProjectBooks to carry booksAndChapters (book id + optional chapter list) instead of a plain books array.
  • Parse chapter numbers from semicolon-delimited scriptureRange segments and display them in compact range notation (e.g., GEN 10-11, 16-19; EXO).
  • Keep Draft Jobs insulated from the new chapter-aware model by introducing DraftJobsProjectBooks and only adapting when exporting.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/serval-builds.component.ts Adds formatting helpers to render book+chapter ranges and updates project-books formatting to use the new model.
src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/serval-builds.component.spec.ts Updates existing expectations and adds coverage for compact chapter-range formatting.
src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/serval-builds.component.html Switches UI display/tooltip rendering from books to formatted booksAndChapters.
src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/serval-builds-statistics.ts Updates book counting logic to use booksAndChapters.
src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/serval-build-report.ts Introduces BookAndChapters, updates ProjectBooks, and parses chapter ranges from scriptureRange.
src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/serval-build-report.spec.ts Updates expectations for the new booksAndChapters model and adds a chapter-parsing test.
src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/draft-jobs.component.ts Introduces DraftJobsProjectBooks and adapts export formatting without implementing chapter-aware display in Draft Jobs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@marksvc marksvc marked this pull request as ready for review May 5, 2026 22:49
@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.05%. Comparing base (1feb822) to head (7ea0138).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
.../app/serval-administration/draft-jobs.component.ts 40.00% 6 Missing ⚠️
...p/serval-administration/serval-builds.component.ts 84.21% 1 Missing and 2 partials ⚠️
...c/app/serval-administration/serval-build-report.ts 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3847   +/-   ##
=======================================
  Coverage   81.04%   81.05%           
=======================================
  Files         630      630           
  Lines       40592    40624   +32     
  Branches     6588     6597    +9     
=======================================
+ Hits        32898    32926   +28     
- Misses       6661     6665    +4     
  Partials     1033     1033           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Recently a change was made in the backend where Serval builds might be
reported with chapter numbers, indicating a partial book. This patch
modifies the Serval builds tab to display that chapter information.
Unfortunately, it may not be possible to actually test this behvaiour
very easily until we start to use partial book drafting. It is
possible to see the new frontend behaviour by modifying the backend to
re-write data with chapter lists.

In draft-jobs.component.ts there is a change to using a new
`DraftJobsProjectBooks` instead of `projectBooks`. This is so the new
feature doesn't need to also be implemented in the draft jobs
component.
@marksvc marksvc force-pushed the task/sb-chapters branch from 687ff86 to 7ea0138 Compare May 8, 2026 21:00
@marksvc marksvc temporarily deployed to screenshot_diff May 8, 2026 21:06 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e Run e2e tests for this pull request testing not required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants