Skip to content

[Prod] Update utility menu for notifications, add feature flagged notification landing page, update vendor packages#3715

Merged
elainaparrish merged 3 commits into
productionfrom
main
Jun 18, 2026
Merged

[Prod] Update utility menu for notifications, add feature flagged notification landing page, update vendor packages#3715
elainaparrish merged 3 commits into
productionfrom
main

Conversation

@thewatermethod

@thewatermethod thewatermethod commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Description of change

  • Add utility menu for notifications: admins and users with the feature flag have "notifications" which takes them to the new notification landing page. The previous "notifications" link has been renamed "what's new"
  • Add a notification landing page: there are no notifications yet, but the page queries the backend and renders an empty state. Also behind a feature flag
  • Update vendor packages: http-proxy-middleware, cheerio, dom-purifier, nodemailer

How to test

CI/CD passes

The new UI elements are as described and only visible to the correct user set.

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

thewatermethod and others added 3 commits June 18, 2026 13:23
…easier (#3664)

* DRY up emails, take 1

* docs: add email_notifications.md covering flow and registration recipes

Documents the full lifecycle of an email (trigger → Bull queue →
handler → email-templates → SMTP), all notification categories
(instant, digest, training report, special), key helpers
(createEmailSender, sendIfEnabled, enqueueNotification, DIGEST_CONFIG),
environment variables, and step-by-step recipes for registering new
instant, digest, and training-report notifications.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Bare bones draft

* Build out spec

* Remove spec

* Fix mailer docker config, add missing "export"

* Add brief instructions for testing locally to readme

* 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>

* refactor: convert DIGEST_CONFIG from array to keyed object

Replace numeric-index lookups (DIGEST_CONFIG[0], etc.) with
semantic key lookups (DIGEST_CONFIG[EMAIL_ACTIONS.X]).

This eliminates positional coupling so that adding, removing,
or reordering digest types no longer risks silent breakage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: scope SMTP_HOST to fullstack, fix doc typo, derive DIGEST_EMAIL_ACTIONS from DIGEST_CONFIG

- Remove hard-coded SMTP_HOST=mailpit from always-on backend service in
  docker-compose.yml; mailpit only exists in the fullstack profile so
  core-stack runs were pointing at a non-existent SMTP host
- Document that SMTP_HOST=mailpit must be set in .env when running
  yarn docker:start:full for local email testing (email_notifications.md,
  dev-setup.md)
- Fix command typo: 'docker start:full' → 'yarn docker:start:full' in
  docs/email_notifications.md
- Derive DIGEST_EMAIL_ACTIONS from Object.keys(DIGEST_CONFIG) so any new
  digest added to DIGEST_CONFIG automatically gets a Bull processor
  registered, preventing schedule-without-processor bugs
- Add test asserting processNotificationQueue registers a processor for
  every DIGEST_CONFIG entry plus RECIPIENT_REPORT_APPROVED_DIGEST

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Remove unused http-proxy-middleware package

* Update nodemailer, cheerio, dompurify
* Rename "Notifications" to "Whats New" on the frontend

* Add notifications link to menu

* Add dummy notifications page

* Add test for notifications page

* Fix flag bug + add test

* Fix prop types and empty list render

* Address additional typos and consistency

* Update from copilot review

* [TTAHUB-5417] Notifications landing page (#3689)

* Initial skeleton

* Add notifications fetcher/tests

* Add new archive service tests/handlers

* Add "actionable" column to notifications

* Update seeders to more closely resemble real data

* Add notifications table

* Refactor sort

* Update page title

* Remove unused import

* add pagination, style fixes

* test(notifications): update tests for paginated response shape and new empty state

- Update useFetch mock to return { count, rows } shape instead of []
- Fix preferences link assertion to use getAllByRole (link appears in both
  the header and the empty-state, so multiple matches are expected)
- Replace archive-specific empty-state assertions with new 'You're all
  caught up!' heading and body copy assertions
- Add test for preferences link in the NotificationList empty state
- Add test for tabs hidden when notifications list is empty
- Add test verifying tabs render when notifications exist
- Add test that PaginationCard renders with correct totalCount when
  count exceeds per-page limit

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix empty states, add tagline under archive view

* fix: implement compound sort for notifications getNotifications

- Replace direct column order with buildOrder() helper that maps each
  ALLOWED_SORT_FIELDS key to a compound Sequelize order array:
    action_needed → [actionable DESC, createdAt <dir>, id <dir>]
    informational → [actionable ASC, createdAt <dir>, id <dir>]
    type          → [type <dir>, createdAt <dir>, id <dir>]
    all           → [createdAt <dir>, id <dir>]
- Update default sortBy from 'triggeredAt' to 'action_needed'
- Fix stale sortDirection → sortDir in service and handler tests
- Expand sort tests to cover all four sort modes plus fallback

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Adjust sort ordering

* Update hash

* Update empty text on notifications table

* Update global to use NOTIFICATION_CONFIGURATION for actionable instead of always declaring false

* Fix configuration test

* Rename migration

* Clean up migration test linting

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Direct to where the actual link will live

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@thewatermethod thewatermethod marked this pull request as ready for review June 18, 2026 18:39
@elainaparrish elainaparrish merged commit 059c053 into production Jun 18, 2026
25 checks passed
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.

2 participants