PR 6: refactor: per-area small refactors (CTS, Scheduler, Students, CMS)#179
PR 6: refactor: per-area small refactors (CTS, Scheduler, Students, CMS)#179rlorenzo wants to merge 4 commits into
Conversation
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
25b942b to
d0b2e7f
Compare
ebe32ec to
75abeb2
Compare
d0b2e7f to
0ea0117
Compare
d26c5d8 to
8cbfb69
Compare
0ea0117 to
0fa6909
Compare
0d62a4e to
a0c55c4
Compare
0fa6909 to
5cbd5f4
Compare
a0c55c4 to
d8a3735
Compare
5cbd5f4 to
8eb247a
Compare
d8a3735 to
ddd64e7
Compare
8eb247a to
a461dcd
Compare
ddd64e7 to
66fe537
Compare
a461dcd to
6d0722d
Compare
66fe537 to
d09da71
Compare
The three repeated prototype rows now iterate over a single mock array, which is how the real implementation will pull the API response.
Add an IScheduleEntity interface implemented by InstructorSchedule and StudentSchedule, then route both services through a generic ApplyScheduleFilters extension instead of duplicating the rotation / service / week / date filter clauses.
6d0722d to
9c30e16
Compare
Bundle ReportChanges will decrease total bundle size by 881 bytes (-0.04%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: viper-frontend-esmAssets Changed:
Files in
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #179 +/- ##
==========================================
+ Coverage 43.02% 43.18% +0.16%
==========================================
Files 881 882 +1
Lines 51436 51242 -194
Branches 4812 4778 -34
==========================================
Hits 22131 22131
+ Misses 28779 28585 -194
Partials 526 526
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Introduce the StudentBaseRecord projection shape, BuildStudentPhotoListAsync, and GetActiveRossIamIdsAsync so the by-class-level / by-group / by-course methods no longer hand-roll the same photo lookup, group-assignment formatting, and Ross-IamIds pre-query.
The four public methods now delegate to private EncodeWithMap / DecodeWithMap routines parameterised by the encoding map, eliminating the byte-for-byte duplication between the UU and XX variants.
9c30e16 to
743f4e5
Compare
Summary
Part 6 of 6. Stacks on top of PR #177 (parallel to PR #178). The smallest PR in the stack — 9 files, 4 self-contained refactors.
Each commit is a small per-area dedup driven by jscpd findings on the original
code-anaylsisbranch.Commits
refactor(cts): collapse hardcoded CourseStudents rows into a v-for— replace 5 near-identical<tr>blocks with a singlev-for.refactor(scheduler): share schedule filter LINQ via IScheduleEntity— introduceIScheduleEntity+ScheduleQueryExtensionsso the by-clinician / by-rotation / by-week scheduling queries share their filter LINQ.refactor(students): consolidate StudentGroupService photo + Ross helpers— extractBuildStudentPhotoListAsync,FormatStudentDisplayName,FormatGroupAssignment,ResolvePhotoUrl, andGetActiveRossIamIdsAsyncso the by-class-level / by-group / by-course paths no longer hand-roll the same logic.refactor(cms): collapse Codecs UU/XX encoders onto shared map helpers— collapse 4 near-identical UU/XX encode/decode methods into 2 generic helpers (DecodeWithMap,EncodeWithMap) keyed by the encoding map.Conflict resolution notes
Two cherry-picks needed conflict resolution because PR 3's analyzer cleanup ran ahead of these refactors in the original chronology, and the analyzer fixes touched the pre-refactor code shape:
StudentGroupService.cs: took the refactor's structure, then re-applied PR 3's analyzer fixes to the new helper (SqlExceptionshort qualifier,!string.IsNullOrEmpty(id)overid != null,sealed record StudentBaseRecord).Codecs.cs: took the refactor's consolidated structure withStreamqualifiers shortened (the file's implicit-usings setup makesusing System.IO;unnecessary).Net effect: each file ends up at the same end-state as on the original
code-anaylsisbranch.PR stack
Test plan