Skip to content

Feature/userinfo - #273

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

Feature/userinfo#273
JasonRobertFrancis wants to merge 62 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

Changes will increase total bundle size by 280 bytes (0.01%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
viper-frontend-esm 2.18MB 280 bytes (0.01%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: viper-frontend-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/GenericError-*.css 266 bytes 210.33kB 0.13%
assets/SchoolSummary-*.js 14 bytes 3.97kB 0.35%

Files in assets/SchoolSummary-*.js:

  • ./src/Effort/pages/SchoolSummary.vue → Total Size: 230 bytes

@codecov-commenter

codecov-commenter commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 18.62429% with 3277 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.22%. Comparing base (e8767b2) to head (503c05d).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
web/Areas/Directory/Services/UserInfoService.cs 53.14% 534 Missing and 47 partials ⚠️
web/Areas/Directory/Views/UserInfo.cshtml 0.00% 430 Missing ⚠️
web/Models/PPS/JobDV.cs 0.00% 113 Missing ⚠️
web/Models/PPS/JpmJpItemDV.cs 0.00% 98 Missing ⚠️
web/Models/PPS/PositionDV.cs 0.00% 95 Missing ⚠️
web/Models/PPS/PsJpmJpItemsV.cs 0.00% 92 Missing ⚠️
web/Models/PPS/PayGroupDV.cs 0.00% 84 Missing ⚠️
web/Models/PPS/PsJobV.cs 0.00% 81 Missing ⚠️
web/Models/PPS/JobCodeDV.cs 0.00% 69 Missing ⚠️
web/Models/PPS/PsPositionDataV.cs 0.00% 53 Missing ⚠️
... and 154 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #273      +/-   ##
==========================================
- Coverage   44.88%   43.22%   -1.67%     
==========================================
  Files         940     1102     +162     
  Lines       49107    53078    +3971     
  Branches     6577     6908     +331     
==========================================
+ Hits        22044    22945     +901     
- Misses      26125    29121    +2996     
- Partials      938     1012      +74     
Flag Coverage Δ
backend 40.48% <18.62%> (-1.65%) ⬇️
frontend 63.30% <ø> (-0.05%) ⬇️

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

Files with missing lines Coverage Δ
web/Areas/CMS/Services/CmsUserPhotoService.cs 80.51% <100.00%> (ø)
web/Areas/Directory/Models/InstinctResult.cs 100.00% <100.00%> (ø)
web/Areas/Directory/Models/UserInfoResult.cs 100.00% <100.00%> (ø)
web/Models/EquipmentLoan/Asset.cs 100.00% <100.00%> (ø)
web/Models/EquipmentLoan/Loan.cs 100.00% <100.00%> (ø)
web/Models/EquipmentLoan/LoanItem.cs 100.00% <100.00%> (ø)
web/Models/IDCards/DvtCardStatus.cs 100.00% <100.00%> (ø)
web/Models/IDCards/DvtReason.cs 100.00% <100.00%> (ø)
web/Models/IDCards/IdCard.cs 100.00% <100.00%> (ø)
web/Models/Keys/Key.cs 100.00% <100.00%> (ø)
... and 165 more

... and 5 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.

Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/Directory/Services/UserInfoService.cs Fixed
Comment thread web/Areas/RAPS/Services/UinformService.cs Fixed
@rlorenzo
rlorenzo requested a balanced review from Copilot August 20, 2026 16:01
@JasonRobertFrancis

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review skipped: 221 files exceed the limit of 100.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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 219 out of 221 changed files in this pull request and generated no new comments.

Suppressed comments (1)

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

  • This branch removes the null-guard on PostalAddress, but LdapUserContact.PostalAddress is declared = null! and is only assigned when the LDAP entry actually contains a postalAddress attribute, so it can be null at runtime. For a contact without a postal address this will throw a NullReferenceException. Note the base class IndividualSearchResult handles the same field null-safely (ldapUserContact.PostalAddress?.Replace(...) ?? ""), so the two paths are now inconsistent. Please restore the null-safe access here.
                PostalAddress = ldapUserContact.PostalAddress.Replace("$", '\n'.ToString());

@rlorenzo rlorenzo left a comment

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.

Fresh pass over the branch at c18d9c8. Three authorization and student-data issues, two logic bugs in the Instinct lookup.

Comment thread web/Areas/Directory/Controllers/UserInfoController.cs Outdated
Comment thread web/Areas/Directory/Controllers/UserInfoController.cs Outdated
Comment thread web/Areas/Directory/Views/UserInfo.cshtml
Comment thread web/Areas/Directory/Services/UserInfoService.cs Outdated
Comment thread web/Areas/Directory/Services/UserInfoService.cs
@rlorenzo

Copy link
Copy Markdown
Contributor

@JasonRobertFrancis Three threads still open after c18d9c8:

.gitignore:520-521 - .github/skills/impeccable/ and .github/hooks/impeccable.json still ignored.

Viper.csproj:9 - NU1902 still suppressed, which silences NuGet vulnerability advisories project-wide. NU1608 too.

UserInfoService.cs perf - reports-to N+1 is fixed. Still open: PopulateKeysAsync:1053 queries AAUD per key in the loop, GetUserPermissionsForSystemAsync runs 5x returning identical rows because systemPrefix never reaches the SQL, and .AsNoTracking() is absent throughout.

@rlorenzo rlorenzo left a comment

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.

Medium and low items from the same pass, inline.

Comment thread web/Areas/Directory/Services/UserInfoService.cs Outdated
Comment thread web/Classes/SQLContext/KeysContext.cs Outdated
Comment thread web/Controllers/HomeController.cs Outdated
Comment thread test/Usings.cs Outdated
Comment thread web/Areas/Directory/Services/UserInfoService.cs Outdated
Comment thread web/Areas/Directory/Models/UserInfoResult.cs
Comment thread web/Classes/Utilities/IamApi.cs
Comment thread scripts/lint-any.js Outdated
@rlorenzo

Copy link
Copy Markdown
Contributor

@JasonRobertFrancis I was testing this on TEST: https://secure-test.vetmed.ucdavis.edu/2/UserInfo/02725606 and comparing against VIPER1: https://secure-test.vetmed.ucdavis.edu/default.cfm?page=userinfo&id=1000610632&mothraID=02725606

  1. Why do 2 photos render?
  2. The UC Path section is missing "Position: 000652 APPLICATIONS PROGR 4 — 072000 VM: DEANS OFFICE" that is on VIPER1. Also, this must be a data issue, but why is my hire date set to 2/28/2025?
  3. For "System Permissions," VIPER has me with RAPS (52) and SVMSecure (356), but the VIPER2 version has me with RAPS (21), SVMSecure (291), and VIPERForms (1). Why the difference in numbers?

Comment thread .oxlintrc.json Outdated
Comment thread web/wwwroot/css/directory.css Outdated
Comment thread web/Areas/Directory/Services/UserInfoService.cs
Comment thread web/Areas/Directory/Services/UserInfoService.cs
@bsedwards

Copy link
Copy Markdown
Collaborator

@JasonRobertFrancis I was testing this on TEST: https://secure-test.vetmed.ucdavis.edu/2/UserInfo/02725606 and comparing against VIPER1: https://secure-test.vetmed.ucdavis.edu/default.cfm?page=userinfo&id=1000610632&mothraID=02725606

1. Why do 2 photos render?

2. The UC Path section is missing "Position: 000652 APPLICATIONS PROGR 4 — 072000 VM: DEANS OFFICE" that is on VIPER1. Also, this must be a data issue, but why is my hire date set to 2/28/2025?

3. For "System Permissions," VIPER has me with RAPS (52) and SVMSecure (356), but the VIPER2 version has me with RAPS (21), SVMSecure (291), and VIPERForms (1). Why the difference in numbers?

For the effective date, it looks like this is pulling the effective date of the last change to the position. It might make more sense to show the effdt on the job record (the effective date of the last change to the job) in the summary and history views.

Employees have an original hire date, but not a hire date to a specific job.

I would also suggest removing the reports to column from the uc path history. I removed this from the uc path view on the current directory because it can be ambiguous when looking at historical data (which is why it looks like Rex is reporting to Dan).

I checked Rex's permissions on test and the counts look good. The prod user info page is double counting some permissions.

{
}

public virtual DbSet<AbsenceCalendarDV> AbsenceCalendarDVs { get; set; }

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 The four new contexts scaffold 182 entities and the service queries 9 of them: PPS has 134 DbSets and uses VwPeople, VwPersonJobPositionAlls and VwPersonJobPositions; IDCards has 25 and uses IdCards, DvtCardStatuses and DvtReasons; EquipmentLoan has 13 and uses Loans; Keys has 10 and uses Keys and KeyAssignments. That is 10,531 of the 30,584 lines this PR adds, and it pulls in tables no one is querying right now, like UcpathMissingPerson20190821 and UcpathmissingpersonBk. Every one of them now has to track its database by hand. Please cut each context down to what it queries; re-scaffolding a view later takes a minute.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm guessing these tables were pulled in by the EF scaffolding tool (our pre-AI method of automating the creation of context classes). I'm OK with leaving these in because it's likely things will need them in the future, except for tables with names indicating they are a backup or copy, which may or may not exist in production and could probably be deleted from the DB altogether.

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 Per @bsedwards above, the backup/copy tables. All three are in PPS, all HasNoKey(), none queried:

Entity DB table Location
EthnicityGender20210201 ethnicityGender_2021_02_01 PPSContext.cs:2646 + Models/PPS/
UcpathMissingPerson20190821 UCPathMissingPerson_20190821 PPSContext.cs:11137 + Models/PPS/
UcpathmissingpersonBk ucpathmissingperson_bk PPSContext.cs:246, :11306 + Models/PPS/

Each is a dated snapshot or _bk copy of a table the context already maps. The IDCards, EquipmentLoan and Keys contexts have none.

Comment thread web/Areas/Directory/Services/UserInfoService.cs Outdated
Comment thread web/Areas/Directory/Services/UserInfoService.cs
<title>@ViewData["Title"] - VIPER(2.0)</title>
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
@if (HttpHelper.HttpContext != null && HttpHelper.HttpContext.Request.Path.ToString().ToLower().Contains("/directory"))
@if (HttpHelper.HttpContext != null && (HttpHelper.HttpContext.Request.Path.ToString().ToLower().Contains("/directory") || HttpHelper.HttpContext.Request.Path.ToString().ToLower().Contains("/userinfo")))

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 Two files carry edits this feature does not need. launchSettings.json flips launchBrowser to false and strips the file's BOM, which diverges from main for everyone who runs the project. This layout renames UserHelper to userHelper in five places and drops its BOM alongside the one change it does need, the /userinfo check that loads directory.css. Every MVC page renders this file, so holding its diff to that css line makes it easier to review now and to revert later.

Comment thread web/Areas/Directory/Services/UserInfoService.cs Outdated
Comment thread web/Areas/Directory/Controllers/DirectoryController.cs
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