Dev - #2862
Merged
Merged
Conversation
Extends the existing selector-contract scanner with a syntaxKind classification (css vs xpath) and a new selector-diff-report.mjs that compares the current tree's selector registry against the committed baseline on origin/main, flagging any selector that regressed (e.g. matched -> missing) since the base. For unambiguous matched -> missing regressions it proposes a fix by locating the removed identifying token at the baseline and restoring it in the current file; --apply writes only the unambiguous fixes to disk, never commits or pushes, and never touches ambiguous cases. New npm scripts: selectors:report, selectors:diff, selectors:fix, selectors:apply. Adds a Claude Code skill and README documenting the whole workflow, and commits cypress/selectors/registry.json as the tracked baseline these commands compare against.
…nt-selection AB#34136 Add Cypress Environment Selection and Console Output Line
extractSelectors() and applicationIndex() previously walked the raw filesystem, which also picked up local untracked scratch files (e.g. chefs-api-submission-with-attachment.cy.ts and chefs-api-submission-with-pdf-pptx-attachments.cy.ts, never committed on any branch). Those leaked into usedBy/applicationMatches in the committed baseline, making it internally inconsistent for anyone who doesn't happen to have those same untracked files on disk. Both scans now list candidate files via `git ls-files` instead of fs.readdirSync, falling back to the old filesystem walk only if git itself is unavailable. Regenerated registry.json: 365 -> 360 selectors, with a few matched -> missing shifts where the only prior evidence was in an untracked application-source file.
…-Current-Tenant AB#33553: Error Page For Application/Applicant URL without TenantID
bugfix/AB#34117-CommentsEmail
Feature/ab#34135 instant messaging
AB#26913: Send Drafted Emails In Bulk
bugfix/AB#34117-CommentsEmailTo-Sonar
bugfix/AB#34117-CommentsEmailTo-Sonar
feature/AB#34135-InsantMessaging-JSBundling
feature/AB#34135-InsantMessaging-JSBundling
…m/bcgov/Unity into feature/AB#34135-InstantMessaging
Feature/ab#34135 instant messaging
feature/AB#34135-InsantMessaging-bundling issue
feature/AB#34135-InsantMessaging-bundling issue
feature/AB#34135-InsantMessaging-bundling issue
Add Cypress selector contract baseline diff and auto-fix tooling
feature/AB#34135-InsantMessaging-bundling issue
…rovments AB#34253 Improve Nginx log_format gzip_types security headers
…h-SHA AB#34003 Missing git_ref not passing SHA for the commit correctly
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds bulk email workflows, realtime messaging, Nginx updates, and Cypress selector-contract tooling.
Changes:
- Adds bulk email editing, validation, and dispatch.
- Adds realtime notification messaging and client support.
- Updates security configuration, telemetry, and Cypress workflows.
Reviewed changes
Copilot reviewed 73 out of 74 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Final review status |
|---|---|
applications/Unity.Tools/Unity.NginxData/nginx.conf |
Critical (4): Restore removed security headers or equivalent protections. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/EmailsWidget/EmailsWidgetController.cs |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/EmailsWidget/Default.js |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/EmailsWidget/Default.css |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/CommentsWidget/Default.js |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/ChefsAttachments/ChefsAttachments.js |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/ActionBar/Default.js |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/ActionBar/Default.cshtml |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/ActionBar/ActionBar.cs |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Settings/TagManagement/TagManagement.js |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/GrantApplications/Details.cshtml.cs |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/GrantApplications/Details.cshtml |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/GrantApplications/ai-generation-button-state.js |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/Error.cshtml.cs |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/Error.cshtml |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/BulkEmailNotifications/ViewModels/EmailNotificationNoteViewModel.cs |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/BulkEmailNotifications/ViewModels/BulkEmailNotificationViewModel.cs |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/BulkEmailNotifications/SendEmailNotificationSummaryModal.cshtml.cs |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/BulkEmailNotifications/SendEmailNotificationSummaryModal.cshtml |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/BulkEmailNotifications/SendEmailNotificationModal.js |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/BulkEmailNotifications/SendEmailNotificationModal.css |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/BulkEmailNotifications/SendEmailNotificationModal.cshtml.cs |
Moderate (3): Enforce the batch count limit. Moderate (2): Return a failure status instead of 204 on exceptions. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/BulkEmailNotifications/SendEmailNotificationModal.cshtml |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/ApplicationLinks/ApplicationLinks.js |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/Applicants/Details.cshtml.cs |
Moderate (2 each): Distinguish not-found errors from unexpected database failures. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Middleware/ErrorCountingLoggerSink.cs |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Web/GrantManagerWebModule.cs |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Domain/Permissions/PermissionGrantsDataSeeder.cs |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Domain.Shared/Localization/GrantManager/en.json |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Application/GrantApplications/BulkEmailNotificationAppService.cs |
Critical (1): Prevent concurrent duplicate sends. Moderate (3): Enforce the batch limit. Moderate (4): Revalidate required email fields before sending. |
applications/Unity.GrantManager/src/Unity.GrantManager.Application.Contracts/GrantApplications/IBulkEmailNotificationAppService.cs |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Application.Contracts/GrantApplications/BulkEmailNotificationResultDto.cs |
No final comment. |
applications/Unity.GrantManager/src/Unity.GrantManager.Application.Contracts/GrantApplications/BulkEmailNotificationDto.cs |
No final comment. |
applications/Unity.GrantManager/scripts/Get-SonarIssues.ps1 |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Theme.UX2/src/Unity.Theme.UX2/wwwroot/themes/ux2/zone-extensions.js |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Theme.UX2/src/Unity.Theme.UX2/wwwroot/themes/ux2/unity-styles.css |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Theme.UX2/src/Unity.Theme.UX2/Themes/UX2/Layouts/Empty.cshtml |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Theme.UX2/src/Unity.Theme.UX2/Themes/UX2/Layouts/Application.cshtml |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Theme.UX2/src/Unity.Theme.UX2/Themes/UX2/Components/Topbar/Default.cshtml |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Theme.UX2/src/Unity.Theme.UX2/Bundling/UnityThemeUX2GlobalStyleContributor.cs |
No final comment. |
applications/Unity.GrantManager/modules/Unity.TenantManagement/src/Unity.TenantManagement.Web/Pages/TenantManagement/Reconciliation/Index.js |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Payments/src/Unity.Payments.Web/Views/Shared/Components/PaymentInfo/Default.js |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Payments/src/Unity.Payments.Web/Pages/PaymentRequests/Index.js |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.Web/wwwroot/js/notifications-realtime-client.js |
Moderate (2): Align initialization with the feature gate. Moderate (3): Use the captured message mode during asynchronous startup. |
applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.Web/wwwroot/css/notifications-realtime-widget.css |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.Web/Views/Settings/NotificationsSettingGroup/InternalEmailGroups.js |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.Web/Realtime/NotificationHub.cs |
Moderate (3): Enforce the 4,000-character message limit for tenant and peer methods. |
applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.Web/Pages/UnityMessaging/Index.css |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.Web/Pages/UnityMessaging/Index.cshtml |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.Web/Controllers/UnityMessagingController.cs |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.Web/Bundling/NotificationsStyleBundleContributor.cs |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.Web/Bundling/NotificationsScriptBundleContributor.cs |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.EntityFrameworkCore/Repositories/EmailLogsRepository.cs |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.Domain/Emails/IEmailLogsRepository.cs |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.Domain.Shared/Localization/Notifications/en.json |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.Application/Unity.Notifications.Application.csproj |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.Application/EmailNotificaions/EmailNotificationService.cs |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.Application.Contracts/Permissions/NotificationsPermissions.cs |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.Application.Contracts/Permissions/NotificationsPermissionDefinitionProvider.cs |
No final comment. |
applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Scoresheet/Scoresheet.js |
No final comment. |
applications/Unity.GrantManager/modules/Unity.AI/src/Unity.AI.Web/Pages/AIReporting/Index.js |
No final comment. |
applications/Unity.AutoUI/selector-contract.config.json |
No final comment. |
applications/Unity.AutoUI/scripts/selector-diff-report.mjs |
No final comment. |
applications/Unity.AutoUI/scripts/selector-contract.mjs |
Moderate (2): Correct named-axis XPath matching. Moderate (3): Classify XPath before rejecting slash-prefixed paths. |
applications/Unity.AutoUI/package.json |
No final comment. |
applications/Unity.AutoUI/cypress/selectors/README.md |
No final comment. |
applications/Unity.AutoUI/cypress.config.ts |
No final comment. |
applications/Unity.AutoUI/.claude/skills/validate-cypress-selectors/SKILL.md |
No final comment. |
.github/workflows/cypress-uat.yml |
No final comment. |
.github/workflows/cypress-test.yml |
No final comment. |
.github/workflows/cypress-prod.yml |
No final comment. |
.github/workflows/cypress-e2e-runner.yml |
Critical (1): Avoid directly interpolating inputs.base_url into shell commands. |
.github/workflows/cypress-dev.yml |
No final comment. |
Suppressed comments (1)
applications/Unity.GrantManager/src/Unity.GrantManager.Application/GrantApplications/BulkEmailNotificationAppService.cs:192
ex.Messageis returned directly to the browser for every per-row failure. Exceptions from EF, S3, or other infrastructure can contain implementation details, identifiers, or connection information; expose only a safe user-facing message for unexpected exceptions while retaining the exception in the server log.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| -p GIT_REF=$GITHUB_SHA \ | ||
| -p GIT_REF="${{ inputs.git_ref }}" \ | ||
| -p GIT_TOKEN=$GH_TOKEN \ | ||
| -p BASE_URL="${{ inputs.base_url }}" \ |
| // passed to `cy.xpath(...)` (the cypress-xpath plugin command) are also | ||
| // treated as XPath regardless of their text shape. | ||
| const XPATH_PATTERN = | ||
| /^\.{0,2}\/\/|^\/[a-zA-Z*@]|::(?:ancestor|descendant|following-sibling|preceding-sibling|parent|self|child)(?:-or-self)?\b|contains\(\s*(?:text\(\)|@)/; |
Comment on lines
+77
to
+78
| if (!value || value.length > 500 || /^(https?:|\/[^\s]+|\{.*\})/.test(value)) return false; | ||
| if (XPATH_PATTERN.test(value)) return true; |
| { | ||
| public const string HubRoute = "/signalr/notifications"; | ||
| public const string NotificationLogsOpsGroup = "ops:notification-logs"; | ||
| public const int MaxDirectMessageLength = 4000; |
Comment on lines
+49
to
+53
| if (!window.signalR) { | ||
| return false; | ||
| } | ||
|
|
||
| return true; |
| @@ -75,7 +76,12 @@ public async Task<IActionResult> OnGetAsync() | |||
| } | |||
| catch (Exception) | |||
| @@ -105,7 +111,12 @@ public async Task<IActionResult> OnGetAsync() | |||
| } | |||
| catch (Exception) | |||
Comment on lines
+163
to
+165
| var emailRequests = MapBulkEmailRequests(); | ||
|
|
||
| var result = await bulkEmailNotificationAppService.SendBulkEmailNotifications(emailRequests); |
| Logger.LogError(ex, "Error sending bulk email notifications"); | ||
| } | ||
|
|
||
| return NoContent(); |
| add_header X-XSS-Protection "1; mode=block" always; | ||
| add_header Referrer-Policy "no-referrer-when-downgrade" always; | ||
| add_header Content-Security-Policy "default-src 'self'; style-src 'self'; font-src 'self'; script-src 'self'; object-src 'none';" always; | ||
| # Cross-origin isolation headers (scan findings) |
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.



No description provided.