Patrol updates - #1745
Merged
Merged
Patrol updates#1745
Conversation
- Upgraded @rjsf/core, @rjsf/react-bootstrap, @rjsf/utils, and @rjsf/validator-ajv8 to version 6.11.0 for improved functionality and compatibility. - Updated mapbox-gl to version 3.32.0 to leverage the latest features and fixes.
- Updated `msw` from version 2.15.0 to 3.0.0 to leverage new features and improvements. - Adjusted import paths for `http` and `HttpResponse` from `msw` to `msw/http` across multiple test files for consistency. - Enhanced Jest configuration to support new import.meta transformations and added global timer functions for improved testing capabilities.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Feed failure handling lacks regression coverage, and the documented MSW import remains outdated.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Aligns patrol forms with updated backend schema and roster contracts while upgrading dependencies and improving request error handling.
Changes:
- Uses bare patrol schemas and roster members for team-lead options.
- Stops automatically adding patrol leaders as members.
- Upgrades RJSF, Mapbox GL, and MSW; handles event-feed failures.
| File | Description |
|---|---|
package.json |
Upgrades dependencies and Jest transforms. |
yarn.lock |
Resolves upgraded dependencies. |
jest-config/transformers/transformImportMetaEnv.js |
Transforms import.meta.url for Jest. |
src/setupTests.js |
Adds immediate timer globals. |
src/utils/patrols.js |
Preserves leg membership when continuing patrols. |
src/utils/patrols.test.js |
Updates continuation and roster tests. |
src/utils/parallelPaginatedRequest.test.js |
Migrates MSW imports. |
src/utils/events.test.js |
Migrates MSW imports. |
src/TimepointPopup/index.test.js |
Migrates MSW imports. |
src/SideBar/useReportsFeed/index.js |
Handles feed request rejections. |
src/SideBar/useReportsFeed/index.test.js |
Migrates MSW imports. |
src/SideBar/useFetchPatrolsFeed/index.test.js |
Migrates MSW imports. |
src/SideBar/PatrolsManager/utils/buildLegDraft/index.test.js |
Updates roster fixtures. |
src/SideBar/PatrolsManager/PatrolsFeed/index.test.js |
Updates member-based state fixture. |
src/SideBar/PatrolsManager/PatrolsFeed/Filters/index.test.js |
Updates filter state fixture. |
src/SideBar/PatrolsManager/PatrolsFeed/Filters/FiltersPopover/index.js |
Uses members for lead filters. |
src/SideBar/PatrolsManager/PatrolsFeed/Filters/FiltersPopover/index.test.js |
Tests member-based lead filtering. |
src/SideBar/PatrolsManager/PatrolOverview/index.test.js |
Waits for asynchronous modal closure. |
src/SideBar/PatrolsManager/NewPatrol/index.test.js |
Updates roster fixture. |
src/SideBar/PatrolsManager/LegManager/NewLeg/utils/buildNewLegDraft/index.test.js |
Updates roster fixture. |
src/SideBar/PatrolsManager/LegManager/NewLeg/index.test.js |
Removes legacy leader fixture. |
src/SideBar/PatrolsManager/LegManager/index.test.js |
Updates tracking state fixture. |
src/SideBar/PatrolsManager/LegManager/EditLeg/index.test.js |
Removes legacy leader fixture. |
src/SideBar/PatrolsManager/LegForm/utils/buildLegSegment/index.js |
Keeps leaders separate from members. |
src/SideBar/PatrolsManager/LegForm/utils/buildLegSegment/index.test.js |
Tests separate leader membership. |
src/SideBar/PatrolsManager/LegForm/StaticFields/index.js |
Sources leads from members. |
src/SideBar/PatrolsManager/LegForm/StaticFields/index.test.js |
Tests member-based lead options. |
src/SideBar/PatrolsManager/LegForm/index.test.js |
Updates roster fixture. |
src/SideBar/PatrolsManager/Activity/SummaryStats/index.test.js |
Removes redundant leader fixture. |
src/SideBar/index.test.js |
Migrates MSW imports. |
src/SideBar/EventsManager/EventOverview/ReportDetailView/index.test.js |
Migrates MSW imports. |
src/SideBar/EventsManager/EventOverview/LinksSection/LinkItem/index.test.js |
Migrates MSW imports. |
src/SideBar/EventsManager/EventOverview/index.test.js |
Migrates MSW imports. |
src/ReportFormSummary/index.test.js |
Migrates MSW imports. |
src/PatrolDetailView/index.test.js |
Migrates MSW imports. |
src/NotificationMenu/index.test.js |
Migrates MSW imports. |
src/Nav/index.test.js |
Migrates MSW and stabilizes request timing. |
src/ducks/user-content/index.test.js |
Migrates MSW imports. |
src/ducks/system-status.test.js |
Migrates MSW imports. |
src/ducks/patrols/index.test.js |
Migrates MSW imports. |
src/ducks/patrol-schemas/index.js |
Reads bare schemas and logs failures. |
src/ducks/patrol-schemas/index.test.js |
Tests bare schemas and warnings. |
src/ducks/messaging.test.js |
Migrates MSW imports. |
src/ducks/events.test.js |
Migrates MSW imports. |
src/ducks/event-types/index.test.js |
Migrates MSW imports. |
src/ducks/event-schemas/index.test.js |
Migrates MSW imports. |
src/ducks/event-categories/index.test.js |
Migrates MSW imports. |
src/ducks/community.test.js |
Migrates MSW imports. |
src/ducks/analyzers.test.js |
Migrates MSW imports. |
src/DetailViewComponents/ActivitySection/index.test.js |
Migrates MSW imports. |
src/DetailViewComponents/ActivitySection/ContainedReportListItem/index.test.js |
Migrates MSW imports. |
src/AddToPatrolModal/AddToPatrolModal.test.js |
Migrates MSW imports. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chrisj-er
approved these changes
Oct 1, 2026
chrisj-er
left a comment
Contributor
There was a problem hiding this comment.
No blocking or important issues found
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.

What does this PR do?
Final tweaks to the patrols flow, plus dependency upgrades.
Patrols
{json, ui}. Both endpoints now return that shape since das PR #4257, and the{data, status}fallback is removed. Failed schema requests are now logged withconsole.warn.trackedbyleaders list.Dependencies
@rjsf/*6.10.1 → 6.11.0 andmapbox-gl3.31.0 → 3.32.0.msw2.15.0 → 3.0.0: tests importhttpandHttpResponsefrommsw/http, and the Jestimport.metatransformer now rewritesimport.meta.url.useReportsFeednow catches a failed event feed request and logs it, ignoring cancelled requests, instead of leaving the rejection unhandled.Evidence
yarn test src/SideBar/PatrolsManager src/ducks/patrol-schemas src/utils/patrols: 52 suites, 1226 tests passing.Relevant link(s)
Notes
tracked_bywho is not on the roster shows as "Unknown team lead".trackedbyleaders request still runs on every load, but only the legacy patrol UI reads it now. It can be removed together with that UI.