[PROD] TTAHUB-5283 Fix for regional dashboard AR table#3717
Merged
Conversation
…3711) * fix for mismatched display * make more fix broader * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * use constant --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…nts (#3706) * Bump fast-xml-builder from 1.1.5 to 1.2.0 Bumps [fast-xml-builder](https://github.com/NaturalIntelligence/fast-xml-builder) from 1.1.5 to 1.2.0. - [Changelog](https://github.com/NaturalIntelligence/fast-xml-builder/blob/main/CHANGELOG.md) - [Commits](NaturalIntelligence/fast-xml-builder@v1.1.5...v1.2.0) --- updated-dependencies: - dependency-name: fast-xml-builder dependency-version: 1.2.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * TTAHUB-5378 Fix CLASS same grant matching and align widget/page counts * Fix the cleanup helper * align QA CLASS widget counts and detail rows by grant * Remove unused http-proxy-middleware package --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: thewatermethod@gmail.com <thewatermethod@gmail.com>
* test: add failing TDD test for zero-approver submission on needs-action AR Reproduces the STR: approver removes all approvers on a NEEDS_ACTION report, clicks 'Update report', validation message appears but onSubmit was still called. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: prevent submission when all approvers removed from AR review page NeedsAction.js: route 'Update report' through handleSubmit(submit) using a <Form> wrapper so the ApproverSelect notEmpty validation rule actually blocks execution (not just displays an error). Add explicit hasApprovers guard in submit() as defense-in-depth. Draft.js: include hasApprovers in canSubmitReport as defense-in-depth alongside the existing RHF required rule on ApproverSelect. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: block side-nav navigation save when it would strip all approvers In Navigator.onUpdatePage, short-circuit before onSaveDraft when the report status is SUBMITTED or NEEDS_ACTION and the form approvers would resolve to zero valid user IDs. Surfaces the error via the existing SideNav errorMessage alert mechanism. Also removes a pre-existing dead else-branch in navigatorPages map where the else case reassigned stateOfPage to its already-computed value (no-op). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: add Joi middleware blocking zero-approver submit on activity reports Add checkSubmitReportBody middleware (src/routes/activityReports/middleware.ts) following the existing checkReviewReportBody pattern. Validates only that approverUserIds is a non-empty array of positive integers; all other request body fields remain permissive via .unknown(true). Wire middleware into PUT /:activityReportId/submit in index.js. Also removes unused auditLogger import and dead userId/user variables from getGoals handler (identified during implementation). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: fix stale Joi example and add RHF handleSubmit guidance - Validation section: update Joi example to point to the route-level middleware pattern (middleware.ts) instead of a hooks file that doesn't use Joi; clarify that Joi belongs in route middleware, not model hooks. - Frontend section: add RHF handleSubmit footgun warning — plain onClick bypasses field-level validation rules (errors show but execution is not blocked); always use handleSubmit(fn) or type=submit inside Form. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * refactor: move approver-nav guard from Navigator into ActivityReportNavigator preflight Navigator is a generic shared component (used by ActivityReports, CommunicationLogs, etc.) and must not contain domain-specific field names. Move the zero-approver guard out of Navigator.onUpdatePage and into an AR-specific preFlight() function defined in ActivityReportNavigator, passed via the existing preFlightForNavigation prop — matching the same pattern LogFormNavigator already uses. Changes: - Navigator/index.js: remove REPORT_STATUSES import and AR-specific approvers/calculatedStatus check from onUpdatePage; add comment documenting the preFlightForNavigation contract for future contributors - ActivityReportNavigator.js: add preFlight() that blocks navigation on submitted/needs-action reports with zero valid approvers; pass it as preFlightForNavigation prop to Navigator - Navigator test: replace AR-specific test with generic preflight-blocks-nav test - ActivityReportNavigator test: add the AR-specific zero-approver case Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Revert "docs: fix stale Joi example and add RHF handleSubmit guidance" This reverts commit 602ac89. * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * wrap draftSaver with preFlight to block all save paths when no approver * Fix Preflight/draft save test --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* Fix for disappearing goals on RTTAPA * test(standard-goals): align test isolation with selective objective delete * Add migration to revert known invalid deletions * Remove unnecessary lookup from SQL * Linting; spelling * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Encompass AI review suggestion * Address additional PR finding --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
elainaparrish
approved these changes
Jun 23, 2026
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.
Description of change
TTAHUB-5283: Fix for pagination reset when filters change on regional dashboard AR table.
TTAHUB-5378: Fix CLASS same grant matching and align widget/page counts on the QA dashboard.
TTAHUB-5443: Prevent users from removing all approvers after an activity report is submitted.
TTAHUB-5460: Update PR quality checks to use
pull_request_targetso advisory comments work for forked PRs.TTAHUB-5470: Fix for disappearing objectives.
How to test
TTAHUB-5283: Make sure that the pagination resets back to the first page after filter change for AR table.
TTAHUB-5378: In the QA dashboard, verify a recipient only qualifies when at least one grant has both a CLASS goal and CLASS scores on the same grant, and that widget/detail counts stay aligned.
TTAHUB-5443: Try as a submitter, with activity report in needs action, and as an approver to find a way to remove all of a reports's approvers after that activity report has been submitted.
TTAHUB-5460: Open or reopen a PR targeting
mainand confirm the diff size and review count advisory jobs run successfully, including for fork PRs.TTAHUB-5470: Edit an existing goal on the RTTAPA with objectives. Note that all objectives on the RTTAPA load on the edit form. Add an objective. Save. Note that all existing objectives appear on the RTTAPA (we aren't down to one).
Jira Issue(s)
Checklists
Every PR
Before merge to main
Production Deploy
ready_for_reviewtransition triggers the Slack/Jira automation)elainaparrishis the authorized approver under normal circumstances)After merge/deploy