Skip to content

fix(people): include HIPAA training in people table task counts and s…#2464

Merged
Marfuen merged 1 commit intomainfrom
fix/hipaa-people
Apr 6, 2026
Merged

fix(people): include HIPAA training in people table task counts and s…#2464
Marfuen merged 1 commit intomainfrom
fix/hipaa-people

Conversation

@Marfuen
Copy link
Copy Markdown
Contributor

@Marfuen Marfuen commented Apr 6, 2026

…how per-category breakdown

The people table was not accounting for HIPAA training in the task completion totals, so employees appeared fully complete even when HIPAA training was pending. Also adds individual category counts (Policies, Training, HIPAA) to the tasks column for easier at-a-glance tracking, and fixes the overview chart bar to include HIPAA in the completed segment.

What does this PR do?

  • Fixes #XXXX (GitHub issue number)
  • Fixes COMP-XXXX (Linear issue number - should be visible at the bottom of the GitHub issue description)

Visual Demo (For contributors especially)

A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).

Video Demo (if applicable):

  • Show screen recordings of the issue or feature.
  • Demonstrate how to reproduce the issue, the behavior before and after the change.

Image Demo (if applicable):

  • Add side-by-side screenshots of the original and updated change.
  • Highlight any significant change(s).

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my changes generate no new warnings

…how per-category breakdown

The people table was not accounting for HIPAA training in the task
completion totals, so employees appeared fully complete even when HIPAA
training was pending. Also adds individual category counts (Policies,
Training, HIPAA) to the tasks column for easier at-a-glance tracking,
and fixes the overview chart bar to include HIPAA in the completed segment.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Building Building Preview, Comment Apr 6, 2026 9:25pm
comp-framework-editor Building Building Preview, Comment Apr 6, 2026 9:25pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
portal Skipped Skipped Apr 6, 2026 9:25pm

Request Review

@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 6, 2026

PR Summary

Low Risk
Low risk UI/data aggregation adjustment that changes how task completion totals are computed and displayed; main risk is off-by-one/mismatched counts when HIPAA framework or training step toggles are enabled.

Overview
Fixes people task completion to count HIPAA training as its own required task when the organization has a HIPAA framework instance, preventing employees from appearing fully complete while HIPAA training is pending.

Updates the people table’s tasks column to show a per-category breakdown (Policies, Training, HIPAA) via a new TaskCompletion shape, and adjusts the dashboard completion bar chart to include HIPAA in the completed segment.

Reviewed by Cursor Bugbot for commit b4e1d1e. Bugbot is set up for automated code reviews on this repo. Configure here.

@Marfuen Marfuen merged commit 8ac2416 into main Apr 6, 2026
8 of 10 checks passed
@Marfuen Marfuen deleted the fix/hipaa-people branch April 6, 2026 21:26
claudfuen pushed a commit that referenced this pull request Apr 6, 2026
## [3.16.1](v3.16.0...v3.16.1) (2026-04-06)

### Bug Fixes

* **people:** include HIPAA training in people table task counts and show per-category breakdown ([#2464](#2464)) ([8ac2416](8ac2416))
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.16.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b4e1d1e. Configure here.

tc.completedAt !== null,
)
? 1
: 0;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

HIPAA completion undetectable when security training disabled

High Severity

When securityTrainingStepEnabled is false but the org has a HIPAA framework, trainingCompletions is set to an empty array (line 103–107). The hipaaCompleted check (line 126–135) searches this empty array, so it always returns 0. However, totalHipaaTraining is correctly set to 1 based on hasHipaaFramework alone. This means HIPAA tasks appear in the total but can never be marked completed — employees will always look incomplete. The dashboard's EmployeesOverview correctly fetches HIPAA completions in a separate query, but this component doesn't.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b4e1d1e. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants