Skip to content

serval-admin: serval-builds: stats: add translation book totals#3890

Merged
pmachapman merged 3 commits into
masterfrom
task/sb-ttrans
May 17, 2026
Merged

serval-admin: serval-builds: stats: add translation book totals#3890
pmachapman merged 3 commits into
masterfrom
task/sb-ttrans

Conversation

@marksvc
Copy link
Copy Markdown
Collaborator

@marksvc marksvc commented May 15, 2026

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:
image


This change is Reviewable

@marksvc marksvc requested a review from Copilot May 15, 2026 21:44
@marksvc marksvc added the e2e Run e2e tests for this pull request label May 15, 2026
@marksvc marksvc marked this pull request as draft May 15, 2026 21:44
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

This PR extends the Serval builds administration summary to include translation-book totals alongside the existing training-book totals.

Changes:

  • Adds totalUniqueTranslationBooks and totalTranslationBooks to 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.

Comment on lines +282 to +284
const totalUniqueTranslationBooks: number = countUniqueBooks(
rowsWithServalData.flatMap((row: KnowableBuildRow) => row.translationBooks)
);
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I added a test.


const totalTranslationBooksItem: SummaryDisplayItem = {
label: 'Total translation books',
explanation: 'Including counting the same book again when used in more than one project.',
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Rephrased.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.03%. Comparing base (58b644e) to head (bc3da2f).
✅ All tests successful. No failed tests found.

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.
📢 Have feedback on the report? Share it here.

@marksvc marksvc marked this pull request as ready for review May 15, 2026 21:56
@marksvc marksvc temporarily deployed to screenshot_diff May 15, 2026 22:02 — with GitHub Actions Inactive
marksvc added 3 commits May 18, 2026 08:46
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".
@pmachapman pmachapman self-assigned this May 17, 2026
@pmachapman pmachapman self-requested a review May 17, 2026 20:52
@pmachapman pmachapman temporarily deployed to screenshot_diff May 17, 2026 20:53 — with GitHub Actions Inactive
Copy link
Copy Markdown
Collaborator

@pmachapman pmachapman left a comment

Choose a reason for hiding this comment

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

:lgtm:

@pmachapman reviewed 3 files and all commit messages, made 1 comment, and resolved 2 discussions.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on pmachapman).

@pmachapman pmachapman merged commit 7a0bad3 into master May 17, 2026
27 checks passed
@pmachapman pmachapman deleted the task/sb-ttrans branch May 17, 2026 21:35
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.

3 participants