Fix error handling, connection checks, and improve performance - #147
Conversation
- prevent the next and previous buttons in the `DayChartTitle` component from shrinking - removed the folder and user icons of the `AppSidebar` error component - the error boundary is not reset when we have an error related to: either the user is offline or the api is unreachable
- added a check to verify if the connection is still present using tanstack query online manager - the error boundary is reset if the connection comes back and we were offline
- fixed the error of the dashboard crashing when navigating to a project and the server is unreachable using react router ErrorBoundary - added an `AppErrorBoundary` component to play the role of the error boundary of the root app component - extracted the logic of creation of the tanstack query client in a separate file called `query-client`
- removed the focus event listener of the online manager to avoid making too many requests - added a health query in the trpc procedures and used it for the health check in the online manager. This works for authenticated and non-authenticated pages. The old method consisting in using the checkAuthStatus procedure would fail on non-authenticated pages like /login, giving false positives (server unreachable even though it was reachable) and pausing mutations - fixed the issue of the animated night svg image on the auth pages not taking the whole page height when the page height was over the screen height
- removed the usage of the native fetch function in the auth-loader file and replaced it with the trpc client loader with the proper try catch blocks with better readability - replaced the manual url search params concatenation with `URLSearchParams`
- added a check to only sync files and languages with the api when they have changed - added two new utility functions `hasLanguagesDataChanged` and `hasFilesDataChanged` to verify if there were changes between the files or languages data since the last sync with the server
- made the `build-and-deploy` ci script run some steps as checks on a PR on the main branch: all the setup job, and the build job but neither the login step nor the push of the built images step to docker hub
|
Warning Review limit reached
Next review available in: 57 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (24)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- bumped the extension version to `v0.0.69`
Commits
fix: error state
DayChartTitlecomponent from shrinkingAppSidebarerror componentfix: connection lost
fix: routes error
AppErrorBoundarycomponent to play the role of the error boundary of the root app componentquery-clientfix: online manager and svg container filling
chore: auth loader
URLSearchParamsperf: extension sync with server
hasLanguagesDataChangedandhasFilesDataChangedto verify if there were changes between the files or languages data since the last sync with the serverci: checks in pull request
build-and-deployci script run some steps as checks on a PR on the main branch: all the setup job, and the build job but neither the login step nor the push of the built images step to docker hub