Skip to content

Feature/userinfo - #273

Open
JasonRobertFrancis wants to merge 52 commits into
mainfrom
feature/userinfo
Open

Feature/userinfo#273
JasonRobertFrancis wants to merge 52 commits into
mainfrom
feature/userinfo

Conversation

@JasonRobertFrancis

Copy link
Copy Markdown
Contributor

No description provided.

@codecov-commenter

codecov-commenter commented Jul 28, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@codecov-commenter

codecov-commenter commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 10.82811% with 6407 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.27%. Comparing base (ee1cfed) to head (4a2a8e1).

Files with missing lines Patch % Lines
web/Areas/Directory/Services/UserInfoService.cs 40.73% 848 Missing and 41 partials ⚠️
web/Areas/Directory/Views/UserInfo.cshtml 0.00% 427 Missing ⚠️
web/Models/PPS/VwUserinfoUser.cs 0.00% 149 Missing ⚠️
web/Models/PPS/PsJobV.cs 0.00% 125 Missing ⚠️
web/Models/PPS/JobDV.cs 0.00% 121 Missing ⚠️
web/Models/PPS/JpmJpItemDV.cs 0.00% 121 Missing ⚠️
web/Models/PPS/PositionDV.cs 0.00% 118 Missing ⚠️
web/Models/PPS/PsJpmJpItemsV.cs 0.00% 116 Missing ⚠️
web/Models/PPS/EdbperVc.cs 0.00% 104 Missing ⚠️
web/Models/PPS/VwAllJobPosOrg.cs 0.00% 102 Missing ⚠️
... and 190 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #273      +/-   ##
==========================================
- Coverage   41.74%   38.27%   -3.48%     
==========================================
  Files         992     1183     +191     
  Lines       49697    56838    +7141     
  Branches     5854     6149     +295     
==========================================
+ Hits        20748    21753    +1005     
- Misses      28038    34105    +6067     
- Partials      911      980      +69     
Flag Coverage Δ
backend 36.23% <10.82%> (-3.57%) ⬇️
frontend 58.15% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
web/Areas/Directory/Models/IDCardResult.cs 100.00% <100.00%> (ø)
web/Areas/Directory/Models/InstinctResult.cs 100.00% <100.00%> (ø)
web/Areas/Directory/Models/LoanResult.cs 100.00% <100.00%> (ø)
.../Directory/Models/IndividualSearchResultWithIDs.cs 0.00% <0.00%> (ø)
web/Areas/Directory/Models/KeyResult.cs 83.33% <83.33%> (ø)
web/Areas/Directory/Models/LdapUserContact.cs 0.00% <0.00%> (ø)
web/Models/IDCards/DvtCardStatus.cs 80.00% <80.00%> (ø)
web/Models/EquipmentLoan/AppSetting.cs 0.00% <0.00%> (ø)
web/Models/EquipmentLoan/AssetType.cs 0.00% <0.00%> (ø)
web/Models/EquipmentLoan/O.cs 0.00% <0.00%> (ø)
... and 193 more

... and 12 files with indirect coverage changes

Comment thread test/Services/UserInfoServiceUnitTests.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Classes/Utilities/IamApi.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Views/UserInfo.cshtml Fixed

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Classes/Utilities/IamApi.cs Fixed
@rlorenzo

This comment was marked as resolved.

Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
@rlorenzo

This comment was marked as resolved.

JasonRobertFrancis and others added 6 commits August 11, 2026 12:15
…ect'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…ect'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…ect'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
… IDisposable'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
…ect'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Comment on lines +1716 to +1725
foreach (var middleInitial in middleParts
.Where(middlePart => middlePart.Length > 0)
.Select(middlePart => middlePart[0]))
{
var variation = $"{name} {middleInitial}";
if (!nameVariations.Contains(variation))
{
nameVariations.Add(variation);
}
}
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 218 out of 220 changed files in this pull request and generated no new comments.

Suppressed comments (3)

web/Areas/Directory/Controllers/DirectoryController.cs:145

  • This refactor dropped the length guard that the original inline code (and the comment just below in AddVmacsContactInfoAsync) relied on. Nextel, LDPager, and Unit are string[]?, and empty XML element lists deserialize as empty (length‑0) arrays rather than null. With only a != null check, indexing [0] on an empty array will throw IndexOutOfRangeException. Restore the { Length: > 0 } guard (consistent with UserInfoService.cs which uses ?.Length > 0).
                if (vm.item.Nextel != null) result.Nextel = vm.item.Nextel[0];
                if (vm.item.LDPager != null) result.LDPager = vm.item.LDPager[0];
                if (vm.item.Unit != null) result.Department = vm.item.Unit[0];

web/Areas/Directory/Models/IndividualSearchResultWithIDs.cs:49

  • LdapUserContact.PostalAddress is declared = null! and is only assigned when the LDAP entry contains a postalAddress attribute, so it can be null at runtime. Removing the null guard here means PostalAddress.Replace(...) can throw a NullReferenceException. Note the base IndividualSearchResult constructor already uses the null-safe form (?.Replace(...) ?? ""); this override should match it.
                PostalAddress = ldapUserContact.PostalAddress.Replace("$", '\n'.ToString());

web/Classes/Utilities/LdapService.cs:123

  • The param documentation is inaccurate: this method looks up by MothraID (the filter uses ucdpersonuuid, which maps to LdapUserContact.MothraId), not by iamID. Describing the parameter as "iamID" could lead callers to pass the wrong identifier.

Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
@@ -113,6 +136,24 @@ public IActionResult DirectoryResult(string mothraID)
return View("~/Areas/Directory/Views/UserInfo.cshtml");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@JasonRobertFrancis This returns UserInfo.cshtml with no model, but the view is @model UserInfoResult and dereferences Model.DisplayFullName on line 3. Every request to /Directory/userInfo/{mothraID} is a 500. UserInfoController supersedes it and Card.cshtml now links to /UserInfo/{mothraId}, so this should be deleted.

Comment on lines +77 to +82
Console.WriteLine($"[INSTINCT SERVICE] mothraId: '{mothraId}', iamId: '{iamId}', result.MothraId: '{result.MothraId}'");
var individual = await _aaudContext.AaudUsers.FirstOrDefaultAsync(u => (u.MothraId == result.MothraId));
Console.WriteLine($"[INSTINCT SERVICE] individual is null: {individual == null}");
if (individual != null)
{
Console.WriteLine($"[INSTINCT SERVICE] individual: '{individual.DisplayFullName}', LastName: '{individual.LastName}', FirstName: '{individual.FirstName}'");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@JasonRobertFrancis These run on every user info page load and write mothraId, iamId, and the person's full name to stdout. Looks like leftover debugging from the Instinct work. There are 30 Console.WriteLine calls in this file and no ILogger at all. Please drop the debug ones and move the rest to an injected logger, running route input through LogSanitizer first.

Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment on lines +1908 to +1917
foreach (var middleInitial in middleParts
.Where(middlePart => middlePart.Length > 0)
.Select(middlePart => middlePart[0]))
{
var variation = $"{name} {middleInitial}";
if (!nameVariations.Contains(variation))
{
nameVariations.Add(variation);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants