OUT-3975 | Profile Manager App - Company custom fields are showing but tags are not#59
Conversation
…ted to client, previously company custom fields were also shown which was never intended
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR restricts profile custom fields to client-scoped definitions. The main changes are:
Confidence Score: 5/5This looks safe to merge after handling custom-field responses without
src/types/common.ts Important Files Changed
Reviews (1): Last reviewed commit: "fix(OUT-3975): filtered custom field to ..." | Re-trigger Greptile |
| }), | ||
| ) | ||
| .optional(), | ||
| entityType: z.string(), |
There was a problem hiding this comment.
Missing entity type rejects response
When listCustomFields() returns a field without entityType—for example from an older API response—the schema throws before the filter runs. Every getCustomFields() caller then fails instead of returning its custom-field data, so make this field optional or use the response field guaranteed by the API.
There was a problem hiding this comment.
I believe the api guarantees the entityType prop @greptile
There was a problem hiding this comment.
Fair enough — if the API contract guarantees entityType is always present, then a required field in the schema is the right call. It'll correctly reject any malformed response rather than silently passing through bad data. I'll withdraw the concern.
Tip: You can customize Greptile's behavior for this repo with .greptile/rules.md and .greptile/config.json.
The main changes are
Testing
Company Phone Number is a custom field for company:

IU View (old):

IU View (fixed, filtered custom field for company):

CU View (old):

CU View (fixed, filtered custom field for company):
