Repository navigation
Conversation
- Force editor role for new members on Submit workspaces in addMembersToWorkspace (FE override) - Add Editor to WorkspaceMemberRoleList (only shown on Submit workspaces) - Add new editors to the #admins room in buildAddMembersToWorkspaceOnyxData - Default the invite role to Editor on Submit workspaces in the invite message + role pages - All Submit-specific behavior is gated behind the SUBMIT_2026 beta, threaded as a parameter - Add common.editor and workspace.common.editorAlternateText (en only; other locales to follow) - Add unit tests covering the editor override, beta gating, and #admins room membership
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
🦜 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 d47ee109..7d948f43 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -494,6 +494,7 @@ const translations: TranslationDeepObject<typeof en> = {
previousYear: 'Vorheriges Jahr',
nextYear: 'Nächstes Jahr',
avatar: 'Avatar',
+ editor: 'Editor',
},
socials: {
podcast: 'Folgen Sie uns auf Podcast',
@@ -4321,6 +4322,8 @@ ${amount} für ${merchant} – ${date}`,
return 'Admin';
case CONST.POLICY.ROLE.AUDITOR:
return 'Prüfer';
+ case CONST.POLICY.ROLE.EDITOR:
+ return 'Editor';
case CONST.POLICY.ROLE.USER:
return 'Mitglied';
default:
@@ -4356,6 +4359,7 @@ ${amount} für ${merchant} – ${date}`,
travelInvoicingPayableAccount: 'Reiseverbindlichkeitskonto',
hr: 'Personalwesen',
rooms: 'Räume',
+ editorAlternateText: 'Arbeitsbereichseinstellungen konfigurieren, ohne die Ausgaben anderer Mitglieder zu sehen.',
},
createdForClient: {
title: 'Du hast einen Workspace für deinen Kunden erstellt!',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 2fce892d..79874074 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -446,6 +446,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}`,
+ editor: 'Editor',
},
socials: {
podcast: 'Síguenos en Podcast',
@@ -4199,12 +4200,14 @@ ${amount} para ${merchant} - ${date}`,
[CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_NO]: 'Ninguno',
[CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_MANUAL]: 'Indirecto',
},
- roleName: (role) => {
+ roleName: (role?: string) => {
switch (role) {
case CONST.POLICY.ROLE.ADMIN:
- return 'Administrador';
+ return 'Admin';
case CONST.POLICY.ROLE.AUDITOR:
return 'Auditor';
+ case CONST.POLICY.ROLE.EDITOR:
+ return 'Editor';
case CONST.POLICY.ROLE.USER:
return 'Miembro';
default:
@@ -4242,6 +4245,7 @@ ${amount} para ${merchant} - ${date}`,
travelInvoicing: 'Exportar Viajes de Expensify por Pagar a',
travelInvoicingVendor: 'Proveedor de viajes',
travelInvoicingPayableAccount: 'Cuenta por pagar de viajes',
+ editorAlternateText: 'Configura los ajustes del espacio de trabajo sin ver los gastos de otros miembros.',
},
createdForClient: {
title: '¡Has creado un espacio de trabajo para tu cliente!',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 3c89403e..f7552eec 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -494,6 +494,7 @@ const translations: TranslationDeepObject<typeof en> = {
previousYear: 'Année précédente',
nextYear: 'L’an prochain',
avatar: 'Avatar',
+ editor: 'Éditeur',
},
socials: {
podcast: 'Suivez-nous sur Podcast',
@@ -4330,6 +4331,8 @@ ${amount} pour ${merchant} - ${date}`,
return 'Administrateur';
case CONST.POLICY.ROLE.AUDITOR:
return 'Auditeur';
+ case CONST.POLICY.ROLE.EDITOR:
+ return 'Éditeur';
case CONST.POLICY.ROLE.USER:
return 'Membre';
default:
@@ -4365,6 +4368,7 @@ ${amount} pour ${merchant} - ${date}`,
travelInvoicingPayableAccount: 'Compte fournisseur déplacements',
hr: 'RH',
rooms: 'Salons',
+ editorAlternateText: 'Configurer les paramètres de l’espace de travail sans voir les dépenses des autres membres.',
},
createdForClient: {
title: 'Vous avez créé un espace de travail pour votre client !',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 1edee698..99aeadf5 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -494,6 +494,7 @@ const translations: TranslationDeepObject<typeof en> = {
previousYear: 'Anno precedente',
nextYear: "L'anno prossimo",
avatar: 'Avatar',
+ editor: 'Editor',
},
socials: {
podcast: 'Seguici su Podcast',
@@ -4307,6 +4308,8 @@ ${amount} per ${merchant} - ${date}`,
return 'Amministrazione';
case CONST.POLICY.ROLE.AUDITOR:
return 'Revisore';
+ case CONST.POLICY.ROLE.EDITOR:
+ return 'Editor';
case CONST.POLICY.ROLE.USER:
return 'Membro';
default:
@@ -4342,6 +4345,7 @@ ${amount} per ${merchant} - ${date}`,
travelInvoicingPayableAccount: 'Conto debiti per viaggi',
hr: 'Risorse umane',
rooms: 'Stanze',
+ editorAlternateText: 'Configura le impostazioni dello spazio di lavoro senza vedere le spese degli altri membri.',
},
createdForClient: {
title: 'Hai creato uno spazio di lavoro per il tuo cliente!',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 1dc8f623..4b1b743b 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -493,6 +493,7 @@ const translations: TranslationDeepObject<typeof en> = {
previousYear: '前年',
nextYear: '来年',
avatar: 'アバター',
+ editor: '編集者',
},
socials: {
podcast: 'ポッドキャストでフォロー',
@@ -4273,7 +4274,9 @@ ${integrationName === CONST.ONBOARDING_ACCOUNTING_MAPPING.other ? 'あなたの'
case CONST.POLICY.ROLE.ADMIN:
return '管理者';
case CONST.POLICY.ROLE.AUDITOR:
- return '監査人';
+ return '監査担当者';
+ case CONST.POLICY.ROLE.EDITOR:
+ return '編集者';
case CONST.POLICY.ROLE.USER:
return 'メンバー';
default:
@@ -4309,6 +4312,7 @@ ${integrationName === CONST.ONBOARDING_ACCOUNTING_MAPPING.other ? 'あなたの'
travelInvoicingPayableAccount: '旅費未払金勘定',
hr: '人事',
rooms: 'ルーム',
+ editorAlternateText: '他のメンバーの経費を表示せずに、ワークスペース設定を構成できます。',
},
createdForClient: {
title: 'クライアントのワークスペースを作成しました!',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 9737a63f..6c02fe96 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -493,6 +493,7 @@ const translations: TranslationDeepObject<typeof en> = {
previousYear: 'Vorig jaar',
nextYear: 'Volgend jaar',
avatar: 'Avatar',
+ editor: 'Editor',
},
socials: {
podcast: 'Volg ons op Podcast',
@@ -4299,9 +4300,11 @@ ${amount} voor ${merchant} - ${date}`,
roleName: (role?: string) => {
switch (role) {
case CONST.POLICY.ROLE.ADMIN:
- return 'Beheerder';
+ return 'Beheer';
case CONST.POLICY.ROLE.AUDITOR:
return 'Auditor';
+ case CONST.POLICY.ROLE.EDITOR:
+ return 'Editor';
case CONST.POLICY.ROLE.USER:
return 'Lid';
default:
@@ -4337,6 +4340,7 @@ ${amount} voor ${merchant} - ${date}`,
travelInvoicingPayableAccount: 'Reiscrediteurenrekening',
hr: 'HR',
rooms: 'Kamers',
+ editorAlternateText: 'Configureer werkruimte-instellingen zonder de onkosten van andere leden te zien.',
},
createdForClient: {
title: 'Je hebt een werkruimte voor je klant aangemaakt!',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index fb15ccba..70a4868e 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -493,6 +493,7 @@ const translations: TranslationDeepObject<typeof en> = {
previousYear: 'Poprzedni rok',
nextYear: 'W przyszłym roku',
avatar: 'Avatar',
+ editor: 'Edytor',
},
socials: {
podcast: 'Śledź nas na Podcast',
@@ -4295,6 +4296,8 @@ ${amount} dla ${merchant} - ${date}`,
return 'Administrator';
case CONST.POLICY.ROLE.AUDITOR:
return 'Audytor';
+ case CONST.POLICY.ROLE.EDITOR:
+ return 'Edytor';
case CONST.POLICY.ROLE.USER:
return 'Członek';
default:
@@ -4330,6 +4333,7 @@ ${amount} dla ${merchant} - ${date}`,
travelInvoicingPayableAccount: 'Konto zobowiązań z tytułu podróży',
hr: 'HR',
rooms: 'Pokoje',
+ editorAlternateText: 'Konfiguruj ustawienia przestrzeni roboczej bez podglądu wydatków innych członków.',
},
createdForClient: {
title: 'Utworzyłeś przestrzeń roboczą dla swojego klienta!',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 018d4b28..c7832bf5 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -492,6 +492,7 @@ const translations: TranslationDeepObject<typeof en> = {
previousYear: 'Ano anterior',
nextYear: 'Ano que vem',
avatar: 'Avatar',
+ editor: 'Editor',
},
socials: {
podcast: 'Siga-nos no Podcast',
@@ -4297,6 +4298,8 @@ ${amount} para ${merchant} - ${date}`,
return 'Admin';
case CONST.POLICY.ROLE.AUDITOR:
return 'Auditor';
+ case CONST.POLICY.ROLE.EDITOR:
+ return 'Editor';
case CONST.POLICY.ROLE.USER:
return 'Membro';
default:
@@ -4332,6 +4335,7 @@ ${amount} para ${merchant} - ${date}`,
travelInvoicingPayableAccount: 'Conta a pagar de viagens',
hr: 'RH',
rooms: 'Salas',
+ editorAlternateText: 'Configure as configurações do espaço de trabalho sem ver as despesas de outros membros.',
},
createdForClient: {
title: 'Você criou um espaço de trabalho para seu cliente!',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 7f51cc44..10041e4f 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -489,6 +489,7 @@ const translations: TranslationDeepObject<typeof en> = {
previousYear: '上一年',
nextYear: '明年',
avatar: '头像',
+ editor: '编辑器',
},
socials: {
podcast: '在播客上关注我们',
@@ -4206,6 +4207,8 @@ ${amount},商户:${merchant} - 日期:${date}`,
return '管理员';
case CONST.POLICY.ROLE.AUDITOR:
return '审计员';
+ case CONST.POLICY.ROLE.EDITOR:
+ return '编辑器';
case CONST.POLICY.ROLE.USER:
return '成员';
default:
@@ -4240,6 +4243,7 @@ ${amount},商户:${merchant} - 日期:${date}`,
travelInvoicingPayableAccount: '差旅应付账户',
hr: '人力资源',
rooms: '房间',
+ editorAlternateText: '在不查看其他成员报销的情况下配置工作区设置。',
},
createdForClient: {
title: '您已为客户创建了工作区!',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
… Profile WorkspaceMembersPage previously bailed to ROUTES.PROFILE whenever the policy was not isPaidGroupPolicy. Submit (submit2026) workspaces are intentionally excluded from isPaidGroupPolicy, which made editors unable to reach the member-details page (and therefore the Role row) for other members. Add a canManageMembers check that includes Submit workspaces (gated on the SUBMIT_2026 beta) so editors land on WORKSPACE_MEMBER_DETAILS like they do on Collect/Control.
The Editor description ("Configure workspace settings without seeing other
members' expenses.") was being truncated to a single line. Match the role
list pattern used elsewhere (e.g. UpdateDelegateRolePage, SelectionScreen)
by setting alternateNumberOfSupportedLines={2}.
Previously the role list on a Submit workspace showed Editor + Member as options. Picking Member was misleading: the FE override in addMembersToWorkspace and the backend both force the role back to Editor on submit2026 policies, so the user got Editor regardless. Filter Member out alongside Admin/Auditor when the policy is Submit and the SUBMIT_2026 beta is on — Editor is the only valid role for invites and role-changes there.
Editor is the only valid role on a Submit workspace, so there's nothing for the user to choose. Mark the (filtered) Editor item as isInteractive: false so the row stays visible and informative but no longer responds to taps.
|
@MelvinBot review the changes find regressions or breaking issues |
PR Review — Potential Regressions & Issues1. Missing
|
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
…2026 through changeReportPolicyAndInviteSubmitter - buildAddMembersToWorkspaceOnyxData is now the single source of truth for the editor-role override on Submit workspaces; it returns the effective role so addMembersToWorkspace can use it for API params without duplicating the conditional. - Simplify shouldAddToAdminsRoom: shouldForceEditorRole already implies effectiveRole === EDITOR, so drop the redundant equality check. - Thread canUseSubmit2026 from ReportChangeWorkspacePage through changeReportPolicyAndInviteSubmitter so moving a report into a Submit workspace shows the correct optimistic role (no Member->Editor flash).
Admin doesn't exist on Submit workspaces per design — only Editor does. Previously, if a user's role on a Submit policy happened to be Admin (e.g. an inconsistent server response), the Admin row would still render in the role list (just non-interactive after the read-only map). Filter it out unconditionally on Submit so the list only ever shows Editor.
…; fix zh-hans Editor The auto-translation diff accidentally renamed pre-existing role names across other locales. Revert these so this PR only adds the new Editor strings and doesn't change what existing users see for other roles: - es: Administrador (keep — was renamed to Admin) - nl: Beheerder (keep — was renamed to Beheer) - ja: 監査人 (keep — was renamed to 監査担当者) Also fix the zh-hans Editor translation: - common.editor 编辑器 -> 编辑 (编辑器 is a software 'editor', not the person role) - workspace.common.roleName(EDITOR) 编辑器 -> 编辑
- Add EDITOR case to MemberRightIcon so the role badge renders on the members list for Submit workspace editors. - Simplify openMemberDetails routing in WorkspaceMembersPage: use canEditWorkspaceSettings (already true for editors) instead of the beta-gated canManageMembers, fixing the regression where clicking a member row opened the public Profile page instead of WORKSPACE_MEMBER_DETAILS.
The beta gates Submit workspace creation; it should not affect the role list UI of an existing submit2026 workspace. Derive isPolicySubmit2026 directly from isSubmitPolicy(policy) so the Editor-only role list renders correctly even when the SUBMIT_2026 beta is not active in the current session.
… details The role is locked to Editor on Submit workspaces — there is nothing to select. Marking the row as non-interactive (no chevron, no onPress) prevents accidental navigation to WorkspaceMemberDetailsRolePage. The full paywall/upgrade redirect for Roles is handled separately in the Wave 2 paywall-gating issue.
…-role-invite-flows
|
Observation: workspace creator role on Submit workspaces Per the design doc, the workspace creator should be an editor (owner), not an admin — the Admin role does not exist on Submit workspaces. Everyone including the creator should have the Editor role. I noticed that the backend returns: Screen.Recording.2026-05-19.at.05.43.10.movIf the backend is returning |
|
@MelvinBot Review the PR find other issues if any |
Additional Review FindingsFollowing up on my earlier review, here are additional issues found on a deeper pass: 6. Missing Editor role badge in members list
QA step 4 says "verify User B is shown as Editor" — but there's no visual indicator on the members list to confirm this (only the member detail page would show it via If this is intentional (matching how } else if (policyEmployee.role === CONST.POLICY.ROLE.EDITOR) {
roleBadgeText = translate('common.editor');
}7. No "Editors" option in the role filter dropdown
If all Submit members are Editors, this filter may be unnecessary — but it's a gap if admins exist alongside editors on a Submit workspace and the user wants to filter. 8.
|
|
Backend bug: invited editors' roles reset to Member on re-login After inviting a member to a Submit workspace (role correctly shows as Editor optimistically), logging out and back in causes the backend to return those members with Screen.Recording.2026-05-19.at.05.56.55.movLooks like its part of the Wave 1 backend task — "Update Policy::shareWithEmployees — always invite users to submit2026 policies as the editor role" — was it already implemented? |
#6 — Add Editor case to roleBadgeText in WorkspaceMembersPage so the accessibility label includes 'Editor' for Submit workspace members (the visual badge was already correct via MemberRightIcon). #8 — Guard updateWorkspaceMembersRole against Submit workspaces. The UI already blocks role changes via isInteractive:false and isPaidGroupPolicy checks, but the action itself was unguarded. This closes the gap against future programmatic call sites.
|
on it 👀 |
| const isPolicyAdmin = canEditWorkspaceSettings(policy); | ||
| // Paid (Collect/Control) and Submit workspaces allow member management. Submit is gated on the policy type — | ||
| // the SUBMIT_2026 beta only controls whether a Submit workspace can be created, not behavior on existing ones. | ||
| const canManageMembers = isPaidGroupPolicy(policy) || isSubmitPolicy(policy); |
There was a problem hiding this comment.
Can we reuse isGroupPolicy?
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-06-05.at.11.06.27.movAndroid: mWeb ChromeScreen.Recording.2026-06-05.at.11.06.27.moviOS: HybridAppScreen.Recording.2026-06-05.at.11.02.59.moviOS: mWeb SafariScreen.Recording.2026-06-05.at.11.04.24.movMacOS: Chrome / SafariScreen.Recording.2026-06-05.at.10.48.46.mov |
| // invite/manage members but must not be able to escalate anyone to admin. | ||
| // Only strict admins can assign the ADMIN role. | ||
| const canAssignAdminRole = isPolicyAdmin(policy, currentUserEmail); | ||
| const availableRoleItems: ListItemType[] = workspaceRoles.filter((item) => { |
There was a problem hiding this comment.
NAB what a weird way of doing things: first assemble all options, then filter them out. Would be simpler to conditionally add the roles to the OG array
There was a problem hiding this comment.
Good call — I went further and reverted WorkspaceMemberRoleList to main entirely. On Submit workspaces, Roles is paywalled (design doc 2.4.1): both the member-details Role row (tryNavigateToSubmitWorkspaceUpgrade) and the role page (useRedirectSubmitWorkspaceFeatureUpgrade) redirect to the upgrade modal before this list ever renders. So the Editor row here was unreachable dead code. Removed it (and the now-unused editorAlternateText translations). The Editor role is still enforced where it matters — forced in addMembersToWorkspace and the invite default.
| const isPolicyAdmin = canEditWorkspaceSettings(policy); | ||
| // Paid (Collect/Control) and Submit workspaces allow member management. Submit is gated on the policy type — | ||
| // the SUBMIT_2026 beta only controls whether a Submit workspace can be created, not behavior on existing ones. | ||
| const canManageMembers = isPaidGroupPolicy(policy) || isSubmitPolicy(policy); |
BTW I submitted a PR to fix that https://github.com/Expensify/Web-Expensify/pull/53467 |
- WorkspaceMembersPage: use isGroupPolicy(policy) for canManageMembers (per hungvu193 & iwiznia) instead of isPaidGroupPolicy || isSubmitPolicy. - WorkspaceMemberRoleList: build the role list by conditionally pushing items instead of assemble-then-filter (per iwiznia).
|
handled all of the comments @iwiznia |
Per review (iwiznia): on Submit the only base role is Editor, so push Member only in the else branch instead of always.
…lled) Roles are paywalled on Submit workspaces (doc 2.4.1) — both the member details and invite Role entry points redirect to the upgrade modal before the role list renders, so the Editor row was unreachable dead code. Revert WorkspaceMemberRoleList to main's version and remove the now-unused editorAlternateText translation from all locales.
|
cleaned the unreached code ... rn if the user clicks on the role the upgrade modal would open up then the user has to upgrade the workspace, so the role list would never contain the editor record because it would be upgraded |
|
🚧 @iwiznia has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/iwiznia in version: 9.4.0-0 🚀
Bundle Size Analysis (Sentry): |
|
Deploy Blocker #92828 was identified to be related to this PR. |
|
Deploy Blocker #92887 was identified to be related to this PR. |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.4.0-7 🚀
|
Explanation of Change
Wires up the Editor role + invite flows task from Wave 2 of the Bottom-Up Submit Plan:
addMembersToWorkspace(matches the backend'sPolicy::shareWithEmployeesbehavior).WorkspaceMemberRoleList, shown only on Submit workspaces. Admin stays gated behindisPolicyAdmin, so editors cannot escalate roles.#adminsroom inbuildAddMembersToWorkspaceOnyxData.WorkspaceInviteMessageComponentandDynamicWorkspaceInviteMessageRolePage.isSubmitPolicy), consistent with the rest of the Submit codebase (tryNavigateToSubmitWorkspaceUpgrade,useRedirectSubmitWorkspaceFeatureUpgrade, etc.). TheSUBMIT_2026beta only gates creating a Submit workspace — once one exists, every member (including invitees who don't have the beta) gets the correct Editor behavior.Fixed Issues
$ #87865
PROPOSAL: N/A (internal Expensify project — design doc tracked in #87865)
Tests
Same as QA Steps.
Offline tests
N/A — the editor role override is applied optimistically and the existing offline / optimistic-data behavior of
addMembersToWorkspaceis preserved.QA Steps
PR Author Checklist
Screenshots/Videos
Android: Native
Screen.Recording.2026-05-19.at.06.05.36.mov
Android: mWeb Chrome
Screen.Recording.2026-05-19.at.06.08.23.mov
iOS: Native
Screen.Recording.2026-05-19.at.05.52.26.mov
iOS: mWeb Safari
Screen.Recording.2026-05-19.at.05.54.55.mov
MacOS: Chrome / Safari
Screen.Recording.2026-05-19.at.05.39.32.mov