Skip to content

OUT-3975 | Profile Manager App - Company custom fields are showing but tags are not#59

Merged
arpandhakal merged 1 commit into
mainfrom
OUT-3975
Jul 14, 2026
Merged

OUT-3975 | Profile Manager App - Company custom fields are showing but tags are not#59
arpandhakal merged 1 commit into
mainfrom
OUT-3975

Conversation

@arpandhakal

Copy link
Copy Markdown
Collaborator

The main changes are

  • filtered custom field to only fetch custom fields related to client, previously company custom fields were also shown which was never intended.

Testing

Company Phone Number is a custom field for company:
image

IU View (old):
image

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

CU View (old):
image

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

…ted to client, previously company custom fields were also shown which was never intended
@linear-code

linear-code Bot commented Jul 14, 2026

Copy link
Copy Markdown

OUT-3975

@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
client-profile-manager Ready Ready Preview, Comment Jul 14, 2026 11:13am

Request Review

@priosshrsth priosshrsth left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@greptile-apps

greptile-apps Bot commented Jul 14, 2026

Copy link
Copy Markdown

Greptile Summary

This PR restricts profile custom fields to client-scoped definitions. The main changes are:

  • Add entityType to the custom-field response schema.
  • Filter custom-field results to entityType === 'client'.
  • Return an empty array when the API returns no field data.

Confidence Score: 5/5

This looks safe to merge after handling custom-field responses without entityType.

  • Client-scoped filtering matches the intended profile behavior.
  • A response that omits entityType can fail schema parsing before filtering.

src/types/common.ts

Important Files Changed

Filename Overview
src/types/common.ts Requires entityType on every parsed custom-field response.
src/utils/copilotApiUtils.ts Filters custom fields to client entities before returning them to callers.

Reviews (1): Last reviewed commit: "fix(OUT-3975): filtered custom field to ..." | Re-trigger Greptile

Comment thread src/types/common.ts
}),
)
.optional(),
entityType: z.string(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the api guarantees the entityType prop @greptile

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@arpandhakal
arpandhakal merged commit 2e684ca into main Jul 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants