[Hold] add create agent to top of approver#92106
Conversation
🦜 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 diffdiff --git a/src/languages/de.ts b/src/languages/de.ts
index 73d20ca03d4..11c1fd71cfb 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -497,6 +497,7 @@ const translations: TranslationDeepObject<typeof en> = {
previousYear: 'Vorheriges Jahr',
nextYear: 'Nächstes Jahr',
avatar: 'Avatar',
+ agent: 'Agent',
},
socials: {
podcast: 'Folgen Sie uns auf Podcast',
@@ -2674,6 +2675,8 @@ ${amount} für ${merchant} – ${date}`,
genericErrorMessage: 'Die genehmigende Person konnte nicht geändert werden. Bitte versuche es erneut oder kontaktiere den Support.',
title: 'Genehmigenden festlegen',
description: 'Diese Person wird die Ausgaben genehmigen.',
+ createNewAgent: 'Neue Agent:in erstellen',
+ createNewAgentDescription: 'Automatisieren Sie Ihre Genehmigungen mit Prompt',
},
workflowsApprovalLimitPage: {
title: 'Genehmiger',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index d27d58ac260..26e589906e1 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -449,6 +449,7 @@ const translations: TranslationDeepObject<typeof en> = {
expensifyLogo: 'Logo de Expensify',
approver: 'Aprobador',
enterDigitLabel: ({digitIndex, totalDigits}: {digitIndex: number; totalDigits: number}) => `introducir dígito ${digitIndex} de ${totalDigits}`,
+ agent: 'Agente',
},
socials: {
podcast: 'Síguenos en Podcast',
@@ -2550,7 +2551,7 @@ ${amount} para ${merchant} - ${date}`,
title: 'Establecer aprobador',
description: 'Esta persona aprobará los gastos.',
createNewAgent: 'Crear nuevo agente',
- createNewAgentDescription: 'Automatiza tus aprobaciones con un prompt',
+ createNewAgentDescription: 'Automatiza tus aprobaciones con rapidez',
},
workflowsApprovalLimitPage: {
title: 'Aprobador',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index ead01bebcc4..01fe8f7ed31 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -497,6 +497,7 @@ const translations: TranslationDeepObject<typeof en> = {
previousYear: 'Année précédente',
nextYear: 'L’an prochain',
avatar: 'Avatar',
+ agent: 'Agent',
},
socials: {
podcast: 'Suivez-nous sur Podcast',
@@ -2681,6 +2682,8 @@ ${amount} pour ${merchant} - ${date}`,
genericErrorMessage: 'L’approbateur n’a pas pu être modifié. Veuillez réessayer ou contacter l’assistance.',
title: 'Définir l’approbateur',
description: 'Cette personne approuvera les dépenses.',
+ createNewAgent: 'Créer un nouvel agent',
+ createNewAgentDescription: 'Automatisez vos approbations avec l’IA',
},
workflowsApprovalLimitPage: {
title: 'Approbateur',
@@ -2978,7 +2981,7 @@ ${amount} pour ${merchant} - ${date}`,
phoneOrEmail: 'Téléphone ou e-mail',
error: {
agentSignInBlocked:
- 'Les comptes d\u2019agent ne permettent pas de se connecter directement. Pour utiliser un agent, connectez-vous avec votre propre compte et accédez-y via Copilot.',
+ 'Les comptes d’agent ne permettent pas de se connecter directement. Pour utiliser un agent, connectez-vous avec votre propre compte et accédez-y via Copilot.',
invalidFormatEmailLogin: 'L’adresse e-mail saisie est invalide. Veuillez corriger le format et réessayer.',
},
cannotGetAccountDetails: 'Impossible de récupérer les détails du compte. Veuillez essayer de vous reconnecter.',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index e358d2cf3e8..1b2effccc77 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -497,6 +497,7 @@ const translations: TranslationDeepObject<typeof en> = {
previousYear: 'Anno precedente',
nextYear: "L'anno prossimo",
avatar: 'Avatar',
+ agent: 'Agente',
},
socials: {
podcast: 'Seguici su Podcast',
@@ -2669,6 +2670,8 @@ ${amount} per ${merchant} - ${date}`,
genericErrorMessage: "Non è stato possibile modificare l'approvatore. Riprova o contatta l'assistenza.",
title: 'Imposta approvatore',
description: 'Questa persona approverà le spese.',
+ createNewAgent: 'Crea nuovo agente',
+ createNewAgentDescription: 'Automatizza le tue approvazioni con prompt',
},
workflowsApprovalLimitPage: {
title: 'Approvante',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 340cdace1a8..95be8740f19 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -496,6 +496,7 @@ const translations: TranslationDeepObject<typeof en> = {
previousYear: '前年',
nextYear: '来年',
avatar: 'アバター',
+ agent: 'エージェント',
},
socials: {
podcast: 'ポッドキャストでフォロー',
@@ -2560,7 +2561,7 @@ ${date} の ${merchant} への ${amount}`,
accessibilityLabel: ({members, approvers}: {members: string; approvers: string}) => `${members} の経費で、承認者は ${approvers} です`,
addApprovalButton: '承認ワークフローを追加',
editWorkflowAction: '編集',
- addAgentAction: 'エージェントを追加',
+ addAgentAction: '担当者を追加',
findWorkflow: 'ワークフローを検索',
addApprovalTip: 'より詳細なワークフローが存在する場合を除き、このデフォルトのワークフローがすべてのメンバーに適用されます。',
approver: '承認者',
@@ -2647,6 +2648,8 @@ ${date} の ${merchant} への ${amount}`,
genericErrorMessage: '承認者を変更できませんでした。もう一度お試しいただくか、サポートにお問い合わせください。',
title: '承認者を設定',
description: 'この人が経費を承認します。',
+ createNewAgent: '新しいエージェントを作成',
+ createNewAgentDescription: '迅速な承認でワークフローを自動化しましょう',
},
workflowsApprovalLimitPage: {
title: '承認者',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 5c4c429c12c..d5890f3a715 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -496,6 +496,7 @@ const translations: TranslationDeepObject<typeof en> = {
previousYear: 'Vorig jaar',
nextYear: 'Volgend jaar',
avatar: 'Avatar',
+ agent: 'Agent',
},
socials: {
podcast: 'Volg ons op Podcast',
@@ -2666,6 +2667,8 @@ ${amount} voor ${merchant} - ${date}`,
genericErrorMessage: 'De fiatteur kon niet worden gewijzigd. Probeer het opnieuw of neem contact op met support.',
title: 'Stel fiatteur in',
description: 'Deze persoon keurt de declaraties goed.',
+ createNewAgent: 'Nieuwe agent toevoegen',
+ createNewAgentDescription: 'Automatiseer je goedkeuringen met prompt',
},
workflowsApprovalLimitPage: {
title: 'Fiatteur',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 66a543121ff..ec80df214a8 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -496,6 +496,7 @@ const translations: TranslationDeepObject<typeof en> = {
previousYear: 'Poprzedni rok',
nextYear: 'W przyszłym roku',
avatar: 'Avatar',
+ agent: 'Agent',
},
socials: {
podcast: 'Śledź nas na Podcast',
@@ -2662,6 +2663,8 @@ ${amount} dla ${merchant} - ${date}`,
genericErrorMessage: 'Nie udało się zmienić osoby zatwierdzającej. Spróbuj ponownie lub skontaktuj się z pomocą techniczną.',
title: 'Ustaw zatwierdzającego',
description: 'Ta osoba będzie zatwierdzać wydatki.',
+ createNewAgent: 'Utwórz nowego agenta',
+ createNewAgentDescription: 'Automatyzuj swoje akceptacje za pomocą promptów',
},
workflowsApprovalLimitPage: {
title: 'Osoba zatwierdzająca',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 5155a743303..eb4fce64943 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -495,6 +495,7 @@ const translations: TranslationDeepObject<typeof en> = {
previousYear: 'Ano anterior',
nextYear: 'Ano que vem',
avatar: 'Avatar',
+ agent: 'Agente',
},
socials: {
podcast: 'Siga-nos no Podcast',
@@ -2660,6 +2661,8 @@ ${amount} para ${merchant} - ${date}`,
genericErrorMessage: 'O aprovador não pôde ser alterado. Tente novamente ou entre em contato com o suporte.',
title: 'Definir aprovador',
description: 'Essa pessoa vai aprovar as despesas.',
+ createNewAgent: 'Criar novo agente',
+ createNewAgentDescription: 'Automatize suas aprovações com agilidade',
},
workflowsApprovalLimitPage: {
title: 'Aprovador',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index e77148a1541..acde0379803 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -492,6 +492,7 @@ const translations: TranslationDeepObject<typeof en> = {
previousYear: '上一年',
nextYear: '明年',
avatar: '头像',
+ agent: '代理人',
},
socials: {
podcast: '在播客上关注我们',
@@ -2594,6 +2595,8 @@ ${amount},商户:${merchant} - 日期:${date}`,
genericErrorMessage: '无法更改审批人。请重试或联系支持。',
title: '设置审批人',
description: '此人将审核并批准这些报销。',
+ createNewAgent: '创建新代理',
+ createNewAgentDescription: '使用 Prompt 自动化您的审批',
},
workflowsApprovalLimitPage: {
title: '审批人',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
- Added a new `headerContent` prop to the ApproverSelectionList component for customizable header content. - Introduced translations for creating new agents in English and Spanish. - Updated AddAgentPage to handle optimistic agent creation and reconciliation within approval workflows. - Enhanced WorkspaceWorkflowsApprovalsApproverPage to conditionally display a menu item for creating new agents, improving user experience in agent management.
- Introduced a new translation for 'Agent' in the English language file. - Updated MemberRightIcon component to include an `isAgent` prop for displaying agent badges. - Enhanced WorkspaceWorkflowsApprovalsApproverPage to conditionally render agent-related information and manage optimistic agent states. - Added styles for agent approver avatars to improve UI consistency.
- Added `onDismissError` prop to ApproverSelectionList for improved error management. - Implemented `clearOptimisticAgentFromApprovalWorkflow` function to handle optimistic agent state during approval processes. - Updated AddAgentPage to navigate correctly based on approval workflow actions. - Enhanced WorkspaceWorkflowsApprovalsApproverPage to manage optimistic approver display and dismissal, improving user experience in agent management.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
02b5707 to
bdaaf14
Compare
|
@parasharrajat @yuwenmemon One of you needs to 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] |
|
🚧 @NicolasBonet has triggered a test Expensify/App build. You can view the workflow run here. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bdaaf14aed
ℹ️ 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".
Does workspace context mean the agent will be connected to the workspace? Aren't agents tied to the whole profile and not a workspace? |
They need to be added as members of the workspace as well, not only to the profile. |
- Changed the `makeRoute` function to accept an optional `name` parameter for better flexibility in route creation. - Updated the test case for `AddAgentPage` to use the new route handling, ensuring accurate navigation based on the approval workflow.
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
…r retrieval in WorkspaceWorkflowsApprovalsApproverPage - Refactored route determination logic in AddAgentPage for better readability and maintainability. - Updated the method of accessing approvers in WorkspaceWorkflowsApprovalsApproverPage to use the `at` method for improved clarity and performance.
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Core design doc issue
The base branch was changed.
|
Bug:
Screen.Recording.2026-05-30.at.8.13.02.PM.mov |
Explanation of Change
Adds the option to add agents in the approver list, so they are automatically added as approvers on creation
Hold
For: #91441
Fixed Issues
$ #91245
PROPOSAL: #91245
Tests
Offline tests
Repeat the process but set offline mode before creating the agent, you should see the agent opaque until you resume connection.
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-05-29.at.2.43.21.PM.mov