[Home Page] Add Remaining limit slot for the Expensify Card#82772
Conversation
|
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 |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 041442ffd8
ℹ️ 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 hasLimitData = !!card.availableSpend && !!unapprovedExpenseLimit; | ||
| const spentFraction = hasLimitData ? 1 - (card.availableSpend ?? 0) / (unapprovedExpenseLimit ?? 1) : 0; |
There was a problem hiding this comment.
Treat zero available spend as valid limit data
The limit-visibility check uses truthiness (!!card.availableSpend), so a card at exactly 0 remaining spend is treated as if limit data is missing; in that case the circular indicator is hidden and spentFraction is forced to 0 even though the card has a configured limit. This breaks the widget for fully-spent cards, which are the most important case to visualize.
Useful? React with 👍 / 👎.
| > | ||
| {displayableCards.map((card) => { | ||
| const cardTitle = card.nameValuePairs?.cardTitle ?? getCardDescription(card, translate); | ||
| const description = card.lastFourPAN ? `${cardTitle} ${card.lastFourPAN}` : cardTitle; |
There was a problem hiding this comment.
Avoid duplicating last-four digits in card description
When nameValuePairs.cardTitle is absent, cardTitle falls back to getCardDescription(card, translate), which already includes the PAN suffix for non-personal/non-Plaid cards (e.g., "Bank - 1234"), and then this line appends card.lastFourPAN again. Users in that data shape will see duplicated digits in the subtitle (e.g., "Bank - 1234 1234").
Useful? React with 👍 / 👎.
041442f to
8bae2bf
Compare
This comment has been minimized.
This comment has been minimized.
🦜 Polyglot Parrot! 🦜Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues: The diff is too large to include in this comment (77KB), so I've created a gist for you: 📋 View the translation diff here 📋 Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
6868dfe to
43d9fc4
Compare
|
@ZhenjaHorbach 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] |
43d9fc4 to
76aa0cd
Compare
|
🚧 @grgia has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
@WojtekBoman got it working for a limit card |
|
|
||
| const unapprovedExpenseLimit = card.nameValuePairs?.unapprovedExpenseLimit; | ||
| const hasLimitData = !!unapprovedExpenseLimit; | ||
| const spentFraction = hasLimitData ? 1 - (card.availableSpend ?? 0) / unapprovedExpenseLimit : 0; |
There was a problem hiding this comment.
@WojtekBoman gonna DM about this one the data that wasnt working for my limit card
There was a problem hiding this comment.
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Good for product. Excited for this!
|
Wowee! Can we run a test build for easier testing? |
6b0f732 to
c0d662a
Compare
Yeah, but currently we're removing the interaction manager (it would be useful here) and with these 2 navigation actions users on native platforms we'll see 2 transitions between screens |
|
LGTM! |
ce8235b to
1984624
Compare
|
🚧 @grgia has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
grgia
left a comment
There was a problem hiding this comment.
Nice work on this! This is a rad feature @WojtekBoman
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.3.24-1 🚀
|
|
@WojtekBoman @grgia @ZhenjaHorbach We are blocked from using expensify cards and can't test |
|
This PR failing because of the issue |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.3.24-3 🚀
|






Explanation of Change
This PR introduces a new widget on the home page that displays the user's assigned cards. Each card shows its title, last four digits, formatted remaining spend with currency, and a circular SVG progress indicator visualizing how much of the card limit has been used.
Fixed Issues
$ #81526
PROPOSAL:
Tests
Prerequisites
Visibility
Card content
Remaining limit circle
Hover behavior
Navigation
Responsive layout
Card types
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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-02-18.at.13.49.04.mov