Skip to content

serval-admin: serval-builds: add copyable SF IDs in Input card#3888

Merged
marksvc merged 3 commits into
masterfrom
task/sb-ref-id
May 25, 2026
Merged

serval-admin: serval-builds: add copyable SF IDs in Input card#3888
marksvc merged 3 commits into
masterfrom
task/sb-ref-id

Conversation

@marksvc
Copy link
Copy Markdown
Collaborator

@marksvc marksvc commented May 15, 2026

The Inputs card lists training books and translation books. It also
indicates the project they are from. This patch changes the display to
include the SF project ID with a copy icon, to make it easy to get the
ID for the referenced project.

Screenshot of previous display:
image

Screenshot showing Input card, where you can see that there is now SF project IDs shown for the input projects, with a copy icon.
image


This change is Reviewable

@marksvc marksvc requested a review from Copilot May 15, 2026 19:14
@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 19:14
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” Inputs card to make referenced Scripture Forge project IDs visible and easily copyable, improving admin workflow when cross-referencing builds to SF projects.

Changes:

  • Added a small view-model (BuildInputItem) and mapping helper to produce display-ready input rows.
  • Updated the Inputs card UI to show SF project ID + copy button, plus optional short name/project name with links.
  • Added unit tests covering the new mapping helper and adjusted styling for the new layout.

Reviewed changes

Copilot reviewed 4 out of 4 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 BuildInputItem and determineBuildInputs() to prepare input display data (IDs, links, names, formatted books).
src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/serval-builds.component.html Renders project short name / name (linked), SF project ID in monospace, and a copy control in the Inputs card.
src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/serval-builds.component.scss Adds layout styles for the new multi-line per-project input display and ID styling.
src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/serval-builds.component.spec.ts Adds tests for determineBuildInputs() output (link, optional names, book formatting).
Comments suppressed due to low confidence (1)

src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/serval-builds.component.html:340

  • Same as above: projectBook.projectLink is always populated by determineBuildInputs(), so this @if (projectBook.projectLink != null) check is currently redundant and leaves an unreachable @else branch. Simplify by making projectLink required and removing the conditional, or return undefined when appropriate.
                                  @if (projectBook.projectLink != null) {
                                    <a
                                      [href]="projectBook.projectLink"
                                      target="_blank"
                                      rel="noopener"
                                      class="project-link"

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

Comment on lines +313 to +315
@for (projectBook of determineBuildInputs(projectBooks); track projectBook.sfProjectId) {
<div class="detail-project-books-item">
<div class="detail-project-books-meta detail-value-with-copy">
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 thought about this and started down the road of pre-computing the information for each record. But I changed course and used a pure pipe to do the transform. Rather than make a custom pipe for this particular transform, I made a generic pipe that lots me pass a lambda to perform a transform.

Comment on lines +317 to +346
@if (projectBook.projectLink != null) {
<a
[href]="projectBook.projectLink"
target="_blank"
rel="noopener"
class="project-link"
>
{{ projectBook.shortName }}
</a>
} @else {
<span class="project-link">{{ projectBook.shortName }}</span>
}
}
<span class="detail-project-books-id">{{ projectBook.sfProjectId }}</span>
<app-copy [value]="projectBook.sfProjectId"></app-copy>
</div>

@if (projectBook.projectName != null) {
@if (projectBook.projectLink != null) {
<a
[href]="projectBook.projectLink"
target="_blank"
rel="noopener"
class="project-link"
>
{{ projectBook.projectName }}
</a>
} @else {
<span class="project-link">{{ projectBook.projectName }}</span>
}
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 changed servalAdminProjectLinkFor to return type string when the input is string, and undefined when the input is undefined. I removed some @ifs in the template.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

❌ Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 80.90%. Comparing base (3b286af) to head (40fa1a4).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...p/serval-administration/serval-builds.component.ts 91.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3888   +/-   ##
=======================================
  Coverage   80.90%   80.90%           
=======================================
  Files         630      631    +1     
  Lines       40677    40688   +11     
  Branches     6595     6579   -16     
=======================================
+ Hits        32908    32919   +11     
- Misses       6729     6742   +13     
+ Partials     1040     1027   -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:36
@marksvc marksvc temporarily deployed to screenshot_diff May 15, 2026 21:41 — with GitHub Actions Inactive
@RaymondLuong3 RaymondLuong3 self-assigned this May 19, 2026
Copy link
Copy Markdown
Collaborator

@RaymondLuong3 RaymondLuong3 left a comment

Choose a reason for hiding this comment

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

It looks like there are merge conflicts, but otherwise it looks good.

@RaymondLuong3 reviewed 6 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on marksvc).

@RaymondLuong3 RaymondLuong3 removed the e2e Run e2e tests for this pull request label May 19, 2026
marksvc added 3 commits May 25, 2026 16:49
The Inputs card lists training books and translation books. It also
indicates the project they are from. This patch changes the display to
include the SF project ID with a copy icon, to make it easy to get the
ID for the referenced project.
@marksvc marksvc enabled auto-merge (squash) May 25, 2026 22:56
@marksvc marksvc deployed to screenshot_diff May 25, 2026 23:02 — with GitHub Actions Active
@marksvc marksvc merged commit 6687c88 into master May 25, 2026
24 of 25 checks passed
@marksvc marksvc deleted the task/sb-ref-id branch May 25, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants