feat: infra monitor details tray [ENG-3119]#7857
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
497d2d0 to
5e46f17
Compare
dead0bb to
a3bc479
Compare
d14a041 to
a963d1f
Compare
a963d1f to
f4233eb
Compare
f4233eb to
b450338
Compare
b450338 to
fe5e93b
Compare
| <Text> | ||
| {"preferred_description" in item && | ||
| typeof item.preferred_description === "string" | ||
| ? item.preferred_description | ||
| : ""} | ||
| </Text> |
There was a problem hiding this comment.
Had to do a bit of digging to see what this was all about. Seems that preferred_description is just not being auto-generated in the API response types? Should we just extend that Type instead of adding this complexity?
There was a problem hiding this comment.
I'm willing to add it as an extension if you think that's best.
Even though ugly, this is safer and won't break the FE if there is a BE change to the types and we continue using our modified types.
There was a problem hiding this comment.
Aren't we just saying that if preferred_description goes missing, nothing breaks? If so, doesn't that obfuscate the problem instead of an error letting us know there's a problem? Regardless, I think item.preferred_description ?? "" would prevent an error.
There was a problem hiding this comment.
It's not just protecting if preferred_description goes missing, it's also protecting if the type changes to something that can't be rendered to the dom and causes a crash.
IMO the ideal solution (outside of the BE fixing the types) would be to have a runtime transformer that allows us to centralize the patches + run validation so we can have graceful fallbacks and try to set up some kind of notification that the types are wrong.
I tend to lean toward obfuscations that don't crash in production if not caught over a little less visibility into missing renders.
Totally open to arguments to the contrary
wip: actions and editability chore: linting wip: more actiohn stuff wip: updating on demand wip: getting something working chore: update types chore: lots of fixes chore: more api updates chore: clean ups chore: rename file chore: more removals chore: more fixes for now chore: filtering out hidden actions wip: refactoring visual wip: functioning chore: updating api chore: all the fixes refactor: styles and organization wip: refactor data use chore: functional data uses chore: file renaming chore: update changelog refactor: skip request when no run provided refactor: data use to be functional chore: code cleanups
fe5e93b to
98d74b5
Compare
ae02844 to
e76193c
Compare
fix: incorrect pr number refactor: remove expandable text
e76193c to
70dd3bd
Compare
Ticket ENG-3119
Description Of Changes
Code Changes
Steps to Confirm
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works