PR 6: refactor: per-area small refactors (CTS, Scheduler, Students, CMS)#179
Open
rlorenzo wants to merge 4 commits intorefactor/dead-code-and-shared-chromefrom
Open
PR 6: refactor: per-area small refactors (CTS, Scheduler, Students, CMS)#179rlorenzo wants to merge 4 commits intorefactor/dead-code-and-shared-chromefrom
rlorenzo wants to merge 4 commits intorefactor/dead-code-and-shared-chromefrom
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
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.
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.
a0c55c4 to
d8a3735
Compare
5cbd5f4 to
8eb247a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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