Part of the Custom workflow agents project
Main issue: https://github.com/Expensify/Expensify/issues/614622
Doc section: https://expensify.enterprise.slack.com/docs/T03SC9DTT/F0AKV1FPD41?focus_section_id=temp:C:PDZf756705845f1464c9cffffcb8
Feature Description
When the owner co-pilots into an agent account, several Profile sub-sections do not make sense for a bot account and should be hidden or made read-only.
Scope:
- Add a shared helper that identifies agent accounts by their email pattern, since this check is reused across the R2 work:
isAgentEmail(email) — returns true when email matches /^agent_\d+@expensify\.ai$/.
useIsAgentAccount() — returns isAgentEmail(session?.email).
- Add both to
src/libs/SessionUtils.ts.
- In
src/pages/settings/Profile/ProfilePage.tsx, when isAgentAccount is true:
- Render the contact method inside the Profile card as a plain
MenuItemWithTopDescription with no onPress and no shouldShowRightIcon (read-only label).
- Hide the standalone Contact methods menu item that navigates to the full contact-methods management page.
- Exclude the entire Private section (legal name, DOB, phone, address).
Out of scope: The new AI Prompt card itself is covered by #90244.
Manual Test Steps
Can be tested with an agent account created via the Release 1 flow.
- As the agent owner, copilot into the agent account.
- Go to Account > Profile.
- Verify the contact method is shown in the Profile card as a read-only label (no chevron, not tappable).
- Verify the standalone Contact methods menu item is not present.
- Verify the Private section (legal name, DOB, phone, address) is not rendered.
- Return to the owner account and confirm that Account > Profile still shows the contact methods item, the Private section, and a tappable contact method (i.e. the gating only applies to agent accounts).
Automated Tests
- Unit tests for
isAgentEmail covering matching, non-matching, and empty/undefined inputs.
- A
ProfilePage test that asserts the contact-methods menu item and Private section render for a non-agent account and do not render for an agent account.
Issue Owner
Current Issue Owner: @NicolasBonet
Part of the Custom workflow agents project
Main issue: https://github.com/Expensify/Expensify/issues/614622
Doc section: https://expensify.enterprise.slack.com/docs/T03SC9DTT/F0AKV1FPD41?focus_section_id=temp:C:PDZf756705845f1464c9cffffcb8
Feature Description
When the owner co-pilots into an agent account, several Profile sub-sections do not make sense for a bot account and should be hidden or made read-only.
Scope:
isAgentEmail(email)— returns true whenemailmatches/^agent_\d+@expensify\.ai$/.useIsAgentAccount()— returnsisAgentEmail(session?.email).src/libs/SessionUtils.ts.src/pages/settings/Profile/ProfilePage.tsx, whenisAgentAccountis true:MenuItemWithTopDescriptionwith noonPressand noshouldShowRightIcon(read-only label).Out of scope: The new AI Prompt card itself is covered by #90244.
Manual Test Steps
Can be tested with an agent account created via the Release 1 flow.
Automated Tests
isAgentEmailcovering matching, non-matching, and empty/undefined inputs.ProfilePagetest that asserts the contact-methods menu item and Private section render for a non-agent account and do not render for an agent account.Issue Owner
Current Issue Owner: @NicolasBonet