Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@mananjadhav 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] |
🦜 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 8ae3c65a..5d705483 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -45,8 +45,8 @@ const translations: TranslationDeepObject<typeof en> = {
markAsPaid: 'Als bezahlt markieren',
paymentFailed: 'Diese Rechnung konnte nicht bezahlt werden. Bitte versuche es erneut.',
createFailed: 'Diese Rechnung konnte nicht erstellt werden. Bitte versuche es erneut.',
- payBills: ({count}) => ({one: '1 Rechnung bezahlen', other: `${count} Rechnungen bezahlen`}),
- approveBills: ({count}) => ({one: '1 Rechnung genehmigen', other: `${count} Rechnungen genehmigen`}),
+ payBills: ({count}: {count: number}) => ({one: '1 Rechnung bezahlen', other: `${count} Rechnungen bezahlen`}),
+ approveBills: ({count}: {count: number}) => ({one: '1 Rechnung genehmigen', other: `${count} Rechnungen genehmigen`}),
primaryContactHint: (domain) =>
`Der Hauptkontakt ist die zentrale Kontaktperson für ${domain} und erhält Rechnungen, die an die Rechnungsadresse dieser Domain ${domain}@expensify.cash gesendet werden.`,
},
diff --git a/src/languages/el.ts b/src/languages/el.ts
index a77fdf33..deb07096 100644
--- a/src/languages/el.ts
+++ b/src/languages/el.ts
@@ -42,8 +42,8 @@ const translations: TranslationDeepObject<typeof en> = {
markAsPaid: 'Σήμανση ως πληρωμένο',
paymentFailed: 'Δεν μπορέσαμε να πληρώσουμε αυτόν τον λογαριασμό. Δοκιμάστε ξανά.',
createFailed: 'Δεν μπορέσαμε να δημιουργήσουμε αυτόν τον λογαριασμό. Δοκιμάστε ξανά.',
- payBills: ({count}) => ({one: 'Πληρωμή 1 λογαριασμού', other: `Πληρωμή ${count} λογαριασμών`}),
- approveBills: ({count}) => ({one: 'Έγκριση 1 λογαριασμού', other: `Έγκριση ${count} λογαριασμών`}),
+ payBills: ({count}: {count: number}) => ({one: 'Πληρώστε 1 λογαριασμό', other: `Πληρώστε ${count} λογαριασμούς`}),
+ approveBills: ({count}: {count: number}) => ({one: 'Έγκριση 1 λογαριασμού', other: `Έγκριση ${count} λογαριασμών`}),
primaryContactHint: (domain) =>
`Η κύρια επαφή είναι το βασικό σημείο επικοινωνίας για το ${domain} και θα λαμβάνει λογαριασμούς που αποστέλλονται στη διεύθυνση πληρωμών του τομέα ${domain}@expensify.cash.`,
},
diff --git a/src/languages/es.ts b/src/languages/es.ts
index efc53787..da2d5c06 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -31,8 +31,8 @@ const translations: TranslationDeepObject<typeof en> = {
markAsPaid: 'Marcar como pagada',
paymentFailed: 'No pudimos pagar esta factura. Inténtalo de nuevo.',
createFailed: 'No pudimos crear esta factura. Inténtalo de nuevo.',
- payBills: ({count}) => ({one: 'Pagar 1 factura', other: `Pagar ${count} facturas`}),
- approveBills: ({count}) => ({one: 'Aprobar 1 factura', other: `Aprobar ${count} facturas`}),
+ payBills: ({count}: {count: number}) => ({one: 'Pagar 1 factura', other: `Paga ${count} facturas`}),
+ approveBills: ({count}: {count: number}) => ({one: 'Aprobar 1 factura', other: `Aprobar ${count} facturas`}),
primaryContactHint: (domain) =>
`El contacto principal es el punto de contacto de ${domain} y recibirá las facturas enviadas a la dirección de pago de facturas del dominio ${domain}@expensify.cash.`,
},
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 589f076f..45b4b17f 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -45,8 +45,8 @@ const translations: TranslationDeepObject<typeof en> = {
markAsPaid: 'Marquer comme payée',
paymentFailed: 'Nous n’avons pas pu payer cette facture. Veuillez réessayer.',
createFailed: 'Nous n’avons pas pu créer cette facture. Veuillez réessayer.',
- payBills: ({count}) => ({one: 'Payer 1 facture', other: `Payer ${count} factures`}),
- approveBills: ({count}) => ({one: 'Approuver 1 facture', other: `Approuver ${count} factures`}),
+ payBills: ({count}: {count: number}) => ({one: 'Payer 1 facture', other: `Payer ${count} factures`}),
+ approveBills: ({count}: {count: number}) => ({one: 'Approuver 1 facture', other: `Approuver ${count} factures`}),
primaryContactHint: (domain) =>
`Le contact principal est l’interlocuteur de ${domain} et recevra les factures envoyées à l’adresse de paiement des factures du domaine ${domain}@expensify.cash.`,
},
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 7c9e49c9..1e0be9f5 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -45,8 +45,8 @@ const translations: TranslationDeepObject<typeof en> = {
markAsPaid: 'Segna come pagata',
paymentFailed: 'Non è stato possibile pagare questa fattura. Riprova.',
createFailed: 'Non è stato possibile creare questa fattura. Riprova.',
- payBills: ({count}) => ({one: 'Paga 1 fattura', other: `Paga ${count} fatture`}),
- approveBills: ({count}) => ({one: 'Approva 1 fattura', other: `Approva ${count} fatture`}),
+ payBills: ({count}: {count: number}) => ({one: 'Paga 1 fattura', other: `Paga ${count} fatture`}),
+ approveBills: ({count}: {count: number}) => ({one: 'Approva 1 fattura', other: `Approva ${count} fatture`}),
primaryContactHint: (domain) =>
`Il contatto principale è il referente di ${domain} e riceverà le fatture inviate all’indirizzo per il pagamento delle fatture del dominio ${domain}@expensify.cash.`,
},
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 238e1f3b..39027e6f 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -45,8 +45,8 @@ const translations: TranslationDeepObject<typeof en> = {
markAsPaid: '支払済みにする',
paymentFailed: 'この請求書を支払えませんでした。もう一度お試しください。',
createFailed: 'この請求書を作成できませんでした。もう一度お試しください。',
- payBills: ({count}) => ({one: '1件の請求書を支払う', other: `${count}件の請求書を支払う`}),
- approveBills: ({count}) => ({one: '1件の請求書を承認', other: `${count}件の請求書を承認`}),
+ payBills: ({count}: {count: number}) => ({one: '1 件の請求書を支払う', other: `${count} 件の請求書を支払う`}),
+ approveBills: ({count}: {count: number}) => ({one: '1件の請求書を承認', other: `${count} 件の請求書を承認する`}),
primaryContactHint: (domain) => `主な連絡先は${domain}の窓口となり、このドメインの請求書支払い用アドレス${domain}@expensify.cashに送信された請求書を受け取ります。`,
},
common: {
@@ -7469,7 +7469,6 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO
title: 'メンバーをコピー',
prompt: ({count, targetWorkspaceName}: {count: number; targetWorkspaceName: string}) => ({
one: `${targetWorkspaceName}のメンバーをこのワークスペースのメンバーで置き換えてもよろしいですか?`,
- // Japanese has no "one" plural category, so handle the single-workspace case here
other:
count === 1
? `${targetWorkspaceName}のメンバーをこのワークスペースのメンバーで置き換えてもよろしいですか?`
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 6ea581b0..39484897 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -45,8 +45,8 @@ const translations: TranslationDeepObject<typeof en> = {
markAsPaid: 'Markeren als betaald',
paymentFailed: 'We konden deze factuur niet betalen. Probeer het opnieuw.',
createFailed: 'We konden deze factuur niet maken. Probeer het opnieuw.',
- payBills: ({count}) => ({one: '1 factuur betalen', other: `${count} facturen betalen`}),
- approveBills: ({count}) => ({one: '1 factuur goedkeuren', other: `${count} facturen goedkeuren`}),
+ payBills: ({count}: {count: number}) => ({one: '1 rekening betalen', other: `Betaal ${count} rekeningen`}),
+ approveBills: ({count}: {count: number}) => ({one: '1 factuur goedkeuren', other: `${count} facturen goedkeuren`}),
primaryContactHint: (domain) =>
`De primaire contactpersoon is het aanspreekpunt voor ${domain} en ontvangt facturen die naar het factuuradres van dit domein ${domain}@expensify.cash worden gestuurd.`,
},
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 6d8cfb29..b810bd64 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -45,8 +45,8 @@ const translations: TranslationDeepObject<typeof en> = {
markAsPaid: 'Oznacz jako opłacone',
paymentFailed: 'Nie udało się opłacić tego rachunku. Spróbuj ponownie.',
createFailed: 'Nie udało się utworzyć tego rachunku. Spróbuj ponownie.',
- payBills: ({count}) => ({one: 'Opłać 1 rachunek', few: `Opłać ${count} rachunki`, many: `Opłać ${count} rachunków`, other: `Opłać ${count} rachunku`}),
- approveBills: ({count}) => ({one: 'Zatwierdź 1 rachunek', few: `Zatwierdź ${count} rachunki`, many: `Zatwierdź ${count} rachunków`, other: `Zatwierdź ${count} rachunku`}),
+ payBills: ({count}: {count: number}) => ({one: 'Zapłać 1 rachunek', other: `Zapłać ${count} rachunki`}),
+ approveBills: ({count}: {count: number}) => ({one: 'Zatwierdź 1 rachunek', other: `Zatwierdź ${count} rachunki`}),
primaryContactHint: (domain) => `Główna osoba kontaktowa odpowiada za kontakt w domenie ${domain} i otrzyma rachunki wysłane na adres płatności tej domeny ${domain}@expensify.cash.`,
},
common: {
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index f0157298..561c1cfe 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -45,8 +45,8 @@ const translations: TranslationDeepObject<typeof en> = {
markAsPaid: 'Marcar como paga',
paymentFailed: 'Não foi possível pagar esta conta. Tente novamente.',
createFailed: 'Não foi possível criar esta conta. Tente novamente.',
- payBills: ({count}) => ({one: 'Pagar 1 conta', other: `Pagar ${count} contas`}),
- approveBills: ({count}) => ({one: 'Aprovar 1 conta', other: `Aprovar ${count} contas`}),
+ payBills: ({count}: {count: number}) => ({one: 'Pagar 1 conta', other: `Pagar ${count} contas`}),
+ approveBills: ({count}: {count: number}) => ({one: 'Aprovar 1 conta', other: `Aprovar ${count} contas`}),
primaryContactHint: (domain) =>
`O contato principal é o ponto de contato de ${domain} e receberá as contas enviadas ao endereço de pagamento de contas deste domínio ${domain}@expensify.cash.`,
},
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 6c0ee3d1..5cebde21 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -45,8 +45,8 @@ const translations: TranslationDeepObject<typeof en> = {
markAsPaid: '标记为已支付',
paymentFailed: '无法支付此账单。请重试。',
createFailed: '无法创建此账单。请重试。',
- payBills: ({count}) => ({one: '支付 1 笔账单', other: `支付 ${count} 笔账单`}),
- approveBills: ({count}) => ({one: '批准 1 笔账单', other: `批准 ${count} 笔账单`}),
+ payBills: ({count}: {count: number}) => ({one: '支付 1 笔账单', other: `支付 ${count} 笔账单`}),
+ approveBills: ({count}: {count: number}) => ({one: '审批 1 张账单', other: `审批 ${count} 笔账单`}),
primaryContactHint: (domain) => `主要联系人是 ${domain} 的主要联络人,并将收到发送至此域名账单支付地址 ${domain}@expensify.cash 的账单。`,
},
common: {
@@ -7296,7 +7296,6 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
title: '复制成员',
prompt: ({count, targetWorkspaceName}: {count: number; targetWorkspaceName: string}) => ({
one: `确定要用此工作区的成员替换 ${targetWorkspaceName} 的成员吗?`,
- // Chinese has no "one" plural category, so handle the single-workspace case here
other: count === 1 ? `确定要用此工作区的成员替换 ${targetWorkspaceName} 的成员吗?` : `确定要用此工作区的成员替换 ${count} 个工作区的成员吗?`,
}),
},
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
| const hasChanged = !frozen || TODO_KEYS.some((key) => frozen.counts[key] !== counts[key] || frozen.singleReportIDs[key] !== singleReportIDs[key]); | ||
| const hasChanged = | ||
| !frozen || | ||
| frozen.counts.billsApprove !== billsApprove || |
There was a problem hiding this comment.
❌ CONSISTENCY-2 (docs)
These two lines access the frozen counts with the hardcoded string-literal keys frozen.counts.billsApprove and frozen.counts.billsPay, but everywhere else in this same file those slots are addressed through the named constants CONST.SEARCH.SEARCH_KEYS.BILLS_APPROVE / CONST.SEARCH.SEARCH_KEYS.BILLS_PAY (see the TodoCounts type and the counts object literal). Hardcoding the literal duplicates the constant's value and will silently break this change-detection check if the constant value ever changes, while the rest of the file keeps working.
Use the constants to stay consistent with the file:
const hasChanged =
!frozen ||
frozen.counts[CONST.SEARCH.SEARCH_KEYS.BILLS_APPROVE] !== billsApprove ||
frozen.counts[CONST.SEARCH.SEARCH_KEYS.BILLS_PAY] !== billsPay ||
TODO_KEYS.some((key) => frozen.counts[key] !== counts[key] || frozen.singleReportIDs[key] !== singleReportIDs[key]);Reviewed at: 5adfd0c | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5adfd0c286
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| key: 'billsApprove', | ||
| count: billApproveCount, | ||
| icon: icons.ThumbsUp, | ||
| translationKey: 'billPay.approveBills' as const, | ||
| handler: createNavigationHandler(CONST.SEARCH.ACTION_FILTERS.APPROVE, {type: CONST.SEARCH.DATA_TYPES.BILL, to: [`${accountID}`]}, CONST.SEARCH.SEARCH_KEYS.BILLS_APPROVE), |
There was a problem hiding this comment.
Replace the bill task configs with declarative JSX
These statically known bill tasks extend todoItems, which is filtered and mapped through the generic BaseWidgetItem renderer below. The repository's CLEAN-REACT-PATTERNS-1 rule explicitly applies when adding features to an existing component and requires individual JSX instead of extending a config array; render these bill rows declaratively, or refactor the task list to compositional rows as part of this change.
AGENTS.md reference: AGENTS.md:L7-L10
Useful? React with 👍 / 👎.
| areTransactionsLoaded: transactionsMetadata.status === 'loaded', | ||
| rules, | ||
| }); | ||
| const {billsApprove, billsPay} = getBillPayCounts(allReports, allPolicies, userAccountID, login); |
There was a problem hiding this comment.
Keep bill counting out of the shared todo hook
On large accounts, every report or policy update now performs another full scan of the report collection in every mounted useTodoCounts consumer, including both Search type menus even though only Home needs these bill counts. The existing useBillPayCounts hook already reduces the report collection to these three scalar values with an Onyx selector, so ForYouSection should consume that hook separately rather than adding this hot-path scan and unrelated output to the shared todo hook.
AGENTS.md reference: AGENTS.md:L7-L10
Useful? React with 👍 / 👎.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@cead22 I can see description updated. But this was tagged as 4th PR. Do you want me to start the review as it's tagged on Hold. OR do you want me to help with the review of the other 3 also? The first one is not tagged to any reviewer. |
|
Please hold on this one for now. I assigned you as a reviewer on the first one, so feel free to get started on that one even though it's on hold. The hold is pending a review from product about any functionality that might be a blocker to ship that PR, but those could be things in the backend like the copy of some emails which lives in the backend |
|
Okay. Thanks for the update @cead22 |
Explanation of Change
This PR adds bill tasks to Home > For You. Users see Approve N bills when bills wait for their approval, and Pay N bills when bills wait for their payment. Each task opens the matching Spend > Bills search.
useTodoCountscounts the bills after its frozen check, from the reports and policies it already reads.Note for the code review: the reviewer asked to rewrite the For You tasks as JSX (CLEAN-REACT-PATTERNS-1). The bill tasks follow the existing config array in that file. Rewriting all the tasks belongs in its own PR.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/684654
PROPOSAL:
Tests
Offline tests
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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.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