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. |
|
@puneetlath 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 4d0210df..0c7dddfb 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -36,8 +36,8 @@ type States = Record<keyof typeof COMMON_CONST.STATES, StateValue>;
type AllCountries = Record<Country, string>;
const translations: TranslationDeepObject<typeof en> = {
billPay: {
- bill: 'Eingangsrechnung',
- bills: 'Eingangsrechnungen',
+ bill: 'Rechnung',
+ bills: 'Rechnungen',
payByACH: 'Per ACH bezahlen',
markAsPaid: 'Als bezahlt markieren',
paymentFailed: 'Diese Rechnung konnte nicht bezahlt werden. Bitte versuche es erneut.',
diff --git a/src/languages/el.ts b/src/languages/el.ts
index aeccc0df..39053a2d 100644
--- a/src/languages/el.ts
+++ b/src/languages/el.ts
@@ -33,7 +33,7 @@ type States = Record<keyof typeof COMMON_CONST.STATES, StateValue>;
type AllCountries = Record<Country, string>;
const translations: TranslationDeepObject<typeof en> = {
billPay: {
- bill: 'Λογαριασμός',
+ bill: 'Τιμολόγιο',
bills: 'Λογαριασμοί',
payByACH: 'Πληρωμή μέσω ACH',
markAsPaid: 'Σήμανση ως πληρωμένο',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index edc1c1ac..ad5ac17e 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -21,13 +21,7 @@ import type {CompanyCardBalanceParams} from './params';
import type {AllConnectionName, PolicyConnectionSyncStage} from './TranslationTypes';
import type {TranslationDeepObject} from './types';
const translations: TranslationDeepObject<typeof en> = {
- billPay: {
- bill: 'Factura por pagar',
- bills: 'Facturas por pagar',
- payByACH: 'Pagar por ACH',
- markAsPaid: 'Marcar como pagada',
- paymentFailed: 'No pudimos pagar esta factura. Inténtalo de nuevo.',
- },
+ billPay: {bill: 'Factura', bills: 'Facturas', payByACH: 'Pagar por ACH', markAsPaid: 'Marcar como pagada', paymentFailed: 'No pudimos pagar esta factura. Inténtalo de nuevo.'},
common: {
durationDays: ({count}: {count: number}) => ({
one: `1 día`,
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index fcbc08b5..3d4a7f40 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -36,8 +36,8 @@ type States = Record<keyof typeof COMMON_CONST.STATES, StateValue>;
type AllCountries = Record<Country, string>;
const translations: TranslationDeepObject<typeof en> = {
billPay: {
- bill: 'Facture à payer',
- bills: 'Factures à payer',
+ bill: 'Facture',
+ bills: 'Factures',
payByACH: 'Payer par ACH',
markAsPaid: 'Marquer comme payée',
paymentFailed: 'Nous n’avons pas pu payer cette facture. Veuillez réessayer.',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index e0639648..69e0bf63 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -35,13 +35,7 @@ type StateValue = {
type States = Record<keyof typeof COMMON_CONST.STATES, StateValue>;
type AllCountries = Record<Country, string>;
const translations: TranslationDeepObject<typeof en> = {
- billPay: {
- bill: 'Fattura da pagare',
- bills: 'Fatture da pagare',
- payByACH: 'Paga tramite ACH',
- markAsPaid: 'Segna come pagata',
- paymentFailed: 'Non è stato possibile pagare questa fattura. Riprova.',
- },
+ billPay: {bill: 'Fattura', bills: 'Fatture', payByACH: 'Paga tramite ACH', markAsPaid: 'Segna come pagata', paymentFailed: 'Non è stato possibile pagare questa fattura. Riprova.'},
common: {
durationDays: ({count}: {count: number}) => ({
one: `1 giorno`,
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index ad0ee7e8..4d4527b5 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -35,13 +35,7 @@ type StateValue = {
type States = Record<keyof typeof COMMON_CONST.STATES, StateValue>;
type AllCountries = Record<Country, string>;
const translations: TranslationDeepObject<typeof en> = {
- billPay: {
- bill: '支払請求書',
- bills: '支払請求書',
- payByACH: 'ACHで支払う',
- markAsPaid: '支払済みにする',
- paymentFailed: 'この請求書を支払えませんでした。もう一度お試しください。',
- },
+ billPay: {bill: '請求書', bills: '請求書', payByACH: 'ACHで支払う', markAsPaid: '支払済みにする', paymentFailed: 'この請求書を支払えませんでした。もう一度お試しください。'},
common: {
durationDays: ({count}: {count: number}) => ({
one: `1 日`,
@@ -7462,7 +7456,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 1cf1bace..6414aef8 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -36,8 +36,8 @@ type States = Record<keyof typeof COMMON_CONST.STATES, StateValue>;
type AllCountries = Record<Country, string>;
const translations: TranslationDeepObject<typeof en> = {
billPay: {
- bill: 'Te betalen factuur',
- bills: 'Te betalen facturen',
+ bill: 'Factuur',
+ bills: 'Facturen',
payByACH: 'Betalen via ACH',
markAsPaid: 'Markeren als betaald',
paymentFailed: 'We konden deze factuur niet betalen. Probeer het opnieuw.',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index a12b8ceb..328521a4 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -35,13 +35,7 @@ type StateValue = {
type States = Record<keyof typeof COMMON_CONST.STATES, StateValue>;
type AllCountries = Record<Country, string>;
const translations: TranslationDeepObject<typeof en> = {
- billPay: {
- bill: 'Rachunek',
- bills: 'Rachunki',
- payByACH: 'Zapłać przez ACH',
- markAsPaid: 'Oznacz jako opłacone',
- paymentFailed: 'Nie udało się opłacić tego rachunku. Spróbuj ponownie.',
- },
+ billPay: {bill: 'Rachunek', bills: 'Rachunki', payByACH: 'Zapłać przez ACH', markAsPaid: 'Oznacz jako opłacone', paymentFailed: 'Nie udało się opłacić tego rachunku. Spróbuj ponownie.'},
common: {
durationDays: ({count}: {count: number}) => ({
one: `1 dzień`,
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 76ef5da5..2b3e5a15 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -35,13 +35,7 @@ type StateValue = {
type States = Record<keyof typeof COMMON_CONST.STATES, StateValue>;
type AllCountries = Record<Country, string>;
const translations: TranslationDeepObject<typeof en> = {
- billPay: {
- bill: 'Conta a pagar',
- bills: 'Contas a pagar',
- payByACH: 'Pagar por ACH',
- markAsPaid: 'Marcar como paga',
- paymentFailed: 'Não foi possível pagar esta conta. Tente novamente.',
- },
+ billPay: {bill: 'Fatura', bills: 'Contas', payByACH: 'Pagar por ACH', markAsPaid: 'Marcar como paga', paymentFailed: 'Não foi possível pagar esta conta. Tente novamente.'},
common: {
durationDays: ({count}: {count: number}) => ({
one: `${count} dia`,
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index f4426903..4d336d74 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -35,13 +35,7 @@ type StateValue = {
type States = Record<keyof typeof COMMON_CONST.STATES, StateValue>;
type AllCountries = Record<Country, string>;
const translations: TranslationDeepObject<typeof en> = {
- billPay: {
- bill: '账单',
- bills: '账单',
- payByACH: '通过 ACH 支付',
- markAsPaid: '标记为已支付',
- paymentFailed: '无法支付此账单。请重试。',
- },
+ billPay: {bill: '账单', bills: '账单', payByACH: '通过 ACH 支付', markAsPaid: '标记为已支付', paymentFailed: '无法支付此账单。请重试。'},
common: {
durationDays: ({count}: {count: number}) => ({
one: `1 天`,
@@ -7289,7 +7283,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.SEARCH.STATUS.EXPENSE.PAID]: (expenseReport) => | ||
| (expenseReport?.stateNum ?? 0) >= CONST.REPORT.STATE_NUM.APPROVED && expenseReport?.statusNum === CONST.REPORT.STATUS_NUM.REIMBURSED, | ||
| [CONST.SEARCH.STATUS.EXPENSE.DONE]: (expenseReport) => expenseReport?.stateNum === CONST.REPORT.STATE_NUM.APPROVED && expenseReport.statusNum === CONST.REPORT.STATUS_NUM.CLOSED, | ||
| [CONST.SEARCH.STATUS.EXPENSE.DONE]: (expenseReport) => |
There was a problem hiding this comment.
❌ CONSISTENCY-18 (docs)
The DONE predicate now also matches reports in STATE_NUM.SUBMITTED (not only APPROVED) when the status is CLOSED. Why a submitted report should count as "done" is not recoverable from the code. The PR's test hints at the reason ("a bill that closed after its payment was canceled"), but that context lives only in the test, not next to the branch future contributors will read.
Add a short comment explaining the scenario, e.g.:
// A bill that is closed after its payment is canceled stays in SUBMITTED state, so DONE must accept
// both SUBMITTED and APPROVED when the report is CLOSED.
[CONST.SEARCH.STATUS.EXPENSE.DONE]: (expenseReport) =>
(expenseReport?.stateNum === CONST.REPORT.STATE_NUM.SUBMITTED || expenseReport?.stateNum === CONST.REPORT.STATE_NUM.APPROVED) &&
expenseReport?.statusNum === CONST.REPORT.STATUS_NUM.CLOSED,Reviewed at: 5334cb7 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
| [CONST.SEARCH.STATUS.EXPENSE.PAID]: (expenseReport) => | ||
| (expenseReport?.stateNum ?? 0) >= CONST.REPORT.STATE_NUM.APPROVED && expenseReport?.statusNum === CONST.REPORT.STATUS_NUM.REIMBURSED, | ||
| [CONST.SEARCH.STATUS.EXPENSE.DONE]: (expenseReport) => expenseReport?.stateNum === CONST.REPORT.STATE_NUM.APPROVED && expenseReport?.statusNum === CONST.REPORT.STATUS_NUM.CLOSED, | ||
| [CONST.SEARCH.STATUS.EXPENSE.DONE]: (expenseReport) => |
There was a problem hiding this comment.
❌ CONSISTENCY-18 (docs)
Same non-obvious change as in SearchSuggestionUtils.ts: the DONE filter predicate now accepts STATE_NUM.SUBMITTED in addition to APPROVED when the status is CLOSED, with no comment explaining why a submitted report can be considered done.
Add a comment describing the case (a bill closed after its payment was canceled remains in SUBMITTED state), so the expanded condition is understandable at the call site:
// A bill closed after a canceled payment stays SUBMITTED, so DONE accepts SUBMITTED or APPROVED when CLOSED.
[CONST.SEARCH.STATUS.EXPENSE.DONE]: (expenseReport) =>
(expenseReport?.stateNum === CONST.REPORT.STATE_NUM.SUBMITTED || expenseReport?.stateNum === CONST.REPORT.STATE_NUM.APPROVED) &&
expenseReport?.statusNum === CONST.REPORT.STATUS_NUM.CLOSED,Reviewed at: 5334cb7 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
| const firstApproved = firstApprovedAction?.created ?? ''; | ||
| const formattedFrom = temporaryGetDisplayNameOrDefault({passedPersonalDetails: fromDetails, translate, formatPhoneNumber}); | ||
| const formattedTo = !shouldShowBlankTo ? temporaryGetDisplayNameOrDefault({passedPersonalDetails: toDetails, translate, formatPhoneNumber}) : ''; | ||
| const formattedFrom = |
There was a problem hiding this comment.
❌ CONSISTENCY-18 (docs)
For the BILL type, formattedFrom and formattedTo deliberately return the raw login (an email) instead of running the data through temporaryGetDisplayNameOrDefault like every other report type. This is a non-obvious divergence — a future contributor can't tell from the code why bills show emails rather than display names, and may "fix" it by removing the special case.
Add a comment explaining the intent, e.g.:
// Bills show the vendor/approver email (login) rather than a display name, so the receiver can identify the
// external parties even when no personal details are loaded for them.
const formattedFrom =
currentQueryJSON?.type === CONST.SEARCH.DATA_TYPES.BILL
? (fromDetails?.login ?? '')
: temporaryGetDisplayNameOrDefault({passedPersonalDetails: fromDetails, translate, formatPhoneNumber});Reviewed at: 5334cb7 | 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: 5334cb7d4e
ℹ️ 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".
| const [nonPersonalAndWorkspaceCards] = useOnyx(ONYXKEYS.DERIVED.NON_PERSONAL_AND_WORKSPACE_CARD_LIST); | ||
|
|
||
| const isExpenseReportType = type === CONST.SEARCH.DATA_TYPES.EXPENSE_REPORT; | ||
| const isExpenseReportType = type === CONST.SEARCH.DATA_TYPES.EXPENSE_REPORT || type === CONST.SEARCH.DATA_TYPES.BILL; |
There was a problem hiding this comment.
Treat bills as report searches in bulk actions
When a user selects all matching bills and then deselects one or more rows, this classification enables report-style exclusions, but useSearchBulkActions still defines isExpenseReportType as only expense-report. Its all-matching pay path therefore skips getAllMatchingReportQuery() and sends the original query to queueBulkPayReports, causing explicitly excluded bills to be paid. Include BILL in the bulk-actions report-type predicate before enabling report-style selection here.
Useful? React with 👍 / 👎.
| const fromAccountID = reportItem.billSenderAccountID ?? reportItem.ownerAccountID; | ||
| const fromDetails = | ||
| mergedPersonalDetails?.[reportItem.ownerAccountID ?? CONST.DEFAULT_NUMBER_ID] ?? | ||
| getPersonalDetailsForAccountID(reportItem.ownerAccountID ?? CONST.DEFAULT_NUMBER_ID) ?? | ||
| emptyPersonalDetails; | ||
| mergedPersonalDetails?.[fromAccountID ?? CONST.DEFAULT_NUMBER_ID] ?? getPersonalDetailsForAccountID(fromAccountID ?? CONST.DEFAULT_NUMBER_ID) ?? emptyPersonalDetails; |
There was a problem hiding this comment.
Preserve the vendor identity after attaching bill transactions
When a bill contains a transaction, this initially assigns the vendor from billSenderAccountID, but the transaction branch later unconditionally replaces reportSection.from with the report owner's personal details. The wide From cell consequently renders the vendor email from formattedFrom alongside the receiver's avatar and account ID, so avatar interactions identify the wrong person. Keep the bill sender in reportSection.from when transactions are appended.
Useful? React with 👍 / 👎.
# Conflicts: # src/languages/de.ts # src/languages/el.ts # src/languages/en.ts # src/languages/es.ts # src/languages/fr.ts # src/languages/it.ts # src/languages/ja.ts # src/languages/nl.ts # src/languages/pl.ts # src/languages/pt-BR.ts # src/languages/zh-hans.ts # tests/unit/BillPayTest.ts
# Conflicts: # tests/unit/BillPayTest.ts
Explanation of Change
This PR adds
type:billsearches, so users can find, approve and pay bills from a search table. It adds no navigation entry. The Create bill PR adds Spend > Bills, because Bills shouldn't ship without a way to create a bill. Until then, users reach these searches only by URL, for example/search?q=type:bill.payBill, before the chat report lookup that bills don't need. ACH pays only USD bills, like the Pay button.Fixed Issues
For https://github.com/Expensify/Expensify/issues/684654
PROPOSAL:
Tests
/search?q=type:bill.Offline tests
/search?q=type:billand go offline.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