Skip to content

[Due for payment 2026-05-29] [Due for payment 2026-05-28] Hide non-applicable Account menu items for agent accounts #90248

@puneetlath

Description

@puneetlath

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 account-level menu items in the Initial Settings page do not apply to a bot account.

In src/pages/settings/InitialSettingsPage.tsx, gate the following entries on !isAgentAccount (using the useIsAgentAccount() hook):

  • Subscription
  • Wallet
  • Preferences
  • Agents
  • Security > Security options

The rest of the entries remain available. This follows the same isAgentAccount ? [] : [...] spread pattern already used for beta-gated items in this file.

Manual Test Steps

  1. As the agent owner, copilot into the agent account.
  2. Open Account.
  3. Verify the sections listed above are not visible.
  4. Verify Profile, Troubleshoot, Security, Sign out, etc are still visible.
  5. Return to the owner account and confirm the hidden entries reappear for a regular account.

Automated Tests

  • A test that renders InitialSettingsPage for an agent and asserts the expected items are absent, and that they are present for a non-agent account.
Issue OwnerCurrent Issue Owner: @ShridharGoel

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions