Closed as not planned
Description
Problem
While working on #3754, I realized our types are a bit loose. On the frontend, we have a small set of possibilities listed here:
https://github.com/coder/coder/blob/main/site/src/components/Resources/ResourceAvatar.tsx#L16-L25
If this is the case, our generated types should use a union of strings instead of string
. This will lead to safer code
Solution
Modify https://github.com/coder/coder/blob/main/codersdk/workspaceresources.go#L28 to be a limited subset of strings similar to what we do for BuildReason
here:
https://github.com/coder/coder/blob/main/codersdk/workspacebuilds.go#L22-L34
Checklist
- Modify Go types
- Generate new TS types
- Use on frontend