serval-admin: serval-builds: stats: add translation book totals#3890
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the Serval builds administration summary to include translation-book totals alongside the existing training-book totals.
Changes:
- Adds
totalUniqueTranslationBooksandtotalTranslationBooksto the summary model. - Computes translation-book totals in
buildSummary. - Displays the new translation-book stats and updates related tests.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/serval-builds.component.ts |
Adds translation-book total fields and summary display items. |
src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/serval-builds.component.spec.ts |
Adds expectations for translation-book totals in existing summary tests. |
src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/serval-builds-statistics.ts |
Computes total and unique translation-book counts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const totalUniqueTranslationBooks: number = countUniqueBooks( | ||
| rowsWithServalData.flatMap((row: KnowableBuildRow) => row.translationBooks) | ||
| ); |
|
|
||
| const totalTranslationBooksItem: SummaryDisplayItem = { | ||
| label: 'Total translation books', | ||
| explanation: 'Including counting the same book again when used in more than one project.', |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3890 +/- ##
=======================================
Coverage 81.03% 81.03%
=======================================
Files 630 630
Lines 40677 40683 +6
Branches 6601 6596 -5
=======================================
+ Hits 32962 32968 +6
+ Misses 6694 6681 -13
- Partials 1021 1034 +13 ☔ View full report in Codecov by Sentry. |
This patch adds Serval builds summary stats for "Total unique translation books" and "Total translation books", mimicing the existing "Total unique training books" and "Total training books".
df59652 to
bc3da2f
Compare
pmachapman
left a comment
There was a problem hiding this comment.
@pmachapman reviewed 3 files and all commit messages, made 1 comment, and resolved 2 discussions.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on pmachapman).
This patch adds Serval builds summary stats for
"Total unique translation books" and
"Total translation books", mimicing the existing
"Total unique training books" and
"Total training books".
Screenshot of summary stat items:

This change is