Skip to content

Fix error handling, connection checks, and improve performance - #147

Merged
Friedrich482 merged 8 commits into
mainfrom
api-tests-ci
Jul 6, 2026
Merged

Fix error handling, connection checks, and improve performance#147
Friedrich482 merged 8 commits into
mainfrom
api-tests-ci

Conversation

@Friedrich482

Copy link
Copy Markdown
Owner

Commits

  • fix: error state

    • 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
  • fix: connection lost

    • 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
  • fix: routes error

    • 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
  • fix: online manager and svg container filling

    • 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
  • chore: auth loader

    • 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
  • perf: extension sync with server

    • 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
  • ci: checks in pull request

    • 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

- 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
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Friedrich482, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cb2fc3ff-c243-4666-bbd1-c8829bac82e0

📥 Commits

Reviewing files that changed from the base of the PR and between a60b176 and 690c75b.

📒 Files selected for processing (24)
  • .github/workflows/build-and-deploy.yaml
  • apps/api/src/app-router/providers/app-router.provider.ts
  • apps/dashboard/src/app/app-error-boundary.tsx
  • apps/dashboard/src/app/app.tsx
  • apps/dashboard/src/app/pages/auth/forgot-password.tsx
  • apps/dashboard/src/app/pages/auth/login.tsx
  • apps/dashboard/src/app/pages/auth/password-reset-code-verification.tsx
  • apps/dashboard/src/app/pages/auth/register-finish.tsx
  • apps/dashboard/src/app/pages/auth/register.tsx
  • apps/dashboard/src/app/pages/auth/registration-code-verification.tsx
  • apps/dashboard/src/app/pages/auth/reset-password.tsx
  • apps/dashboard/src/app/pages/update-email/update-email.tsx
  • apps/dashboard/src/app/router.tsx
  • apps/dashboard/src/components/common/day-chart-title.tsx
  • apps/dashboard/src/components/errors/error-boundary.tsx
  • apps/dashboard/src/components/layout/app-sidebar/app-sidebar-error.tsx
  • apps/dashboard/src/hooks/use-setup-online-manager.tsx
  • apps/dashboard/src/loaders/auth-loader.ts
  • apps/dashboard/src/utils/query-client.ts
  • apps/vscode-extension/package.json
  • apps/vscode-extension/src/utils/files/has-files-data-changed.ts
  • apps/vscode-extension/src/utils/languages/has-languages-data-changed.ts
  • apps/vscode-extension/src/utils/periodic-sync-data.ts
  • apps/vscode-extension/src/utils/time/is-new-day-handler.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch api-tests-ci

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

- bumped the extension version to `v0.0.69`
@Friedrich482
Friedrich482 merged commit a2ca47a into main Jul 6, 2026
4 checks passed
@Friedrich482
Friedrich482 deleted the api-tests-ci branch July 7, 2026 14:19
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.

1 participant