feat(ai-chat): redesign Person entity-ref hover card with Manager row#3967
feat(ai-chat): redesign Person entity-ref hover card with Manager row#3967
Conversation
ReddyWish
commented
Apr 20, 2026
- Add showChevron prop to DataList NavigateAction
- Redesign PersonEntityRef hover card to show Manager row via DataList
- Remove teams from PersonEntityRef (no longer displayed)
- Add PersonEntityRef stories
- Update i18n defaults for entityRef.person
- Add showChevron prop to DataList NavigateAction - Redesign PersonEntityRef hover card to show Manager row via DataList - Remove teams from PersonEntityRef (no longer displayed) - Add PersonEntityRef stories - Update i18n defaults for entityRef.person
✅ No New Circular DependenciesNo new circular dependencies detected. Current count: 0 |
📦 Alpha Package Version PublishedUse Use |
🔍 Visual review for your branch is published 🔍Here are the links to: |
There was a problem hiding this comment.
Pull request overview
Redesigns the AI chat PersonEntityRef hover card to include a “Manager” row (rendered via the Lists primitives), while also extending DataList’s navigate action to optionally hide the trailing chevron and adding supporting i18n, tests, and Storybook coverage.
Changes:
- Add manager fields to
PersonProfileand render a Manager row inPersonEntityRef(linkable whenentityRefs.urls.personis available). - Extend
NavigateAction/ navigate action types withshowChevron?: booleanand default it totrue. - Add
PersonEntityRefstories and expand unit tests for manager rendering/linking and optional-field behavior; add i18n default for the Manager label.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/react/src/sds/ai/F0AiChat/components/markdownRenderers/entityRef/entities/person/types.ts | Extends the resolved person profile shape with manager-related fields. |
| packages/react/src/sds/ai/F0AiChat/components/markdownRenderers/entityRef/entities/person/PersonEntityRef.tsx | Updates hover card mapping to include a Manager details row (optionally navigable). |
| packages/react/src/sds/ai/F0AiChat/components/markdownRenderers/entityRef/entities/person/tests/PersonEntityRef.test.tsx | Adds tests validating manager rendering, link behavior, and omission when optional fields are missing. |
| packages/react/src/sds/ai/F0AiChat/components/markdownRenderers/entityRef/entities/person/stories/PersonEntityRef.stories.tsx | Introduces Storybook scenarios for full/minimal profile, loading, error, and no-resolver cases. |
| packages/react/src/lib/providers/i18n/i18n-provider-defaults.ts | Adds default translation for ai.entityRef.person.manager. |
| packages/react/src/experimental/Lists/DataList/types/actions.ts | Extends navigate action type with showChevron?: boolean. |
| packages/react/src/experimental/Lists/DataList/actions/NavigateAction.tsx | Implements showChevron rendering toggle with a default of true. |
| packages/react/src/experimental/Lists/DataList/ItemContainer.tsx | Propagates showChevron through internal navigate action typing. |
| * provided. Trailing chevrons are suppressed via DataList's `showChevron` | ||
| * prop to keep the card dense. |
There was a problem hiding this comment.
The doc comment mentions suppressing chevrons via “DataList’s showChevron prop”, but showChevron is actually part of the navigate action props (used by NavigateAction), not a prop on DataList itself. Updating the wording will avoid confusion for future readers.
| * provided. Trailing chevrons are suppressed via DataList's `showChevron` | |
| * prop to keep the card dense. | |
| * provided. Trailing chevrons are suppressed via the navigate action's | |
| * `showChevron` prop to keep the card dense. |
| lastName: string | ||
| avatarUrl?: string | ||
| jobTitle?: string | ||
| managerId?: string |
There was a problem hiding this comment.
PersonProfile.id is string | number, but the newly introduced managerId is only string. This makes the profile shape inconsistent and can force callers to cast when manager IDs are numeric; consider aligning managerId (and potentially other manager identifier fields) with the same string | number type as id.
| managerId?: string | |
| managerId?: string | number |
| export type InternalNavigateActionType = { | ||
| type: "navigate" | ||
| href: string | ||
| showChevron?: boolean | ||
| } |
There was a problem hiding this comment.
InternalNavigateActionType now has an optional showChevron, so it’s no longer true that all internal action fields are mandatory. Either make showChevron mandatory internally (and default it when converting from the public action) or update the internal typing/comment to reflect that this field is optional.
| export type NavigateActionProps = { | ||
| children: ReactNode | ||
| className?: string | ||
| showChevron?: boolean |
There was a problem hiding this comment.
NavigateActionProps declares showChevron twice (once in the local props and again via InternalNavigateActionType). This redundancy can be removed by relying on the action type’s field and applying the default during destructuring, which keeps the public prop surface clearer and avoids potential type conflicts.
| showChevron?: boolean |