Skip to content

Address fallow findings: bump to 2.90.0, remove dead code, de-duplicate Effort dialogs#228

Open
rlorenzo wants to merge 10 commits into
mainfrom
fallow-issues
Open

Address fallow findings: bump to 2.90.0, remove dead code, de-duplicate Effort dialogs#228
rlorenzo wants to merge 10 commits into
mainfrom
fallow-issues

Conversation

@rlorenzo

Copy link
Copy Markdown
Contributor

Cleans up the issues surfaced by fallow (and fixes the audit tooling), in reviewable commits.

Tooling

  • chore(deps): update fallow ^2.38.0^2.90.0 (latest release ≥ 7 days old at the time).
  • fix(scripts): npm run audit:fallow now runs all three analyses. It was aborting after dead-code (which exits non-zero on findings), so dupes/health never ran. Now runs all and aggregates exit codes, mirroring scripts/audit.js.

Dead code (verified each finding)

  • Removed genuinely-unused exports/type re-exports (made internal helpers module-private).
  • Removed 12 uncalled static service methods across the ClinicalScheduler service layer, plus the types/imports they orphaned (AuditEntry, ClinicianRotationSummary, RotationSummary, Service/ApiResult imports) and a few pre-existing dead interfaces lint surfaced once the files were touched.
  • Intentionally kept 4 fallow false positivesSCHEDULE_LABELS, SCHEDULE_MESSAGES, percentRule (used only in Vue <template> bindings, which this fallow version doesn't trace) and UserInfo (removing it breaks the vue-tsc build).

Duplication (Effort dialog families)

  • New shared EffortDialogShell (dialog chrome) + usePercentageDialog, useEffortLabel composables + filterGroupedOptions / course-relationships utils + a local ratingStats helper.
  • De-duplicated PercentAssignment Add/Edit, EffortRecord Add/Edit + AddCourseEffort, CourseLinkDialog/CourseDetail, and EditEvaluationDialog.

Testing

  • Every commit passed the full pre-commit gate (lint + 765 frontend tests + build).
  • Smoke-tested the affected flows in the running app via Playwright: PercentAssignment Add (validation) + Edit (pre-population), Add Effort Hours→Weeks label, ad-hoc eval computed Mean/SD/N, and course-relationship link/remove (created + removed a temp link; no data left behind).

Out of scope (follow-ups)

  • Complexity/health refactors (deferred).
  • The 1,300-LOC ClinicalScheduler page duplication and the broader jscpd-only clones (services, Merit/Eval pages, HarvestDialog, layouts) — pre-existing; the CI jscpd gate is diff-scoped so they don't block.

rlorenzo added 5 commits June 16, 2026 10:45
Latest fallow release at least 7 days old as of the bump; pins the
lockfile to 2.90.0 (was 2.82.0, range was a stale ^2.38.0).
dead-code exits non-zero whenever it finds anything, which aborted the
script before dupes and health ran. Run all three unconditionally and
aggregate exit codes, mirroring scripts/audit.js.
Make internally-used helpers module-private (getRotationDetails,
clearOtherPrimaries, showConfirmationDialog) and remove the
WeekItem/ViewMode type re-exports from ScheduleView that have no
importers.
Delete 12 uncalled static methods across the ClinicalScheduler
service layer (permission, page-data, instructor-schedule, clinician,
rotation), then remove the types and imports they orphaned: AuditEntry,
ClinicianRotationSummary, RotationSummary, and the now-unused Service
and ApiResult imports. Also drops pre-existing dead interfaces that
lint surfaced once these files were touched (ClinicianRotationItem,
InstructorScheduleItem, WeekItem).
Add EffortDialogShell (dialog chrome: header, form wrapper, submit
actions) and usePercentageDialog (form composable + save/error state).
PercentAssignmentAddDialog and PercentAssignmentEditDialog now compose
them, removing the duplicated template chrome and script wiring that
fallow and jscpd flagged.
@codecov-commenter

codecov-commenter commented Jun 17, 2026

Copy link
Copy Markdown

Bundle Report

Changes will decrease total bundle size by 5.1kB (-0.24%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
viper-frontend-esm 2.12MB -5.1kB (-0.24%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: viper-frontend-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/schedule-*.js -2.3kB 49.05kB -4.48%
assets/CourseDetail-*.js -1.03kB 39.33kB -2.55%
assets/InstructorEdit-*.js -1.11kB 28.55kB -3.74%
assets/CrossListedCoursesSection-*.js -721 bytes 22.29kB -3.13%
assets/permission-*.js -1.06kB 9.56kB -10.02%
assets/CourseLinkDialog-*.js 52 bytes 9.37kB 0.56%
assets/MyEffort-*.js -2 bytes 8.17kB -0.02%
assets/EffortRecordEditDialog-*.js -238 bytes 6.12kB -3.74%
assets/InstructorDetail-*.js -2 bytes 4.97kB -0.04%
assets/EffortDialogShell-*.js (New) 3.4kB 3.4kB 100.0% 🚀
assets/CourseDetail-*.css -183 bytes 715 bytes -20.38%
assets/EffortDialogShell-*.css (New) 196 bytes 196 bytes 100.0% 🚀
assets/DialogSubmitActions-*.js (Deleted) -2.09kB 0 bytes -100.0% 🗑️

Files in assets/schedule-*.js:

  • ./src/ClinicalScheduler/services/instructor-schedule-service.ts → Total Size: 3.04kB

  • ./src/ClinicalScheduler/services/page-data-service.ts → Total Size: 1.46kB

  • ./src/ClinicalScheduler/components/ScheduleView.vue → Total Size: 245 bytes

  • ./src/ClinicalScheduler/services/rotation-service.ts → Total Size: 2.0kB

  • ./src/ClinicalScheduler/utils/confirmation-dialog.ts → Total Size: 432 bytes

  • ./src/ClinicalScheduler/utils/schedule-update-helpers.ts → Total Size: 2.68kB

  • ./src/ClinicalScheduler/services/clinician-service.ts → Total Size: 1.74kB

Files in assets/CourseDetail-*.js:

  • ./src/Effort/pages/CourseDetail.vue → Total Size: 142 bytes

  • ./src/Effort/components/EditEvaluationDialog.vue → Total Size: 258 bytes

  • ./src/Effort/components/AddCourseEffortDialog.vue → Total Size: 174 bytes

Files in assets/InstructorEdit-*.js:

  • ./src/Effort/components/PercentAssignmentAddDialog.vue → Total Size: 189 bytes

  • ./src/Effort/components/PercentAssignmentEditDialog.vue → Total Size: 192 bytes

  • ./src/Effort/composables/use-percentage-dialog.ts → Total Size: 926 bytes

Files in assets/CrossListedCoursesSection-*.js:

  • ./src/Effort/components/EffortRecordAddDialog.vue → Total Size: 174 bytes

Files in assets/permission-*.js:

  • ./src/ClinicalScheduler/services/permission-service.ts → Total Size: 3.23kB

Files in assets/CourseLinkDialog-*.js:

  • ./src/Effort/utils/course-relationships.ts → Total Size: 1.22kB

  • ./src/Effort/components/CourseLinkDialog.vue → Total Size: 159 bytes

Files in assets/EffortRecordEditDialog-*.js:

  • ./src/Effort/components/EffortRecordEditDialog.vue → Total Size: 177 bytes

  • ./src/Effort/utils/grouped-options.ts → Total Size: 380 bytes

  • ./src/Effort/composables/use-effort-label.ts → Total Size: 528 bytes

Files in assets/EffortDialogShell-*.js:

  • ./src/Effort/components/EffortDialogShell.vue → Total Size: 162 bytes

@codecov-commenter

codecov-commenter commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 44.53%. Comparing base (f6dbe72) to head (0893c7d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #228      +/-   ##
==========================================
+ Coverage   44.49%   44.53%   +0.03%     
==========================================
  Files         895      895              
  Lines       51655    51594      -61     
  Branches     4812     4806       -6     
==========================================
- Hits        22983    22976       -7     
+ Misses      28108    28054      -54     
  Partials      564      564              
Flag Coverage Δ
backend 44.64% <ø> (ø)
frontend 42.09% <ø> (+0.77%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

rlorenzo added 3 commits June 16, 2026 19:38
EffortRecordAddDialog and EffortRecordEditDialog now use the shared
EffortDialogShell, removing the duplicated header/form/actions chrome.
Extract a useEffortLabel composable and a filterGroupedOptions util
shared by the three effort dialogs, removing the duplicated
effort-label computed and grouped-select type-ahead filter.
Extract the child course-relationship table columns and the remove-link
confirmation into a shared course-relationships util. CourseLinkDialog
and CourseDetail now reuse them instead of each defining identical
QTableColumn arrays and confirm-delete handlers.
Extract a single ratingStats helper for the weighted mean/SD/total so
totalRespondents, computedMean, and computedSd no longer repeat the
rating-count destructuring and weighted-sum calculation.
`fallow audit --gate new` re-attributes pre-existing complexity findings
as "new" when files are substantially refactored — moves/rewrites defeat
its base-snapshot matching, so untouched hotspots fail the gate. Generate
a complexity (health) baseline from main's tree (same worktree approach
as the jscpd-regression jobs) and pass --health-baseline so only
genuinely-new complexity affects the verdict. Duplication stays gated by
jscpd-regression; fallow's own duplication verdict is warn-only.
@rlorenzo

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Three independent workstreams: (1) Fallow CI now generates a complexity baseline from the base branch and passes it to fallow audit for comparison, with the local script refactored to aggregate exit codes; (2) ClinicalScheduler removes dead service methods, types, and utility exports across six files; (3) Effort module introduces EffortDialogShell, useEffortLabel, usePercentageDialog, filterGroupedOptions, and course-relationships utilities, then refactors all Effort dialogs to consume them.

Changes

Effort Module: Shared Utilities and Dialog Refactoring

Layer / File(s) Summary
New shared utilities and composables
VueApp/src/Effort/composables/use-effort-label.ts, VueApp/src/Effort/utils/grouped-options.ts, VueApp/src/Effort/composables/use-percentage-dialog.ts, VueApp/src/Effort/utils/course-relationships.ts
Adds useEffortLabel (Hours/Weeks label with term-code threshold), filterGroupedOptions (header-aware grouped select filter), usePercentageDialog (centralized add/edit dialog state), and courseRelationshipColumns/confirmRemoveCourseLink (shared table columns and delete confirmation).
EffortDialogShell component
VueApp/src/Effort/components/EffortDialogShell.vue
New reusable dialog wrapper that renders a persistent q-dialog + q-form, exposes validate() and resetValidation() to parents, and emits close/submit.
Effort dialog refactors
VueApp/src/Effort/components/EffortRecordAddDialog.vue, VueApp/src/Effort/components/EffortRecordEditDialog.vue, VueApp/src/Effort/components/PercentAssignmentAddDialog.vue, VueApp/src/Effort/components/PercentAssignmentEditDialog.vue, VueApp/src/Effort/components/AddCourseEffortDialog.vue, VueApp/src/Effort/components/CourseLinkDialog.vue, VueApp/src/Effort/components/EditEvaluationDialog.vue
All dialogs switch from inline q-dialog/q-form/DialogSubmitActions to EffortDialogShell; form refs replaced by shell refs; effort-label logic replaced with useEffortLabel; grouped filtering replaced with filterGroupedOptions; percentage dialog state replaced with usePercentageDialog; course-relationship logic replaced with shared utilities.
CourseDetail page wired to shared utilities
VueApp/src/Effort/pages/CourseDetail.vue
Replaces inline childColumns computed and confirmDeleteRelationship dialog construction with courseRelationshipColumns() and confirmRemoveCourseLink().

ClinicalScheduler: Dead Code and Type Removal

Layer / File(s) Summary
Rotation types and exports narrowed
VueApp/src/ClinicalScheduler/types/rotation-types.ts, VueApp/src/ClinicalScheduler/components/ScheduleView.vue
Removes RotationSummary, InstructorScheduleItem, WeekItem type definitions; removes WeekItem/ViewMode re-exports from ScheduleView.
Service methods removed
VueApp/src/ClinicalScheduler/services/clinician-service.ts, VueApp/src/ClinicalScheduler/services/rotation-service.ts, VueApp/src/ClinicalScheduler/services/page-data-service.ts, VueApp/src/ClinicalScheduler/services/permission-service.ts, VueApp/src/ClinicalScheduler/services/instructor-schedule-service.ts
Removes getClinicianRotations, searchClinicians, getRotation, getRotationSummary, getServices, getAvailableYears, checkMultipleServices, checkMultipleRotations, hasManagePermission, getEditableServices, updatePrimaryEvaluator, getAuditHistory, getRotationWeekAudit, and their supporting local types.
Utility exports narrowed
VueApp/src/ClinicalScheduler/utils/confirmation-dialog.ts, VueApp/src/ClinicalScheduler/utils/schedule-update-helpers.ts
Removes showConfirmationDialog, getRotationDetails, and clearOtherPrimaries from public exports.

Fallow CI Tooling: Baseline Comparison

Layer / File(s) Summary
Fallow audit script refactored
scripts/audit-fallow.js, package.json
Centralizes JS_ENTRY, changes runFallow to return codes instead of early-exiting, runs all three checks unconditionally, exits with max code; bumps fallow from ^2.38.0 to ^2.90.0.
CI workflow adds baseline generation
.github/workflows/code-quality.yml
Adds a worktree-based step that generates a Fallow health baseline from base_ref, then passes --health-baseline to the existing audit step for PR-diff complexity comparison.

Sequence Diagram(s)

sequenceDiagram
  rect rgba(173, 216, 230, 0.5)
    note over Parent,EffortDialogShell: Dialog open/validate flow
    Parent->>EffortDialogShell: modelValue=true, title, submitLabel, isSaving
    EffortDialogShell->>QForm: resetValidation() on open
    Parent->>EffortDialogShell: `@submit` triggered by user
    EffortDialogShell->>QForm: validate(true)
    QForm-->>EffortDialogShell: boolean result
    EffortDialogShell-->>Parent: emit submit (if valid)
  end
  rect rgba(144, 238, 144, 0.5)
    note over Parent,usePercentageDialog: Percentage dialog state composition
    Parent->>usePercentageDialog: percentAssignTypes, units
    usePercentageDialog->>usePercentageForm: assemble form + fieldProps
    usePercentageDialog->>useUnsavedChanges: setInitialState, confirmClose
    usePercentageDialog-->>Parent: form, fieldProps, isSaving, errorMessage, warningMessage, pendingWarningConfirm
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • ucdavis/VIPER#174: Directly related — both PRs modify .github/workflows/code-quality.yml to run npx fallow in the fallow-regression CI job, including baseline generation and comparison logic.
  • ucdavis/VIPER#177: Related at the code level — the ClinicalScheduler export and dead-code removal work in clinician-service.ts, instructor-schedule-service.ts, permission-service.ts, and related files overlaps with that PR's ClinicalScheduler export cleanup.

Suggested reviewers

  • bsedwards
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Title clearly and concisely summarizes the three main changes: fallow bump to 2.90.0, dead code removal, and Effort dialog de-duplication.
Description check ✅ Passed Description thoroughly documents tooling updates, dead code removals with rationale, duplication elimination strategy, testing validation, and intentional false positives retained.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fallow-issues

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.github/workflows/code-quality.yml (1)

15-19: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Set explicit least-privilege GITHUB_TOKEN permissions for this workflow.

This workflow currently relies on default token permissions. Add explicit read-only permissions at workflow scope to prevent unintended write-capable defaults in PR runs.

Suggested patch
 name: Code Quality
 
 on:
   pull_request:
     branches: [main]
+
+permissions:
+  contents: read
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/code-quality.yml around lines 15 - 19, The workflow lacks
explicit GITHUB_TOKEN permissions, which relies on potentially unsafe defaults.
Add a permissions block at the workflow level (before the jobs section) or at
the fallow-regression job level to explicitly set least-privilege access.
Configure the permissions to grant only read access to contents (content: read)
and set other permissions to none to prevent unintended write capabilities
during PR runs.

Source: Linters/SAST tools

VueApp/src/Effort/components/PercentAssignmentEditDialog.vue (1)

152-154: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Guard the update call with try/catch/finally to avoid stuck saving state.

Line 152 awaits percentageService.updatePercentage(...) outside a try/catch/finally. A rejection skips error messaging and can leave isSaving true.

Suggested fix
 async function savePercentage() {
     if (!props.percentage) return
     const valid = await shell.value?.validate()
     if (!valid) return

     isSaving.value = true
     errorMessage.value = ""
     warningMessage.value = ""
-
-    const startDate = formatToIsoDate(form.value.startMonth!, form.value.startYear!)
-    const endDate =
-        form.value.endMonth && form.value.endYear ? formatToIsoDate(form.value.endMonth, form.value.endYear) : null
-
-    const request: UpdatePercentageRequest = {
-        percentAssignTypeId: form.value.percentAssignTypeId!,
-        unitId: form.value.unitId!,
-        modifier: form.value.modifier,
-        comment: form.value.comment || null,
-        percentageValue: form.value.percentageValue,
-        startDate,
-        endDate,
-        compensated: form.value.compensated,
-    }
-
-    const result = await percentageService.updatePercentage(props.percentage.id, request)
-    isSaving.value = false
+    try {
+        const startDate = formatToIsoDate(form.value.startMonth!, form.value.startYear!)
+        const endDate =
+            form.value.endMonth && form.value.endYear ? formatToIsoDate(form.value.endMonth, form.value.endYear) : null
+
+        const request: UpdatePercentageRequest = {
+            percentAssignTypeId: form.value.percentAssignTypeId!,
+            unitId: form.value.unitId!,
+            modifier: form.value.modifier,
+            comment: form.value.comment || null,
+            percentageValue: form.value.percentageValue,
+            startDate,
+            endDate,
+            compensated: form.value.compensated,
+        }
+
+        const result = await percentageService.updatePercentage(props.percentage.id, request)
 
-    if (!result.success) {
-        errorMessage.value = result.error ?? "Failed to update percentage assignment"
-        return
-    }
+        if (!result.success) {
+            errorMessage.value = result.error ?? "Failed to update percentage assignment"
+            return
+        }
 
-    // Warnings returned after update are informational - record is already saved
-    if (result.warnings && result.warnings.length > 0 && !pendingWarningConfirm.value) {
-        warningMessage.value = result.warnings.join("; ")
-        pendingWarningConfirm.value = true
-        savedResult.value = result.result ?? null
-        return
-    }
+        // Warnings returned after update are informational - record is already saved
+        if (result.warnings && result.warnings.length > 0 && !pendingWarningConfirm.value) {
+            warningMessage.value = result.warnings.join("; ")
+            pendingWarningConfirm.value = true
+            savedResult.value = result.result ?? null
+            return
+        }
 
-    emit("update:modelValue", false)
-    emit("saved", result.result!)
+        emit("update:modelValue", false)
+        emit("saved", result.result!)
+    } catch (err) {
+        errorMessage.value = err instanceof Error ? err.message : "Failed to update percentage assignment"
+    } finally {
+        isSaving.value = false
+    }
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@VueApp/src/Effort/components/PercentAssignmentEditDialog.vue` around lines
152 - 154, The updatePercentage method call on line 152 is not wrapped in a
try/catch/finally block, which means if the request fails, the isSaving.value
flag will remain true, leaving the UI in a stuck saving state. Wrap the
percentageService.updatePercentage call in a try block, add a catch block to
handle any errors and display an appropriate error message to the user, and move
the isSaving.value = false statement to a finally block to ensure it always
executes regardless of success or failure.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@VueApp/src/Effort/components/EffortDialogShell.vue`:
- Line 8: The q-card element on line 8 uses an inline :style binding with px
units for width and maxWidth, which violates the frontend styling guidelines.
Remove the inline :style attribute from the q-card component and instead define
the width and max-width styling either through a CSS class that uses rem units
or through appropriate Quasar utility classes. Ensure the styling follows the
coding guideline of using rem for sizing and avoiding inline styles.

---

Outside diff comments:
In @.github/workflows/code-quality.yml:
- Around line 15-19: The workflow lacks explicit GITHUB_TOKEN permissions, which
relies on potentially unsafe defaults. Add a permissions block at the workflow
level (before the jobs section) or at the fallow-regression job level to
explicitly set least-privilege access. Configure the permissions to grant only
read access to contents (content: read) and set other permissions to none to
prevent unintended write capabilities during PR runs.

In `@VueApp/src/Effort/components/PercentAssignmentEditDialog.vue`:
- Around line 152-154: The updatePercentage method call on line 152 is not
wrapped in a try/catch/finally block, which means if the request fails, the
isSaving.value flag will remain true, leaving the UI in a stuck saving state.
Wrap the percentageService.updatePercentage call in a try block, add a catch
block to handle any errors and display an appropriate error message to the user,
and move the isSaving.value = false statement to a finally block to ensure it
always executes regardless of success or failure.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 580f55be-765b-4771-ab40-87670e9327de

📥 Commits

Reviewing files that changed from the base of the PR and between f6dbe72 and 323aa41.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json, !**/package-lock.json
📒 Files selected for processing (25)
  • .github/workflows/code-quality.yml
  • VueApp/src/ClinicalScheduler/components/ScheduleView.vue
  • VueApp/src/ClinicalScheduler/services/clinician-service.ts
  • VueApp/src/ClinicalScheduler/services/instructor-schedule-service.ts
  • VueApp/src/ClinicalScheduler/services/page-data-service.ts
  • VueApp/src/ClinicalScheduler/services/permission-service.ts
  • VueApp/src/ClinicalScheduler/services/rotation-service.ts
  • VueApp/src/ClinicalScheduler/types/rotation-types.ts
  • VueApp/src/ClinicalScheduler/utils/confirmation-dialog.ts
  • VueApp/src/ClinicalScheduler/utils/schedule-update-helpers.ts
  • VueApp/src/Effort/components/AddCourseEffortDialog.vue
  • VueApp/src/Effort/components/CourseLinkDialog.vue
  • VueApp/src/Effort/components/EditEvaluationDialog.vue
  • VueApp/src/Effort/components/EffortDialogShell.vue
  • VueApp/src/Effort/components/EffortRecordAddDialog.vue
  • VueApp/src/Effort/components/EffortRecordEditDialog.vue
  • VueApp/src/Effort/components/PercentAssignmentAddDialog.vue
  • VueApp/src/Effort/components/PercentAssignmentEditDialog.vue
  • VueApp/src/Effort/composables/use-effort-label.ts
  • VueApp/src/Effort/composables/use-percentage-dialog.ts
  • VueApp/src/Effort/pages/CourseDetail.vue
  • VueApp/src/Effort/utils/course-relationships.ts
  • VueApp/src/Effort/utils/grouped-options.ts
  • package.json
  • scripts/audit-fallow.js
💤 Files with no reviewable changes (5)
  • VueApp/src/ClinicalScheduler/utils/schedule-update-helpers.ts
  • VueApp/src/ClinicalScheduler/services/permission-service.ts
  • VueApp/src/ClinicalScheduler/services/page-data-service.ts
  • VueApp/src/ClinicalScheduler/services/instructor-schedule-service.ts
  • VueApp/src/ClinicalScheduler/services/clinician-service.ts

Comment thread VueApp/src/Effort/components/EffortDialogShell.vue Outdated
DESIGN.md requires rem and forbids inline styles; EffortDialogShell used
an inline px max-width. Switch to the existing dialog-card-sm class
(31.25rem / 500px) and drop the maxWidth prop, standardizing the effort
dialogs on the design-system size. Addresses CodeRabbit review on #228.

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

This PR addresses findings surfaced by fallow by updating the toolchain, removing verified-dead ClinicalScheduler exports/methods/types, and de-duplicating several Effort dialog implementations via shared utilities/composables/components.

Changes:

  • Updated fallow to ^2.90.0, fixed the audit-fallow script to run all analyses, and improved CI regression gating by baselining fallow health against the base branch.
  • Introduced shared Effort dialog building blocks (EffortDialogShell, usePercentageDialog, useEffortLabel, and shared utils) and refactored multiple dialogs/pages to use them.
  • Removed unused ClinicalScheduler exports/types and uncalled service methods identified as dead code.

Reviewed changes

Copilot reviewed 25 out of 26 changed files in this pull request and generated no comments.

Show a summary per file
File Description
VueApp/src/Effort/utils/grouped-options.ts Adds a reusable grouped-options typeahead filter used by grouped q-select option lists.
VueApp/src/Effort/utils/course-relationships.ts Centralizes Course Relationship table column definitions and the “confirm remove link” dialog.
VueApp/src/Effort/pages/CourseDetail.vue Uses shared course-relationship columns and confirm dialog helper to reduce duplication.
VueApp/src/Effort/composables/use-percentage-dialog.ts Adds a shared composable bundling percentage-form state + unsaved-changes + save/error/warn state.
VueApp/src/Effort/composables/use-effort-label.ts Centralizes “Hours vs Weeks” effort label logic with an optional required asterisk.
VueApp/src/Effort/components/PercentAssignmentEditDialog.vue Refactors to EffortDialogShell + usePercentageDialog to reduce duplicated dialog scaffolding.
VueApp/src/Effort/components/PercentAssignmentAddDialog.vue Refactors to EffortDialogShell + usePercentageDialog to reduce duplicated dialog scaffolding.
VueApp/src/Effort/components/EffortRecordEditDialog.vue Refactors to EffortDialogShell and shared effort-label logic.
VueApp/src/Effort/components/EffortRecordAddDialog.vue Refactors to EffortDialogShell, uses shared grouped-options filtering, and shared effort-label logic.
VueApp/src/Effort/components/EffortDialogShell.vue Introduces a shared Quasar dialog “chrome” wrapper that exposes validate/resetValidation.
VueApp/src/Effort/components/EditEvaluationDialog.vue Deduplicates rating stats computation and cleans up QForm import to be type-only.
VueApp/src/Effort/components/CourseLinkDialog.vue Uses shared course-relationship columns and confirm dialog helper to reduce duplication.
VueApp/src/Effort/components/AddCourseEffortDialog.vue Uses shared grouped-options filtering and shared effort-label logic to reduce duplication.
VueApp/src/ClinicalScheduler/utils/schedule-update-helpers.ts Removes unused exports while keeping internal helpers used by exported functions.
VueApp/src/ClinicalScheduler/utils/confirmation-dialog.ts Removes an unused exported helper, leaving only the public bulk-delete confirmation API.
VueApp/src/ClinicalScheduler/types/rotation-types.ts Removes unused interfaces/types from exported surface area.
VueApp/src/ClinicalScheduler/services/rotation-service.ts Removes unused service methods and associated type imports.
VueApp/src/ClinicalScheduler/services/permission-service.ts Removes unused batch/utility methods from the service class.
VueApp/src/ClinicalScheduler/services/page-data-service.ts Removes an unused getAvailableYears method.
VueApp/src/ClinicalScheduler/services/instructor-schedule-service.ts Removes unused audit-history methods and an orphaned type.
VueApp/src/ClinicalScheduler/services/clinician-service.ts Removes unused search/rotation methods and associated interfaces.
VueApp/src/ClinicalScheduler/components/ScheduleView.vue Narrows re-exported types to only those consumed externally.
scripts/audit-fallow.js Fixes audit script to run dead-code, dupes, and health, aggregating exit codes instead of aborting early.
package.json Bumps fallow from ^2.38.0 to ^2.90.0.
package-lock.json Updates lockfile entries for fallow and platform CLI optional deps to 2.90.0.
.github/workflows/code-quality.yml Adds a base-branch fallow health baseline and wires it into fallow audit via --health-baseline.

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.

3 participants