Skip to content

TTAHUB-5344 and TTAHUB-5348 - Compliant Follow-up Reviews with TTA Support widget Table View#3681

Merged
Andrew565 merged 29 commits into
mainfrom
5344-5348-compliant-reviews-widget
Jun 24, 2026
Merged

TTAHUB-5344 and TTAHUB-5348 - Compliant Follow-up Reviews with TTA Support widget Table View#3681
Andrew565 merged 29 commits into
mainfrom
5344-5348-compliant-reviews-widget

Conversation

@Andrew565

Copy link
Copy Markdown
Collaborator

Description of change

Table view of the Compliant Follow-up Reviews with TTA Support widget for the Regional Dashboard Monitoring page.

How to test

  1. Load it up and see if it works.

Jira Issue(s)

Checklists

Every PR

  • Linked Jira issue
  • JIRA issue status updated
  • Code is meaningfully tested
  • Meets accessibility standards (WCAG 2.1 Levels A, AA)
  • API Documentation updated
  • Boundary diagram updated
  • Logical Data Model updated
  • Architectural Decision Records written for major infrastructure decisions
  • UI review complete
  • QA review complete

Before merge to main

  • OHS demo complete
  • Ready to create production PR

Production Deploy

  • PR created as Draft
  • Staging smoke test completed
  • PR transitioned to Open (this ready_for_review transition triggers the Slack/Jira automation)
  • Reviewer added after the PR is Open (elainaparrish is the authorized approver under normal circumstances)
    • Sequence: Draft PR → Smoke test → Open PR (automation runs) → Add reviewer
    • Confirm that the Slack notification was sent after the PR was opened
    • Confirm that linked Jira ticket(s) transitioned as expected; if not, review the GitHub Actions workflow logs

After merge/deploy

  • Update JIRA ticket status

@Andrew565 Andrew565 self-assigned this Jun 5, 2026
Copilot AI review requested due to automatic review settings June 5, 2026 20:26
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

⚠️ Review count advisory: 1 of 2 required human approvals. 1 more needed. Current approvers: kryswisnaskas.

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

⚠️ Diff size advisory: This PR is 1380 lines (1373+, 7−), exceeding the 500-line guideline. Consider splitting into smaller changes.

Copilot AI 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.

Pull request overview

This PR adds a new “Compliant Follow-up Reviews with TTA Support” widget to the Regional Dashboard Monitoring page, including a frontend table view and a new backend widget endpoint to supply the data.

Changes:

  • Added a new backend monitoring widget (compliantFollowUpReviewsWithTtaSupport) that computes monthly counts for follow-up reviews with/without TTA support.
  • Added a new frontend widget component intended to render the widget in a horizontal table view (with a menu toggle for tabular vs. non-tabular display).
  • Wired the widget into the Regional Dashboard Monitoring page and registered it in the widget index.

Impact assessment:

  • Benefits: Medium — introduces the requested widget/table view on the monitoring dashboard.
  • Risks: High — current backend SQL appears to ignore filters and contains counting/aliasing issues; frontend has a missing component reference that can break rendering/build depending on configuration.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
src/widgets/monitoring/compliantFollowUpReviewsWithTtaSupport.ts Adds backend widget logic + SQL query to compute monthly with/without-TTA review counts.
src/widgets/index.js Registers the new backend widget for routing/lookup.
frontend/src/widgets/CompliantFollowUpReviewsWithTtaSupport.js Adds the frontend widget container and horizontal table rendering.
frontend/src/widgets/CompliantFollowUpReviewsWithTtaSupport.css Adds widget stylesheet (currently empty).
frontend/src/pages/RegionalDashboard/components/MonitoringReportDashboard.js Adds the widget to the Monitoring dashboard layout.

Comment thread src/widgets/monitoring/compliantFollowUpReviewsWithTtaSupport.ts Outdated
Comment thread src/widgets/monitoring/compliantFollowUpReviewsWithTtaSupport.ts Outdated
Comment thread src/widgets/monitoring/compliantFollowUpReviewsWithTtaSupport.ts Outdated
Comment thread src/widgets/monitoring/compliantFollowUpReviewsWithTtaSupport.ts Outdated
Comment thread src/widgets/monitoring/compliantFollowUpReviewsWithTtaSupport.ts Outdated
Comment thread frontend/src/widgets/CompliantFollowUpReviewsWithTtaSupport.js
Comment thread frontend/src/widgets/CompliantFollowUpReviewsWithTtaSupport.js
Comment thread frontend/src/widgets/CompliantFollowUpReviewsWithTtaSupport.js Outdated
Comment thread frontend/src/widgets/CompliantFollowUpReviewsWithTtaSupport.js
Comment thread frontend/src/widgets/CompliantFollowUpReviewsWithTtaSupport.js
Comment thread frontend/src/widgets/CompliantFollowUpReviewsWithTtaSupport.js
Comment thread frontend/src/widgets/CompliantFollowUpReviewsWithTtaSupport.js
Comment thread src/widgets/monitoring/compliantFollowUpReviewsWithTtaSupport.ts
Comment thread frontend/src/widgets/CompliantFollowUpReviewsWithTtaSupport.js Outdated
Comment thread src/widgets/monitoring/compliantFollowUpReviewsWithTtaSupport.ts Outdated
Comment thread frontend/src/widgets/CompliantFollowUpReviewsWithTtaSupport.js Outdated
@github-actions github-actions Bot added the review-alerted PR has triggered an overdue review Slack alert label Jun 10, 2026
Andrew565 and others added 4 commits June 11, 2026 13:27
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
illustrative change to how the widget scopes are implemented, plus tests
@thewatermethod

Copy link
Copy Markdown
Collaborator

Bottom row stickiness seems a bit funky

Screen.Recording.2026-06-18.at.10.44.15.AM.mov

Comment on lines +71 to +73
...scopes.deliveredReview,
{ complete: true },
{ complete_date: { [Op.gte]: MIN_MONITORING_DATE } },

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.

@Andrew565 @hardwarehuman the design says the following: "Date filtering: The date range you select at the top of the dashboard filters the data based on the Follow-up review received date."

The scopes applied are to "DeliveredReview.review_delivery_date" but it looks like this sequelize function will only return the initial, now-completed review, which will make the date filter function in unexpected ways. Am I misunderstanding what this query is returning?

// Apply the deliveredReview scope (e.g. review_type) and grant filter via the ORM, since
// WhereOptions can't be injected into raw SQL. The resulting ids are passed to the SQL where
// scoped_reviews re-fetches the necessary columns and drives the rest of the query.
const deliveredReviews = await DeliveredReview.findAll({

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.

Codex said: This still does not enforce the widgets own business definition of compliant follow-up reviews. DeliveredReview.findAll only applies scopes.deliveredReview, complete: true, and the date bound; it does not add outcome: Compliant or review_type: Follow-up. Unless every caller always injects those constraints, this widget can count complete reviews that are not compliant follow-ups. The fix is to hardcode those predicates here, the same way monitoringOverview.ts does.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is a misunderstanding of the schema: Adding the predicates "outcome: compliant" etc would be incorrect and exclude reviews that have been made compliant by all of their citations being addressed. The proper way to determine compliant follow up reviews is to find reviews that are complete.

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.

Reviews where DeliveredReviews.corrected is true, which incorporates both DeliveredReviews.corrected and that all findings were actually corrected in the end.

Comment thread src/widgets/monitoring/compliantFollowUpReviewsWithTtaSupport.ts
</Grid>
<Grid row>
<CompliantFollowUpReviewsWithTtaSupport filters={filtersToApply} />
<FeatureFlag flag="compliant_follow_up_reviews_tta_support">

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.

'compliant_follow_up_reviews_tta_support' => 'monitoring-regional-dashboard'

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.

oh I see you added a flag. There is already one hanging around for monitoring regional dash, I should have mentioned

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Hmm, gotcha. Should I change to the existing one?

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 think so, that's why I left it in there (was assuming I would do this widget), that way we have less to cleanup in the future

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Further convo with Matt, he said it's not really a big deal, we just have to remember to remove this feature flag once it's ready.

@thewatermethod

Copy link
Copy Markdown
Collaborator

Bottom row stickiness seems a bit funky
Screen.Recording.2026-06-18.at.10.44.15.AM.mov

@Andrew565 I'm still seeing the bottom row is not sticky, otherwise looks good

@@ -0,0 +1,351 @@
import PropTypes from 'prop-types';

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.

This is a large file can anything be broken out into a helper file?

@Andrew565 Andrew565 added this pull request to the merge queue Jun 24, 2026
Merged via the queue into main with commit ec7e6aa Jun 24, 2026
14 checks passed
@Andrew565 Andrew565 deleted the 5344-5348-compliant-reviews-widget branch June 24, 2026 15:46
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.

7 participants