Skip to content

api/v1.0.147

  • api/v1.0.147
  • b1b5d15
  • Partially verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
  • Compare
    Choose a tag to compare
  • api/v1.0.147
  • b1b5d15
  • Compare
    Choose a tag to compare
  • Partially verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
@BenElferink BenElferink tagged this 04 Feb 13:15
- Add app error boundary
- Fix UI crash (conditions can be null on rare occasions)
- Fix bad setState in toggle component

---

This pull request introduces an error boundary component to the
`frontend/webapp` to handle errors gracefully and updates several
dependencies. The most important changes include the addition of the
`AppErrorBoundary` component, updates to the `RootLayout` to use the new
error boundary, and modifications to handle nullable conditions in
various types.

Error handling improvements:

*
[`frontend/webapp/app/layout.tsx`](diffhunk://#diff-788a38ec94bfca9467b13cb6eb93cdeccd4237facfb5fff310e05b3af67413efR7):
Added `AppErrorBoundary` component to wrap the main layout, ensuring
that errors are caught and displayed in a user-friendly manner.
[[1]](diffhunk://#diff-788a38ec94bfca9467b13cb6eb93cdeccd4237facfb5fff310e05b3af67413efR7)
[[2]](diffhunk://#diff-788a38ec94bfca9467b13cb6eb93cdeccd4237facfb5fff310e05b3af67413efR20)
[[3]](diffhunk://#diff-788a38ec94bfca9467b13cb6eb93cdeccd4237facfb5fff310e05b3af67413efR36)
*
[`frontend/webapp/components/app-error-boundary/index.tsx`](diffhunk://#diff-75013bded052d9cd6f26a18078332b113d5863aad2ab274f22b001e6d9277401R1-R60):
Created the `AppErrorBoundary` component using `react-error-boundary` to
provide a fallback UI in case of errors.
*
[`frontend/webapp/components/index.ts`](diffhunk://#diff-9a255ecda06fb13562b464a919eb789a51ea8728251b2aa31c28babfd8f3405dR1):
Exported the newly created `AppErrorBoundary` component.

Dependency updates:

*
[`frontend/webapp/package.json`](diffhunk://#diff-ccf6337b0064354343f900ffd8b4ee91aa8cd014f3292548a800ad3dac39c1f4L14-R33):
Updated several dependencies, including `@apollo/client`,
`@odigos/ui-components`, `@odigos/ui-utils`, and added
`react-error-boundary`.

Handling nullable conditions:

*
[`frontend/webapp/types/actions.ts`](diffhunk://#diff-3ae6790a1d85d899bad68bedc63fd62bd18aeda31add61046a76187d9175d21dL60-R60):
Updated `ActionData` interface to allow `conditions` to be `null`.
*
[`frontend/webapp/types/destinations.ts`](diffhunk://#diff-a260064e39c9894e9447a72de035e5e5bbb8c0df9fbcdba7c0c93dccf4d84b62L127-R127):
Updated `Destination` and `ActualDestination` interfaces to allow
`conditions` to be `null`.
[[1]](diffhunk://#diff-a260064e39c9894e9447a72de035e5e5bbb8c0df9fbcdba7c0c93dccf4d84b62L127-R127)
[[2]](diffhunk://#diff-a260064e39c9894e9447a72de035e5e5bbb8c0df9fbcdba7c0c93dccf4d84b62L154-R154)
*
[`frontend/webapp/types/sources.ts`](diffhunk://#diff-2e094683c1e156a4d3b841453d12f98342db28ae37230264200cf979063268b9L16-R16):
Updated `K8sActualSource` interface to allow `conditions` to be `null`.

---------

Co-authored-by: Amir Blum <[email protected]>
Assets 2
Loading