* update project update prosess in frontend, and add project validators
* change project update process in backend
* update project backend files, projectReducer, project validators and tests
* update project api tests, and error handling in ProjectDetails
* update frontend project creation form
* remove ProjectEditPage tests and fix ProjectNewPage tests
* update project api tests, project write process, and project validators
* remove unneeded files relating to projects, and merge project/ and projects/ route files
* remove project validators from backend, and update other project files
* allow all users to view projects table
* fix import issue
* update project api tests to use correct url, and add --runInBand flag to backend unit tests
* update cypress test
* split pages.tsx into multiple files, and update ui e2e test since occurrence rename
* reduce size of countryBoundingBoxes and countryPolygons
* update files again, and update countryExport script
* update files again, add more simplified geojson files, and update countryExport with Copilot
* fix pagination showing incorrect page amount when filtera are applied
* fix issue with occurences table resetting to first page, and make page numbers accurate in all tables
* fix error in occurences table menu bar
* remove pagination from TableView useEffect dependencies to break rerender loop
* update server side pagination useEffect with CoPilot
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* remove useless else-clause from useEffect
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Fix#1056: Web freezing when loading locality map.
The countryPolygons.ts file is 4.4MB and was being imported synchronously,
causing the main thread to block and the UI to freeze.
Solution:
- Dynamically import countryPolygons using async import()
- Only load the data after the map component mounts
- Add loading state for country borders
This prevents the large module from blocking the main thread during
initial page load.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Security fix for PR #1186: ErrorBoundary was leaking internal implementation
details (stack traces, error messages) to end users in production.
- Gate error details section to development mode only using import.meta.env.DEV
- In production, only show generic error message and reload button
- Prevents information disclosure while maintaining debugging capability in dev
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Fix#1184: Time Unit error caused by invalid blocker state transition.
The error 'Invalid blocker state transition: unblocked -> proceeding' occurred
when calling blocker.proceed() in UnsavedChangesProvider.
Root cause: setDirty(false) was called before blocker.proceed?.(), which
triggered a re-render that could change the blocker state before proceed was
called. This caused React Router's internal state machine to receive a proceed
call when the blocker was no longer in the 'blocked' state.
Fix:
- Call blocker.proceed?.() before setDirty(false) in handleConfirm
- Add additional state check in isSamePathNavigation useEffect to ensure
blocker is still 'blocked' before calling proceed()
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Implement #1185: Provide ErrorBoundary and errorElement to catch and display
application errors gracefully.
- Add ErrorBoundary component to catch React component render errors
- Add RouterError component to catch React Router v6 data router errors
- Wrap RouterProvider with ErrorBoundary in main.tsx
- Add errorElement to root route in router
This provides a better user experience when the application encounters errors,
showing a user-friendly error page with options to reload or go back instead
of the default React error screen.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>