Skip to content

Add agent promotion banners to workspace #91243

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:PDZ796de256f74140a4b85536d69

Feature Description

Add two dismissible green banners to promote the Agents feature to workspace admins.

"Automate approvals with agents" banner in Workspace > Workflows > Approvals

Image

In src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx, the Approvals option in optionItems renders a subMenuItems JSX fragment (around line 384) containing a DEW/SmartLimit info card, a SearchBar, a WorkflowNoResultsView, a .map() over workflows rendering <ApprovalWorkflowSection>, and the "Add approval workflow" MenuItem.

Insert the new banner at the top of this fragment, between the DEW info card and the SearchBar. The banner should be:

  • Gated by the customAgent beta flag.
  • Dismissible, using the existing DismissProductTraining infrastructure with the training name agentsWorkflowsBanner.
  • Hidden entirely once dismissed.

"Don't see the rule you need?" banner in Workspace > Rules

Image

In src/pages/workspace/rules/PolicyRulesPage.tsx, insert a dismissible green banner above <IndividualExpenseRulesSection>. The banner should be:

  • Gated by the customAgent beta flag.
  • Dismissible, using the existing DismissProductTraining infrastructure with the training name agentsRulesBanner.
  • Hidden entirely once dismissed.
  • The banner CTA should navigate to the Workspace Workflows section for agent creation/configuration.

Manual Test Steps

  1. Enable the customAgent beta on a test workspace.
  2. Go to Workspace > Workflows > Approvals — verify the "Automate approvals with agents" green banner appears at the top of the approvals section.
  3. Dismiss the banner, then sign out and sign back in and return to the same page — verify the banner does not reappear.
  4. Go to Workspace > Rules — verify the "Don't see the rule you need?" green banner appears above the individual expense rules section.
  5. Tap the banner CTA and verify it navigates to the Workspace Workflows section.
  6. Return to Rules, dismiss the banner, then sign out and sign back in and return to the same page — verify the banner does not reappear.
  7. Repeat all steps on a workspace where the customAgent beta is not enabled — verify neither banner appears.

Automated Tests

  • A test that the agentsWorkflowsBanner renders inside the Approvals subMenuItems when the customAgent beta is active, and is absent after dismissal.
  • A test that the agentsRulesBanner renders above <IndividualExpenseRulesSection> when the customAgent beta is active, and is absent after dismissal.
  • A test that neither banner renders when the customAgent beta is inactive.
Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @shubham1206agra

Metadata

Metadata

Labels

Type

No type

Fields

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