Skip to content

feat: list agents#89409

Open
NicolasBonet wants to merge 10 commits intomainfrom
feat/89299-list-agents
Open

feat: list agents#89409
NicolasBonet wants to merge 10 commits intomainfrom
feat/89299-list-agents

Conversation

@NicolasBonet
Copy link
Copy Markdown
Contributor

@NicolasBonet NicolasBonet commented May 1, 2026

Explanation of Change

Implements the agents list which is right now simply mocking data as the BE is not fully done.

Fixed Issues

$ #89299
PROPOSAL: https://expensify.enterprise.slack.com/docs/T03SC9DTT/F0AKV1FPD41

Tests

  1. Click account
  2. Click agents (if not available, enable in the support tool the customAgent beta)
  3. By default no agents should be shown and you should see the empty state page.
  4. Add the following code in your console to see 10 agents, feel free to modify the code if you want to test with less or more:
// Step 1: create agent prompt entries (one per agent account)
  [1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010].forEach(id => {
      Onyx.merge(`sharedNVP_agentPrompt_${id}`, { prompt: `System prompt for agent ${id}` });
  });

  // Step 2: create personal details for each agent account
  [1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010].forEach(id => {
      Onyx.merge('personalDetailsList', {
          [id]: {
              accountID: id,
              displayName: `Agent ${id}`,
              login: `agent${id}@example.com`,
              avatar: undefined,
          }
      });
  });
  • Verify that no errors appear in the JS console

Offline tests

No relevant information for offline testing

QA Steps

Same as tests

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I verified that similar component doesn't exist in the codebase
  • I verified that all props are defined accurately and each prop has a /** comment above it */
  • I verified that each file is named correctly
  • I verified that each component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
  • I verified that the only data being stored in component state is data necessary for rendering and nothing else
  • In component if we are not using the full Onyx data that we loaded, I've added the proper selector in order to ensure the component only re-renders when the data it is using changes
  • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
  • I verified that component internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
  • I verified that all JSX used for rendering exists in the render method
  • I verified that each component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

Screenshots/Videos

Android: Native image
Android: mWeb Chrome image
iOS: Native image
iOS: mWeb Safari image
MacOS: Chrome / Safari image

- Add AgentsListRow component for displaying individual agent details.
- Update AgentsPage to utilize new AgentsListRow and manage agent data from Onyx.
- Introduce SHARED_NVP_AGENT_PROMPT key in ONYXKEYS for agent prompts.
- Enhance translations for agents page subtitle to improve clarity.
- Create AgentPrompt type for better data structure in Onyx.
- Update unit tests to cover new agent list functionality and ensure proper rendering.
…bility. Update styles to include background highlight, margin, and padding adjustments, as well as refine text styling for better visual hierarchy.
… visual consistency. Introduce new styles for avatar container and inner elements to ensure proper sizing and alignment.
@NicolasBonet NicolasBonet requested review from a team as code owners May 1, 2026 20:17
@melvin-bot melvin-bot Bot requested review from JmillsExpensify and bernhardoj May 1, 2026 20:17
@melvin-bot
Copy link
Copy Markdown

melvin-bot Bot commented May 1, 2026

@bernhardoj Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot Bot removed request for a team May 1, 2026 20:17
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@OSBotify
Copy link
Copy Markdown
Contributor

OSBotify commented May 1, 2026

🦜 Polyglot Parrot! 🦜

Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues:

View the translation diff
diff --git a/src/languages/de.ts b/src/languages/de.ts
index d0e224c0..c1dbb205 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -2723,7 +2723,7 @@ ${amount} für ${merchant} – ${date}`,
     },
     agentsPage: {
         title: 'Agenten',
-        subtitle: 'Automatisiere Aufgaben mit benutzerdefinierten Agenten.',
+        subtitle: 'Erstelle Agents, die deinen Workflow übernehmen. Spare dir die manuelle Arbeit und gewinne stundenweise Zeit im Alltag zurück.',
         newAgent: 'Neue*r Agent*in',
         emptyAgents: {title: 'Keine Agenten erstellt', subtitle: 'Hör auf, Dinge manuell zu erledigen. Weise stattdessen einen Agenten an und spare dir jede Menge Zeit.'},
     },
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 284b29e5..8f24e18a 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -2729,7 +2729,7 @@ ${amount} pour ${merchant} - ${date}`,
     },
     agentsPage: {
         title: 'Agent·e·s',
-        subtitle: 'Automatisez les tâches avec des agents personnalisés.',
+        subtitle: 'Créez des agents pour gérer votre flux de travail. Évitez le travail manuel et gagnez des heures dans votre journée.',
         newAgent: 'Nouvel agent',
         emptyAgents: {title: 'Aucun agent créé', subtitle: 'Arrêtez de tout faire manuellement. Donnez plutôt des instructions à un agent et gagnez beaucoup de temps.'},
     },
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 1e4f32d7..6ea7e953 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -2718,7 +2718,7 @@ ${amount} per ${merchant} - ${date}`,
     },
     agentsPage: {
         title: 'Agenti',
-        subtitle: 'Automatizza le attività con agenti personalizzati.',
+        subtitle: 'Crea agenti per gestire il tuo flusso di lavoro. Elimina il lavoro manuale e recupera ore della tua giornata.',
         newAgent: 'Nuovo agente',
         emptyAgents: {title: 'Nessun agente creato', subtitle: 'Smetti di fare le cose manualmente. Dai invece istruzioni a un agente e risparmia un sacco di tempo.'},
     },
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 5ff49e2b..b58219a4 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -2691,7 +2691,7 @@ ${date} の ${merchant} への ${amount}`,
     },
     agentsPage: {
         title: 'エージェント',
-        subtitle: 'カスタムエージェントでタスクを自動化。',
+        subtitle: 'ワークフローを処理するエージェントを作成しましょう。手作業を省いて、1日の時間を何時間も取り戻せます。',
         newAgent: '新しいエージェント',
         emptyAgents: {title: 'エージェントは作成されていません', subtitle: '手作業はやめて、代わりにエージェントに指示を出して、時間を大幅に節約しましょう。'},
     },
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index afb6f494..4d552f2a 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -2716,7 +2716,7 @@ ${amount} voor ${merchant} - ${date}`,
     },
     agentsPage: {
         title: 'Agenten',
-        subtitle: 'Automatiseer taken met aangepaste agents.',
+        subtitle: 'Maak agents aan om je workflow af te handelen. Sla het handmatige werk over en krijg uren van je dag terug.',
         newAgent: 'Nieuwe medewerker',
         emptyAgents: {title: 'Geen agents aangemaakt', subtitle: 'Stop met dingen handmatig doen. Geef in plaats daarvan een opdracht aan een agent en bespaar jezelf veel tijd.'},
     },
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index f019f242..dd5b68ed 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -2709,7 +2709,7 @@ ${amount} dla ${merchant} - ${date}`,
     },
     agentsPage: {
         title: 'Agenci',
-        subtitle: 'Automatyzuj zadania za pomocą niestandardowych agentów.',
+        subtitle: 'Twórz agentów do obsługi swojego przepływu pracy. Pomiń ręczną pracę i odzyskaj godziny w ciągu dnia.',
         newAgent: 'Nowy agent',
         emptyAgents: {title: 'Nie utworzono agentów', subtitle: 'Przestań robić wszystko ręcznie. Wydaj instrukcje agentowi i zaoszczędź mnóstwo czasu.'},
     },
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index a96d6bd5..93a87e96 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -2709,7 +2709,7 @@ ${amount} para ${merchant} - ${date}`,
     },
     agentsPage: {
         title: 'Agentes',
-        subtitle: 'Automatize tarefas com agentes personalizados.',
+        subtitle: 'Crie agentes para gerenciar seu fluxo de trabalho. Pule o trabalho manual e ganhe horas de volta no seu dia.',
         newAgent: 'Novo agente',
         emptyAgents: {title: 'Nenhum agente criado', subtitle: 'Pare de fazer tudo manualmente. Instrua um agente e economize muito tempo.'},
     },
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 9800997c..dc02bcfc 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -2641,7 +2641,7 @@ ${amount},商户:${merchant} - 日期:${date}`,
     },
     agentsPage: {
         title: '代理人',
-        subtitle: '使用自定义代理自动化任务。',
+        subtitle: '创建智能代理来处理您的工作流程。跳过手动操作,每天为自己节省数小时。',
         newAgent: '新代理',
         emptyAgents: {title: '未创建代理', subtitle: '别再手动处理这些事情了。交给智能助理去执行,帮你节省大量时间。'},
     },

Note

You can apply these changes to your branch by copying the patch to your clipboard, then running pbpaste | git apply 😉

View workflow run

…nce clarity and consistency. Adjust titles, subtitles, and messages for improved user experience, including gender-neutral language and refined phrasing.
Comment thread src/pages/settings/Agents/AgentsPage.tsx
Comment thread src/pages/settings/Agents/AgentsPage.tsx
Comment thread src/pages/settings/Agents/AgentsPage.tsx
Comment thread src/styles/index.ts Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6d27f7f4bb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/pages/settings/Agents/AgentsPage.tsx
@NicolasBonet
Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@codecov
Copy link
Copy Markdown

codecov Bot commented May 1, 2026

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/ONYXKEYS.ts 100.00% <ø> (ø)
src/pages/settings/Agents/AgentsListRow.tsx 100.00% <100.00%> (ø)
src/pages/settings/Agents/AgentsPage.tsx 100.00% <100.00%> (ø)
... and 18 files with indirect coverage changes

…lity and styling consistency. Remove unnecessary comments in AgentsListRowProps and simplify the renderItem function in AgentsPage. Update avatar styles to use variables for better maintainability.
…es to enhance clarity and user experience. Refine phrasing to emphasize workflow management and time-saving benefits.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

🚧 @NicolasBonet has triggered a test Expensify/App build. You can view the workflow run here.

… accountID, displayName, login, and avatar. Update comment regarding action buttons to align with phased rollout plan.
@github-actions

This comment has been minimized.

Comment thread src/pages/settings/Agents/AgentsPage.tsx Outdated
Comment thread src/pages/settings/Agents/AgentsPage.tsx Outdated
Comment thread src/pages/settings/Agents/AgentsListRow.tsx Outdated
Comment thread src/styles/index.ts Outdated
@s77rt
Copy link
Copy Markdown
Member

s77rt commented May 1, 2026

The offline indicator cuts the last row (in small screen width)

Screenshot 2026-05-01 at 10 17 04 PM

…th ReportActionAvatars for improved visual consistency. Remove avatar prop from AgentsPage and update related styles. Integrate usePersonalDetails hook for better data handling in AgentsPage.
…ileOfflineIndicatorStickToBottom prop to false for improved layout on mobile devices.
@NicolasBonet
Copy link
Copy Markdown
Contributor Author

The offline indicator cuts the last row (in small screen width)

Fixed:

image

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

🚧 @NicolasBonet has triggered a test Expensify/App build. You can view the workflow run here.

@s77rt
Copy link
Copy Markdown
Member

s77rt commented May 1, 2026

Can you test on web I think it's still cutting the last item

Screen.Recording.2026-05-01.at.10.57.44.PM.mov

@NicolasBonet
Copy link
Copy Markdown
Contributor Author

Can you test on web I think it's still cutting the last item

Screen.Recording.2026-05-01.at.10.57.44.PM.mov

I did in web:

image

Are you using the last commit? I fixed that on it.

@s77rt
Copy link
Copy Markdown
Member

s77rt commented May 1, 2026

Ah my bad, yeah it's fixed Thanks!

@NicolasBonet
Copy link
Copy Markdown
Contributor Author

NicolasBonet commented May 1, 2026

Fixed in Android:

image

Fixed in iOS:

image

@NicolasBonet NicolasBonet requested review from JmillsExpensify and removed request for JmillsExpensify May 1, 2026 22:26
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.

3 participants