codecov / engineering-team

This is a general repo to use with GH Projects
1 stars 1 forks source link

[UI] Handle Segment Union Types Properly #2803

Open nicholas-codecov opened 2 weeks ago

nicholas-codecov commented 2 weeks ago

Currently we do not handle the segment union type properly in Gazebo, we only handle the happy path. What happens instead, is that the user sees an entire error page which is not ideal.

The ideal outcome is that we update the GQL queries that call segments field and handle all of the different types, see the screenshot below.

After updating the queries we'll also need to update the zod schemas with a discriminated union type on the __typename field, similar to that of Repository.

Once those two things are done, we'll have to update the respective file diffs to display a custom error messages in these cases.

segments union type:

Image

suejung-sentry commented 2 weeks ago

Here's some more info on the probable cause / how to reproduce - https://github.com/codecov/engineering-team/issues/2811

eliatcodecov commented 6 days ago

Assigning to @katia-sentry such that this can be assigned along with #2811 when that is handed off to an engineer.