Surface Expensify Card monthly settlement date on card settings page - #98164
Surface Expensify Card monthly settlement date on card settings page#98164MelvinBot wants to merge 7 commits into
Conversation
Co-authored-by: Brandon Stites <stitesExpensify@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
🤖 I re-ran through all checks — there's no code-related failure to fix. Every substantive check now passes (typecheck, all 8 The only two red checks are non-code process gates:
Both clear once the human author completes the checklist and the PR gets a review — no push from me is warranted here. |
|
🤖 Re-checked — status is unchanged and there's still no code failure to push a fix for. Every substantive check passes (typecheck, all 8 The only two red checks are non-code process gates that I can't/shouldn't resolve with a commit:
Both clear once the author completes the checklist and the PR is reviewed. |
|
@stitesExpensify Could you please assign me as a co-author instead of a reviewer? Thanks |
| settlementFrequency: 'Settlement frequency', | ||
| settlementFrequencyDescription: 'Choose how often you’ll pay your Expensify Card balance.', | ||
| settlementFrequencyInfo: 'If you’d like to switch to monthly settlement, you’ll need to connect your bank account via Plaid and have a positive 90-day balance history.', | ||
| monthlySettlementDate: (date: string) => `Settles on the ${date} of each month.`, |
There was a problem hiding this comment.
The text should be Expensify cards will settle on the ${date} of each month.
There was a problem hiding this comment.
Done — updated the copy to Expensify cards will settle on the ${date} of each month. in src/languages/en.ts:6072, and kept the other 10 locale files in sync with the new phrasing. Pushed as 488fd3a.
npm run fmt, lint, and typecheck pass (the only typecheck error is a pre-existing, unrelated failure in useDiscardChangesConfirmationNative.test.ts).
|
There's nothing to fix in code here — every automated check that runs actual code (tests, typecheck, ESLint, Oxfmt, build, The only failing/pending checks are human-completion gates, which I can't (and shouldn't) satisfy by pushing code:
Next step: the human co-author should fill in the Tests/QA sections, complete the PR Author Checklist boxes, and then get a review. No commit from me is needed. |
|
@linhvovan29546 added you |
|
I looked into the failing checks. All three are human-completion checks, not code or test failures — there's no code fix I can push for these:
Every code/test check is passing (Bun tests, To get these green: complete the PR Author Checklist items in the description, have a reviewer fill out the reviewer checklist, and get the required independent approval. Note the |
…n the...' Co-authored-by: Linh Vo <linhvovan29546@users.noreply.github.com>
|
The only remaining failing check is PR Author Checklist ( To clear it: complete the PR Author Checklist items in the description, and fill in the |
🦜 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 1fc3b832..3495364b 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -5980,7 +5980,7 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU
settlementFrequencyDescription: 'Wählen Sie, wie oft Sie den Saldo Ihrer Expensify Karte begleichen.',
settlementFrequencyInfo:
'Wenn du zur monatlichen Abrechnung wechseln möchtest, musst du dein Bankkonto über Plaid verbinden und eine positive Kontohistorie der letzten 90 Tage haben.',
- monthlySettlementDate: (date) => `Expensify Cards werden am ${date} jedes Monats abgerechnet.`,
+ monthlySettlementDate: (date: string) => `Expensify Karten werden am ${date} jedes Monats abgerechnet.`,
applyCashbackToBill: 'Cashback auf meine Expensify-Rechnung anwenden',
applyCashbackToBillDescription: 'Das Cashback von der Expensify-Karte wird zur Begleichung deiner Expensify-Rechnung verwendet.',
frequency: {
diff --git a/src/languages/el.ts b/src/languages/el.ts
index 5fe64887..0b5e27ee 100644
--- a/src/languages/el.ts
+++ b/src/languages/el.ts
@@ -320,7 +320,6 @@ const translations: TranslationDeepObject<typeof en> = {
automatic: 'Αυτόματο',
showing: 'Εμφανίζονται',
of: 'του',
- // @context Carousel pagination counter showing the current item's position out of the total (e.g. "3 of 50").
currentOfTotal: ({current, total}: {current: number; total: number}) => `${current} από ${total}`,
default: 'Προεπιλογή',
update: 'Ενημέρωση',
@@ -6102,7 +6101,7 @@ _Για πιο αναλυτικές οδηγίες, [επισκεφθείτε τ
settlementFrequencyDescription: 'Επιλέξτε πόσο συχνά θα εξοφλείτε το υπόλοιπο της Κάρτας Expensify.',
settlementFrequencyInfo:
'Αν θέλετε να μεταβείτε σε μηνιαίο διακανονισμό, θα πρέπει να συνδέσετε τον τραπεζικό σας λογαριασμό μέσω Plaid και να έχετε θετικό ιστορικό υπολοίπου 90 ημερών.',
- monthlySettlementDate: (date) => `Οι κάρτες Expensify διακανονίζονται στις ${date} κάθε μήνα.`,
+ monthlySettlementDate: (date: string) => `Οι Κάρτες Expensify θα εκκαθαρίζονται στις ${date} κάθε μήνα.`,
applyCashbackToBill: 'Εφαρμογή επιστροφής μετρητών στον λογαριασμό μου στο Expensify',
applyCashbackToBillDescription: 'Η επιστροφή μετρητών από την Κάρτα Expensify θα χρησιμοποιηθεί για την πληρωμή του λογαριασμού σας στην Expensify.',
frequency: {
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 42590305..33ea43b7 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -5857,7 +5857,7 @@ ${amount} para ${merchant} - ${date}`,
settlementFrequencyDescription: 'Elige con qué frecuencia pagarás el saldo de tu Tarjeta Expensify',
settlementFrequencyInfo:
'Si deseas cambiar a la liquidación mensual, deberás conectar tu cuenta bancaria a través de Plaid y tener un historial de saldo positivo en los últimos 90 días.',
- monthlySettlementDate: (date) => `Las tarjetas Expensify se liquidan el ${date} de cada mes.`,
+ monthlySettlementDate: (date: string) => `Las Tarjetas Expensify se liquidarán el ${date} de cada mes.`,
applyCashbackToBill: 'Aplicar reembolso a mi factura de Expensify',
applyCashbackToBillDescription: 'El reembolso de la Tarjeta Expensify se utilizará para el pago de tu factura de Expensify.',
frequency: {
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index dafe5988..1988026c 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -5993,7 +5993,7 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST.
settlementFrequencyDescription: 'Choisissez la fréquence à laquelle vous réglerez le solde de votre Carte Expensify.',
settlementFrequencyInfo:
'Si vous souhaitez passer à un règlement mensuel, vous devrez connecter votre compte bancaire via Plaid et disposer d’un historique de solde positif sur 90 jours.',
- monthlySettlementDate: (date) => `Les cartes Expensify seront réglées le ${date} de chaque mois.`,
+ monthlySettlementDate: (date: string) => `Les règlements des Cartes Expensify auront lieu le ${date} de chaque mois.`,
applyCashbackToBill: 'Appliquer le cashback à ma facture Expensify',
applyCashbackToBillDescription: 'Le cashback de la carte Expensify sera utilisé pour le paiement de votre facture Expensify.',
frequency: {
diff --git a/src/languages/it.ts b/src/languages/it.ts
index e1852189..1de7ca6b 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -5946,7 +5946,7 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST.
settlementFrequencyDescription: 'Scegli con quale frequenza pagherai il saldo della tua Carta Expensify.',
settlementFrequencyInfo:
'Se desideri passare alla liquidazione mensile, dovrai collegare il tuo conto bancario tramite Plaid e avere uno storico del saldo positivo di 90 giorni.',
- monthlySettlementDate: (date) => `Le carte Expensify vengono liquidate il ${date} di ogni mese.`,
+ monthlySettlementDate: (date: string) => `Le Carte Expensify verranno saldate il ${date} di ogni mese.`,
applyCashbackToBill: 'Applica il cashback alla mia fattura Expensify',
applyCashbackToBillDescription: 'Il cashback della Carta Expensify verrà utilizzato per il pagamento della tua fattura Expensify.',
frequency: {
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index e62f64ba..bb4d3779 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -5883,7 +5883,7 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO
settlementFrequency: '清算頻度',
settlementFrequencyDescription: 'Expensify カードの残高を支払う頻度を選択してください。',
settlementFrequencyInfo: '月次清算に切り替えるには、Plaid を通じて銀行口座を連携し、直近90日間の残高履歴がプラスである必要があります。',
- monthlySettlementDate: (date) => `Expensifyカードは毎月${date}に清算されます。`,
+ monthlySettlementDate: (date: string) => `Expensify カードの精算は毎月${date}に行われます。`,
applyCashbackToBill: 'キャッシュバックを Expensify 請求書に適用する',
applyCashbackToBillDescription: 'Expensify カードのキャッシュバックは、Expensify 請求書の支払いに使用されます。',
frequency: {
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index c2002ec2..6efc52aa 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -5940,7 +5940,7 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_
settlementFrequency: 'Uitbetalingsfrequentie',
settlementFrequencyDescription: 'Kies hoe vaak je het saldo van je Expensify Kaart betaalt.',
settlementFrequencyInfo: 'Als je wilt overschakelen naar maandelijkse afrekening, moet je je bankrekening koppelen via Plaid en een positieve saldohistorie van 90 dagen hebben.',
- monthlySettlementDate: (date) => `Expensify-kaarten worden op de ${date} van elke maand afgerekend.`,
+ monthlySettlementDate: (date: string) => `Expensify kaarten worden op de ${date} van elke maand vereffend.`,
applyCashbackToBill: 'Cashback toepassen op mijn Expensify-factuur',
applyCashbackToBillDescription: 'De cashback van de Expensify Kaart wordt gebruikt voor het betalen van je Expensify-factuur.',
frequency: {
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 3385c977..52fdfd8b 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -5918,7 +5918,7 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy
settlementFrequency: 'Częstotliwość rozliczeń',
settlementFrequencyDescription: 'Wybierz, jak często będziesz spłacać saldo swojej Karty Expensify.',
settlementFrequencyInfo: 'Jeśli chcesz przejść na miesięczne rozliczenie, musisz podłączyć swoje konto bankowe przez Plaid i mieć dodatnią historię salda z ostatnich 90 dni.',
- monthlySettlementDate: (date) => `Karty Expensify są rozliczane ${date} każdego miesiąca.`,
+ monthlySettlementDate: (date: string) => `Karty Expensify będą rozliczane ${date} dnia każdego miesiąca.`,
applyCashbackToBill: 'Zastosuj zwrot gotówki do mojego rachunku Expensify',
applyCashbackToBillDescription: 'Zwrot gotówki z Karty Expensify zostanie wykorzystany do opłacenia Twojego rachunku Expensify.',
frequency: {
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index bd70f358..5b7b0474 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -5936,7 +5936,7 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS
settlementFrequency: 'Frequência de liquidação',
settlementFrequencyDescription: 'Escolha com que frequência você vai pagar o saldo do seu Cartão Expensify.',
settlementFrequencyInfo: 'Se quiser mudar para liquidação mensal, você precisará conectar sua conta bancária via Plaid e ter um histórico de saldo positivo de 90 dias.',
- monthlySettlementDate: (date) => `Os cartões Expensify serão liquidados no dia ${date} de cada mês.`,
+ monthlySettlementDate: (date: string) => `Os Cartões Expensify serão liquidados no dia ${date} de cada mês.`,
applyCashbackToBill: 'Aplicar reembolso à minha fatura do Expensify',
applyCashbackToBillDescription: 'O reembolso do Cartão Expensify será usado para o pagamento da sua fatura do Expensify.',
frequency: {
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index d79d7e52..e6d0950c 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -5752,7 +5752,7 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
settlementFrequency: '结算频率',
settlementFrequencyDescription: '选择支付 Expensify 卡余额的频率。',
settlementFrequencyInfo: '如果你想切换为按月结算,你需要通过 Plaid 连接你的银行账户,并且拥有过去 90 天为正数的余额记录。',
- monthlySettlementDate: (date) => `Expensify 卡每月 ${date} 结算。`,
+ monthlySettlementDate: (date: string) => `Expensify 卡将在每月的 ${date} 结算。`,
applyCashbackToBill: '将返现用于抵扣我的 Expensify 账单',
applyCashbackToBillDescription: 'Expensify 卡的返现将用于支付你的 Expensify 账单。',
frequency: {
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
|
Same situation as my previous comment — the only failing checks are human-completion checks, not code/test failures, so there's no code fix I can push:
Every code/test check (Bun tests, |
|
@MelvinBot Please update this translation: #98164 (comment). |
Co-authored-by: Linh Vo <linhvovan29546@users.noreply.github.com>
|
Done — applied the Polyglot Parrot translation suggestions for I skipped the parrot's unrelated |
|
Re-checked — the situation is unchanged. The only failing checks are human-completion gates, not code or test failures, so there's no code fix for me to push:
Every code/test check is green (Bun tests, To turn these green: the author needs to complete the PR Author Checklist (and fill in the |
…tlementDate Co-authored-by: Brandon Stites <stitesExpensify@users.noreply.github.com>
…ent date Co-authored-by: Brandon Stites <stitesExpensify@users.noreply.github.com>
|
Fixed the failing ESLint check. Root cause: The new Fix: Pull const {translate, dateFnsLocale} = useLocalize();
...
format(new Date(settings.monthlySettlementDate), CONST.DATE.ORDINAL_DAY_OF_MONTH, {locale: dateFnsLocale})The The remaining failing checks — |
|
MelvinBot has made 5 consecutive commits trying to fix CI failures. Automatic CI fix dispatches are now paused for this PR. Next steps: A human should review the recent commits and resolve the conflicting CI errors manually. |
|
@linhvovan29546 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] |
Reviewer Checklist
Screenshots/Videos |
|
@MelvinBot Please write a UI test for this. |
Co-authored-by: Linh Vo <linhvovan29546@users.noreply.github.com>
|
@stitesExpensify 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] |
|
Added a UI test covering the new settlement-frequency hint: It renders
Both tests pass locally ( Test setup notes
|
|
@MelvinBot Please address this actions https://github.com/Expensify/App/actions/runs/31662267153/job/94329330678?pr=98164 |
Co-authored-by: Linh Vo <linhvovan29546@users.noreply.github.com>
|
Fixed the failing Oxfmt check. Oxfmt wanted a blank line between the two |
|
@MelvinBot Please update the PR's description and test steps to match the changes in this PR. Also, please add the QA steps test. |
|
Updated the PR description, Tests, Offline tests, and QA Steps to match the current changes. Key updates:
I also removed a duplicated checklist block and the stray A couple of things left for the human co-author:
|
|
@MelvinBot I've tested all the test steps myself, and they all pass. Let's check all the boxes in your checklist to fix the PR Author Checklist CI failure. |
|
Thanks for testing! I'd rather not check the PR Author Checklist boxes for you here — that checklist is the human author's attestation (it's exactly what the Beyond the process point, several boxes aren't actually satisfiable yet, so checking them would be a false attestation:
The Two cleanup notes on the body while you're in there:
(For the record: the other red checks — |
Details
@MelvinBot please set the PR Author checklist to the content in the details section above |
|
Done — updated the PR Author Checklist in the PR description to the full checklist you provided, with every item checked off. I also cleaned up a leftover duplicated checklist fragment and the stray One heads-up: the Screenshots/Videos section still needs real captures on a provisioned Expensify Card workspace before this is ready for review — the automated run couldn't reach the Monthly hint because the test account has no Expensify Card workspace. |
Details
@MelvinBot please set the PR Author checklist to the content in the details section above |
|
Done — the PR Author Checklist is now fully checked ✅. While applying it I also cleaned up two artifacts that had reappeared at the bottom of the body: a duplicated (unchecked) checklist block and a stray Note: the two |
linhvovan29546
left a comment
There was a problem hiding this comment.
NAB: The author's PR checklist is failing, which I can't fix since it looks like the GitHub Action automatically added the checklist.
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Good for product 👍





Explanation of Change
Implements the alternative solution approved on the issue: surface the Expensify Card's current monthly settlement date as supporting text under the Settlement frequency row of the workspace's Expensify Card Settings page (not on the settlement frequency selector screen). This brings NewDot to parity with OldDot, which shows admins when their monthly settlement occurs.
When a card's settlement frequency is Monthly and
monthlySettlementDateis present, the Settlement frequency row now renders hint text readingExpensify cards will settle on the 27th of each month.(day-of-month derived from the existingExpensifyCardSettings.monthlySettlementDateOnyx value). The recurring day-of-month is formatted withdate-fnsformatusingCONST.DATE.ORDINAL_DAY_OF_MONTH('do'→ e.g.27th) and the activedateFnsLocale, matching the existing date formatting on the neighboringWorkspaceCardsListLabel. The change reuses theMenuItemWithTopDescriptionhint slot that already renders the "blocked" message for the Daily case (the new text is rendered in theelsebranch of that ternary), so no new component is introduced. Displaying the date only (not letting admins change it) is intentionally in scope per the issue.A new
workspace.expensifyCard.monthlySettlementDatetranslation function key was added toen.tsand all other locale files (de,el,es,fr,it,ja,nl,pl,pt-BR,zh-hans). A UI test (tests/ui/WorkspaceCardSettingsPageTest.tsx) was added covering the Monthly (hint shown) and Daily (hint hidden) cases.Fixed Issues
$ #97578
PROPOSAL: #97578 (comment)
Tests
ExpensifyCardSettings.monthlySettlementDateis set).Expensify cards will settle on the <day> of each month.(e.g.Expensify cards will settle on the 27th of each month.), where<day>is the ordinal day of the month frommonthlySettlementDate.Offline tests
Expensify cards will settle on the <day> of each month.hint text still renders from cached Onyx data.QA Steps
Expensify cards will settle on the <day> of each month.(e.g.Expensify cards will settle on the 27th of each month.).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
Screenshots/Videosundefined