Skip to content

SMURFI#5042

Open
brettedw wants to merge 76 commits into
mainfrom
smurfi
Open

SMURFI#5042
brettedw wants to merge 76 commits into
mainfrom
smurfi

Conversation

@brettedw

@brettedw brettedw commented Jan 21, 2026

Copy link
Copy Markdown
Collaborator

@codecov

codecov Bot commented Jan 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0.64935% with 153 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.96%. Comparing base (f277dc7) to head (0f5c599).

Files with missing lines Patch % Lines
...urfi/components/forecast_form/SpotForecastForm.tsx 0.00% 22 Missing ⚠️
...b/src/features/smurfi/components/map/SMURFIMap.tsx 0.00% 18 Missing ⚠️
.../src/features/smurfi/schemas/spotForecastSchema.ts 0.00% 18 Missing ⚠️
...components/forecast_form/SpotForecastSummaries.tsx 0.00% 17 Missing ⚠️
...fi/components/forecast_form/SpotForecastHeader.tsx 0.00% 16 Missing ⚠️
...urfi/components/forecast_form/WeatherDataTable.tsx 0.00% 14 Missing ⚠️
...src/features/smurfi/components/StationSelector.tsx 0.00% 11 Missing ⚠️
...eatures/smurfi/components/management/SpotAdmin.tsx 0.00% 10 Missing ⚠️
web/src/features/smurfi/pages/SMURFIPage.tsx 0.00% 10 Missing ⚠️
.../components/forecast_form/SpotForecastSections.tsx 0.00% 6 Missing ⚠️
... and 6 more

❌ Your project status has failed because the head coverage (70.88%) is below the target coverage (71.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5042      +/-   ##
==========================================
- Coverage   75.36%   74.96%   -0.40%     
==========================================
  Files         599      614      +15     
  Lines       28625    28779     +154     
  Branches     2152     2166      +14     
==========================================
+ Hits        21574    21575       +1     
- Misses       6405     6558     +153     
  Partials      646      646              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@brettedw brettedw closed this Jan 21, 2026
@brettedw brettedw reopened this Jan 22, 2026
brettedw and others added 29 commits May 25, 2026 14:07
Adds fire polygons from WFS service
Adds fire polygons to layer switcher/legend
Adds fire polygons to 'New Request" map along with Spots that haven't been completed/archived
`subjects = ["smurfi.*"]` matches `smurfi.spot` but NOT `smurfi.spot.update` — three tokens. So when `pull_subscribe` tries to create a consumer with filter subject `smurfi.spot.update`, NATS rejects it because it's not a subset of the stream's `smurfi.*`.

`smurfi.>` matches any subject with `smurfi.` as a prefix regardless of depth, so `smurfi.spot.update` is now a valid subset.
- Fill representative weather stations from previous forecast
- Place request point on map in forecast form
- Allows user to "Edit" a forecast, which actually just creates a new one because we don't want to change previously submitted forecasts at this point. The forecast will be prefilled from the chosen forecast to edit
- Consolidate routes
- Adds `forecast_type` to spot forecast table. Allows forecasters to submit forecast of their choice, and we use it to display the correct forecast type and prefill forecast forms
Interface and backend for email distribution lists for spot requests under management tab (`smurfi/admin`). Supports CSV file of emails, editing, and shows created by and updated by.
Adds fire points to maps, coloured by status similar to: https://wildfiresituation.nrs.gov.bc.ca/map
Add custom panning to correct some undesired behaviour by built in openlayers panning where it would occasionally just keep panning up. The likely cause was Overlay auto-pan firing at setPosition time, before React rendered the new popup contents
Adds mapLayerVisibility.ts to centralize layer vis
Moved current fire WFS layer creation, styling, status visibility defaults, and fire attribute extraction into features/currentFires/map.
Added a reusable CurrentFiresClickInteraction for fire point/perimeter click handling.
Added a CurrentFireLayerController to centralize visibility and status-filter style updates.
Moved generic popup panning logic to features/map/mapPopupUtils.
Kept popup rendering SMURFI-specific since presentation may differ across apps, especially mobile.
Automatically subscribes the requestor when they submit a Spot request
Fetches SMURFI subscriptions when the SMURFI page loads
Updates the frontend subscription state after successful request submission so the subscribe button immediately reflects the user as subscribed
If the user is the owner, for now it disables the subscribe button with a tooltip to explain why
Shared subscribe button component
Co-authored-by: Brett Edwards <brett.1.edwards@gov.bc.ca>

- add an `EditSpotRequestPage` and routing
- only way to edit currently is from the Edit button on `smurfi/requests/:id`
- adds `@router.patch("/spot_requests/{spot_request_id}"` for editing requests. This will edit a request and it's instance in place
  - this does result in an implicit relationship in that the oldest `SpotRequestInstance` (oldest `created_at`) is the initial/request instance (that can be edited), while the others are forecast instances 
- changes SMURFI Map to always show the request location. When a location is clicked, it "explodes" to show connected forecast locations if they are different from the request location.
- adds a map to the forecast view so when a user is viewing a forecast, they can see the exact point it was for 
- adds `ForecastLocationMap` for viewing the position of a specific forecast
Co-authored-by: Darren Boss <darren.boss@gov.bc.ca>

Allow owner and forecaster to change statuses (but not back to REQUESTED)
Add error snackbar to the page for any request error
- Adds forecaster and forecast by information to the dashboard and map popup
- Filter by forecaster on the dashboard
  - it would be great to filter by forecaster on the map page as well, but it's a bit awkward adding another search bar to the legend/layer switcher 
- add Stats button to dashboard to summarize spots
- improve dashboard layout
- cleanup unused code
- table header css closer to design -> uses our primary colour

**Added forecaster phone number**
 - Added a top forecaster info section to `SpotForecastForm` using new `SpotForecasterInfo.tsx`
  - Name/email are readonly from auth token details, phone is editable
  - Phone prefills from sourceForecast when:
      - using “edit forecast” behaviour
      - the source forecast has the same forecaster name and email
  - Added `forecasterPhone` to the form schema/defaults and marshalled it as `forecaster_phone`
  - Backend create forecast now saves and returns `forecaster_phone` instead of dropping it.
  - Forecast views now always show a Phone row with `—` when missing.
@sonarqubecloud

sonarqubecloud Bot commented Jun 8, 2026

Copy link
Copy Markdown

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.

6 participants