[Due for payment 2026-11-23] [CFI] [$250] Add “Last synced” column to workspace Company cards
Admins currently open each card’s details to see its last update. Show this timestamp directly in the Company cards list.
- Use the existing
lastScrapevalue. - Clarify that it means the last successful sync.
- Handle missing timestamps and unassigned cards.
- Keep compact layouts readable.
Reported by @garrettmknight via DM with MelvinBot
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022118055643648118256
- Upwork Job ID: 2118055643648118256
- Last Price Increase: 2026-11-08
Issue Owner
Current Issue Owner: @samarroy84
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mkhutornyi (External)
Job added to Upwork: https://www.upwork.com/jobs/~022118055643648118256
Proposal
What is the root cause of that problem?
This is a new feature. The card's lastScrape timestamp is already in Onyx, but it is only read in DynamicWorkspaceCompanyCardDetailsPage (the "Last updated" row) and in the CSV export in WorkspaceCompanyCardsTableControls. WorkspaceCompanyCardsTable/index.tsx never adds a column for it (CompanyCardsTableColumnKey is member | card | customCardName | exportAccount | actions), and WorkspaceCompanyCardsTableRow has no cell for it.
What changes do you think we should make in order to solve the problem?
- One shared formatter. Add a small helper in
CardUtils(e.g.getCompanyCardLastSyncedText(card, translate)) that returns:updating("Updating...") whilecard.isLoadingLastUpdatedis true, so the cell matches the details page after "Update card";- the formatted local time of
lastScrapewhen it exists; neverUpdated("Never") for an assigned card with nolastScrape. Reuse it on the details page and in the CSV export, which currently formatlastScrapeseparately.
- Column. Add a
lastSyncedkey toCompanyCardsTableColumnKeyand a column after "Card name" (before the optional "Export account" column) with a newworkspace.moreFeatures.companyCards.lastSynced: 'Last synced'label in all language files. It usesstyles.mnw0anddynamicSizingwithshouldFitContentlike thecardcolumn, so it stays narrow. - Row data and cell. In
cardsData, addlastSyncedText(from the helper, only for assigned cards) and the rawlastScrapefor sorting. InWorkspaceCompanyCardsTableRow, render aTextWithTooltipcell under the same!shouldUseNarrowTableLayoutguard as the other secondary columns, and add the value to the row'saccessibilityLabel.- Clarify meaning: show a compact date/time in the cell, and set the tooltip to the full timestamp with a short explanation, e.g. "Last successful sync: 2026-11-04 18:54". The details page row label can use the same wording so both places agree.
- Unassigned cards: leave the cell empty. There is no card object, so there is nothing to sync.
- Sorting. Make the column sortable. In
compareItems, comparelastScrapetimestamps, put cards with no timestamp last, and break ties by card name. This follows the existingexportAccountbranch. The existing assigned/unassigned grouping stays as it is. - Compact layouts. On narrow and medium widths (
shouldUseNarrowTableLayout), the column is hidden like Card, Card name and Export account. The value is still on the card's details page, so the narrow row stays at two lines.
Tests: unit tests for the helper (timestamp, missing timestamp, updating state) and for sorting by lastSynced (missing timestamps last, ties by card name, unassigned cards stay grouped). Also a UI test that the column renders on wide layouts, is absent on narrow ones, and shows an empty cell for unassigned cards.
What alternative solutions did you explore? (Optional)
- Showing "Last synced" as a third subtitle line in the narrow layout. That makes every mobile row taller for a value most admins only need on desktop, so I'd keep it on the details page there.
- Relative times ("2 hours ago"). These are easier to scan, but they go stale while the page is open and are harder to compare with the CSV export. An absolute local time with the explanation in the tooltip is simpler.
📣 @bash-king! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
- Make sure you've read and understood the contributing guidelines.
- Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
- Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
- Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Proposal
What is the root cause of that problem?
The Company cards list never renders lastScrape, although assigned rows already receive it. This is missing presentation, not evidence of broken syncing.
What changes do you think we should make in order to solve the problem?
Add a Last synced column and matching row cell. For narrow and medium layouts, show a labeled line beneath existing card information.
Use these display rules:
- Explain that the timestamp means last successful sync.
- Reuse details’ timezone-aware formatting; guard missing or invalid values.
- Show “Never” for assigned cards without a timestamp and “—” for unassigned cards, whose sync history is unavailable.
- Retain the previous successful timestamp during pending or failed syncs. No new API is needed for assigned cards.
Evidence and validation — medium confidence
- WorkspaceCompanyCardsTable/index.tsx:210–279 and WorkspaceCompanyCardsTableRow.tsx:159–216 omit sync information in both layouts.
- useCompanyCards.ts:110–155 preserves assigned cards but supplies no timestamp for unassigned entries.
- DynamicWorkspaceCompanyCardDetailsPage.tsx:147–149 already handles absent timestamps. CardUtils.ts:1800–1827 identifies
lastScrapeas the last successful update, distinct from attempts.
Test assigned, unassigned, missing/invalid timestamps, timezone conversion, pending/failed syncs, and wide/medium/narrow layouts. Code inspection only; browser behavior and backend writers were not independently verified. Production logs are unnecessary to establish this presentation omission.
Next Steps for Contributor+ team:
To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/105949#issuecomment-6639518951) to create a draft PR.
To refine: @MelvinBot <your feedback>
To reject: Explain why you are rejecting Melvin's proposal.
@MelvinBot draft PR for testing
Proposal
Please re-state the problem that we are trying to solve in this issue
Add a "Last synced" column to the workspace Company Cards table to clearly display when the company card feed/transactions were last updated.
What is the root cause of that problem?
This is a feature request. Currently, WorkspaceCompanyCardsTable/index.tsx defines table columns (member, card, customCardName, exportAccount, actions) and constructs tableData from Onyx cardList and cardFeeds. In Onyx, company card feeds track scrape status via lastScrape (or lastSuccessfulScrape on the feed/card settings). Currently, there is no column exposing this sync timestamp to workspace admins.
What changes do you think we should make in order to solve the problem?
- Translations in
src/languages/en.ts: Add the new key underworkspace.companyCards:
lastSynced: 'Last synced',
- Data Mapping in
WorkspaceCompanyCardsTable/index.tsx: In the item mapping whereWorkspaceCompanyCardTableItemDatais constructed:
- Extract
lastScrapefromassignedCard?.lastScrape ?? cardFeed?.lastScrape. - Compute formatted display string:
const lastSyncedText = lastScrape ? DateUtils.formatToLocalTime(lastScrape) : '-';
- Map
lastSyncedTextandlastScrapeTimestampinto the row item data.
- Column Definition in
WorkspaceCompanyCardsTable/index.tsx: Add thelastSyncedcolumn tocolumns:
{
key: 'lastSynced',
label: translate('workspace.companyCards.lastSynced'),
sortable: true,
styling: {
containerStyles: [styles.mnw0],
},
dynamicSizing: {
getContentToMeasure: (item) => (item.lastSyncedText ? [{text: item.lastSyncedText, fontSize: fontScale.text}] : []),
shouldFitContent: true,
},
},
- Sort Comparator in
WorkspaceCompanyCardsTable.tsx: Handle null/undefined timestamps safely:
if (activeSorting.columnKey === 'lastSynced') {
const aTime = a.lastScrapeTimestamp ? new Date(a.lastScrapeTimestamp).getTime() : 0;
const bTime = b.lastScrapeTimestamp ? new Date(b.lastScrapeTimestamp).getTime() : 0;
if (aTime === bTime) {
return cardNameSortingResult;
}
return (aTime - bTime) * orderMultiplier;
}
- Row Rendering in
WorkspaceCompanyCardsTableRow.tsx:
- Wide table layout: Render the cell in line with existing columns:
{!shouldUseNarrowTableLayout && (
<View
style={[styles.flex1, styles.mnw0, styles.justifyContentCenter]}
{...getCellAccessibilityProps(isTableSemanticsEnabled)}
>
<TextWithTooltip
shouldShowTooltip
numberOfLines={1}
text={item.lastSyncedText ?? '-'}
style={[styles.lh16, styles.optionDisplayName, styles.pre]}
/>
</View>
)}
- Narrow layout:
In narrow mobile layouts where columns collapse into a card view, append
Last synced: {item.lastSyncedText}as secondary text undermemberCardSubtitle, keeping the experience fully responsive without overflowing mobile screen width.
Screenshots/Videos
Visual Mockup / Codebase Architecture Reference
-
Column architecture in table: https://github.com/Expensify/App/blob/main/src/components/Tables/WorkspaceCompanyCardsTable/index.tsx#L210-L280
-
Responsive cell layout in row: https://github.com/Expensify/App/blob/main/src/components/Tables/WorkspaceCompanyCardsTable/WorkspaceCompanyCardsTableRow.tsx#L190-L225
What alternative solutions did you consider?
Only showing the last synced timestamp in the settings sub-page, but displaying it directly in the table allows workspace admins to monitor sync health at a glance.
Contributor details Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~017a671f901fafe3a1
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
@MelvinBot draft PR for testing
@mkhutornyi @MelvinBot let's title the column Last updated to match Classic.
🤖 Web test steps verification results: ❌ fail
The provided web session remained blank, so all three browser checks are blocked, not demonstrated product failures.
| Step | Status |
|---|---|
Wide list: assigned-card sync timestamps and missing/unassigned placeholdersBlocked: Company cards was unreachable from the blank page.![]() ![]() |
❌ |
Narrow and medium layouts keep sync information readableNot verified; the app did not recover. |
❌ |
Card details open and timestamp agreesNot verified; no card list or details was reachable. |
❌ |
Draft PR created: Show last successful sync in Company cards, assigned to mkhutornyi. All 70 focused tests, typecheck, changed-file lint, explicit compiler checks, spelling, and Storybook passed. The full suite timed out; formatting and translation checks remain incomplete, with details in the PR. Please mark it as “Ready for review” when testing is complete.
view run · no recording available
Use Last updated, keeping the last-successful-sync explanation. Show last successful sync in Company cards is assigned to mkhutornyi; I haven’t changed it.
I can only make code changes when directed by the PR author, an assignee, or an existing co-author. To have me implement this, the PR assignee or author should reply with a request tagging me.
Problem: Workspace admins on the Company Cards table cannot see when a company card feed was last synced, so a stale or broken feed looks identical to a healthy one until expenses stop appearing.
Root cause: WorkspaceCompanyCardsTable/index.tsx builds its columns (member, card, customCardName, exportAccount, actions) and its row data from Onyx cardList and cardFeeds, but never surfaces the sync timestamp the feeds already track (lastScrape / lastSuccessfulScrape on the feed/card settings). The data exists in Onyx; only the column is missing.
Fix:
- In
WorkspaceCompanyCardsTable/index.tsx, when constructingWorkspaceCompanyCardTableItemData, extractlastScrapefromassignedCard?.lastScrape ?? cardFeed?.lastScrape, format it withDateUtils.formatToLocalTime(falling back to-when absent), and carry both the display string and the raw timestamp on the row item. - Add a
lastSyncedcolumn (label underworkspace.companyCards, e.g.lastSynced: 'Last synced'insrc/languages/en.ts), sortable, with dynamic sizing measured from the formatted text like the other columns. - In
WorkspaceCompanyCardsTable.tsx, handle sorting onlastSyncedby raw timestamp, treating missing timestamps as 0 so unsynced cards sort predictably instead of breaking the comparator. - In
WorkspaceCompanyCardsTableRow.tsx, render the cell in the wide table layout, and in the narrow layout appendLast synced: <text>as secondary text under the member/card subtitle so the information is not lost on mobile.
Verification: A feed with a recent lastScrape shows a formatted local time; a never-synced feed shows -; sorting ascending/descending orders by actual sync time with unsynced rows grouped at one end; narrow layout still shows the value. Add unit tests for the row-data mapping (card-level timestamp preferred over feed-level, missing timestamp renders -) and for the sort comparator.
Proposal
Please re-state the problem that we are trying to solve in this issue.
On the workspace Company Cards page (Workspaces > [Workspace] > Company cards), the cards table currently displays Member, Card, Card name, and Export to, but does not display when each card was last synced ("Last synced"), even though that value is shown inside the individual card details page and exported in the CSV download.
What is the root cause of that problem?
In src/components/Tables/WorkspaceCompanyCardsTable/index.tsx, CompanyCardsTableColumnKey only defines 'member' | 'card' | 'customCardName' | 'exportTo', and src/components/Tables/WorkspaceCompanyCardsTable/WorkspaceCompanyCardsTableRow.tsx only renders cells for those four columns. Meanwhile, the logic to format a card's lastScrape / isLoadingLastUpdated status is duplicated inline in src/pages/workspace/companyCards/DynamicWorkspaceCompanyCardDetailsPage.tsx (lines 112–123) and src/components/Tables/WorkspaceCompanyCardsTable/WorkspaceCompanyCardsTableControls.tsx (lines 58–60) rather than shared via a utility and table column.
What changes do you think we should make in order to solve the problem?
- In
src/libs/CardUtils.ts, add a shared helpergetCompanyCardLastSyncedText(card: Card | undefined, translate: LocaleContextProps['translate']): stringthat returns:translate('workspace.moreFeatures.companyCards.updating')whencard?.isLoadingLastUpdatedistrue,DateUtils.getFormattedTransportDate(DateUtils.getLocalDateFromDatetime(locale, card.lastScrape))whencard?.lastScrapeis present, ortranslate('workspace.moreFeatures.companyCards.neverUpdated')("Never") whencard?.lastScrapeis empty.
- In
src/languages/en.tsandsrc/languages/es.ts, add the column header translationworkspace.moreFeatures.companyCards.lastSynced("Last synced"/"Última sincronización"). - In
src/components/Tables/WorkspaceCompanyCardsTable/index.tsx:- Add
'lastSynced'toCompanyCardsTableColumnKeyright after'customCardName'. - Include
lastSynced: stringonWorkspaceCompanyCardTableItempopulated viagetCompanyCardLastSyncedText(card, translate)and support sorting bycard.lastScrape.
- Add
- In
src/components/Tables/WorkspaceCompanyCardsTable/WorkspaceCompanyCardsTableRow.tsx, render thelastSyncedcolumn cell betweencustomCardNameandexportTo(and reusegetCompanyCardLastSyncedTextinWorkspaceCompanyCardsTableControls.tsxandDynamicWorkspaceCompanyCardDetailsPage.tsx).
What alternative solutions did you explore? (Optional)
We considered hiding the "Last synced" column on commercial/CSV feeds where lastScrape is not populated, but showing "Never" (matching the CSV export and card details page) keeps the table columns consistent across feeds.
📣 @jeffrey-graham! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
- Make sure you've read and understood the contributing guidelines.
- Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
- Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
- Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
📣 @ronanchnlps-bit! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
- Make sure you've read and understood the contributing guidelines.
- Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
- Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
- Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Proposal
Please re-state the problem that we are trying to solve in this issue.
Workspace admins cannot see when company cards were last updated without opening each individual card details view. A "Last synced" column needs to be displayed in the workspace Company cards list.
What is the root cause of that problem?
In WorkspaceCompanyCardsPage.tsx / CompanyCardsTable.tsx:
The table header and rows render cardholder name, card number, and feed name, but do not include a column mapping the lastScrape timestamp stored in the card feed metadata.
What changes do you think we should make in order to solve the problem?
- In
WorkspaceCompanyCardsPage.tsx/CompanyCardsTable.tsx:- Add a "Last synced" column header to the Company cards table.
- For each card row, extract and format
card.lastScrapeusingDateUtils.toLocalTimeor relative time format (e.g., "X hours ago" or date string). - Display a fallback label (such as "Never" or "-") when
lastScrapeis absent or unassigned.
- Ensure responsive column hiding on compact mobile layouts to maintain readability.
What alternative solutions did you explore? (Optional)
Showing the sync timestamp as subtitle text under the card name, but a dedicated table column provides better alignment and sortability for administrators.
🚨 Edited by proposal-police: This proposal was edited at 2026-11-10 03:25:05 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Admins have to open each company card to see when it last synced. The Company cards table should show that time directly.
What is the root cause of that problem?
This is a new feature. lastScrape is already on every assigned card in the table, since the rows come from the same useCardsList(feedName) the details page reads (useCompanyCards.ts#L171-L177). Only the details page renders it (DynamicWorkspaceCompanyCardDetailsPage.tsx#L147-L149, #L215). The table has no column for it (index.tsx#L210-L279).
What changes do you think we should make in order to solve the problem?
Add a Last updated column (title per https://github.com/Expensify/App/issues/105949#issuecomment-6640194533) showing the Spend date abbreviation (per https://github.com/Expensify/App/pull/105955#issuecomment-6640409070), with the exact details page "Last updated" value in the tooltip, so the two screens never disagree.
- Value. In
cardsData(index.tsx#L300) addlastUpdatedTextandlastUpdatedTooltip, with the same states as the details page and the date abbreviated like the local time zone branch of Spend'sDateCell(DateCell.tsx#L43-L46), sincelastScrapeis a UTC instant:let lastUpdatedText: string | undefined; let lastUpdatedTooltip: string | undefined; if (assignedCard?.isLoadingLastUpdated) { lastUpdatedText = translate('workspace.moreFeatures.companyCards.updating'); } else if (assignedCard?.lastScrape) { const localDate = getLocalDateFromDatetime(assignedCard.lastScrape); const isPastYear = localDate.getFullYear() !== getLocalDateFromDatetime().getFullYear(); lastUpdatedText = format(localDate, isPastYear ? CONST.DATE.MONTH_DAY_YEAR_ABBR_FORMAT : CONST.DATE.MONTH_DAY_ABBR_FORMAT, {locale: dateFnsLocale}); lastUpdatedTooltip = format(localDate, CONST.DATE.FNS_DATE_TIME_FORMAT_STRING); } else if (assignedCard) { lastUpdatedText = translate('workspace.moreFeatures.companyCards.neverUpdated'); }- Synced card:
Nov 4(orMar 1, 2025for a past year) in the admin's time zone, so the day matches the details page. - Assigned but never synced:
Never. - While "Update card" runs:
Updating.... - Unassigned card: empty cell. There is no card, so no sync history.
- Synced card:
- Column. Add
lastUpdatedtoCompanyCardsTableColumnKeyand a column after Export account (#L259), labeled with the existingworkspace.moreFeatures.companyCards.lastUpdated.styles.mnw0plusdynamicSizingwithshouldFitContent, since the value has a fixed length. - Cell. In
WorkspaceCompanyCardsTableRow, render the value after the Export account cell (#L204-L216) under the same!shouldUseNarrowTableLayoutguard, and add it to the rowaccessibilityLabel(#L128). - Tooltip. When the cell shows a date, wrap it in a
Tooltipwith just the full timestamp, e.g.2026-11-04 18:54:12, exactly as the details page and CSV export show it (per https://github.com/Expensify/App/issues/105949#issuecomment-6753609231). No new translation. - Sorting. Make the column sortable.
lastScrapeis a UTCyyyy-MM-dd HH:mm:ssstring, so string order is time order. Never synced cards sort as oldest, ties fall back to card name like Export account (#L386-L394). The assigned/unassigned grouping stays. - Compact layouts. On narrow and medium widths the column is hidden like Card, Card name and Export account, so rows stay two lines. The value remains on the card details page.
- (Optional) Malformed timestamp.
getLocalDateFromDatetimereturns an Invalid Date for a malformed string, andformatthen throwsRangeError. The server always sendsyyyy-MM-dd HH:mm:ss, and the details page and CSV export make the same unguarded call today. If we want a guard anyway, checkisValidbefore formatting and fall back toNever, so a bad value can't break the table.
Test branch: https://github.com/Expensify/App/compare/main...samarroy84:App:fix-105949?expand=1
What alternative solutions did you explore? (Optional)
- Full
yyyy-MM-dd HH:mm:ssin the cell. Matches the details page without hovering, but it isn't the Spend abbreviation and makes the column much wider. The tooltip keeps the exact value. - Keep the old date while "Update card" runs. Avoids a flicker but disagrees with the details page, which shows
Updating.... - Third subtitle line on narrow layouts. Makes every mobile row taller for a value admins mostly check on desktop.
N/Afor unassigned cards. Adds noise to every unassigned row. An empty cell already says there is nothing to sync.
🚨 Edited by proposal-police: This proposal was edited at 2026-11-09 06:22:56 UTC.
Proposal
What is the root cause of that problem?
New feature. lastScrape is already on every assigned row (assignedCard), but nothing in the table reads it: no column key, no row field, no cell
https://github.com/Expensify/App/blob/5ebbde7d7cca4d372921e1ce0350b6962cf0cced/src/components/Tables/WorkspaceCompanyCardsTable/index.tsx#L56
https://github.com/Expensify/App/blob/5ebbde7d7cca4d372921e1ce0350b6962cf0cced/src/components/Tables/WorkspaceCompanyCardsTable/index.tsx#L300-L313
The tricky part is not adding a cell, it's that the value has to follow two display rules that the app currently implements in different places, and the "obvious" reuse of either one gets it wrong.
1. The cell must use the Spend date abbreviation (requested here), but Spend's default date path is wrong for lastScrape. DateCell has two branches. The default one formats the string as a calendar date in UTC (fine for a transaction date), and only the shouldUseLocalTimeZone branch converts an instant to the user's timezone:
https://github.com/Expensify/App/blob/5ebbde7d7cca4d372921e1ce0350b6962cf0cced/src/components/Search/SearchList/ListItem/DateCell.tsx#L42-L53
lastScrape is a UTC DB datetime (an instant), and the details page and CSV both show it in the admin's timezone:
https://github.com/Expensify/App/blob/5ebbde7d7cca4d372921e1ce0350b6962cf0cced/src/pages/workspace/companyCards/DynamicWorkspaceCompanyCardDetailsPage.tsx#L148-L150
https://github.com/Expensify/App/blob/5ebbde7d7cca4d372921e1ce0350b6962cf0cced/src/components/Tables/WorkspaceCompanyCardsTable/WorkspaceCompanyCardsTableControls.tsx#L91
I checked it with the real date-fns calls: for lastScrape = "2026-11-05 02:30:00" and an admin in America/Los_Angeles, the default Spend path prints Nov 5, while the details page prints 2026-11-04 18:30:00. So the row would say the card synced a day later than its own details page. The cell has to use the local timezone branch, and the full details page string goes in the tooltip so the two screens still match exactly.
2. The cell has to show "Updating..." too, not only the date. "Update card" (and the reconnect flow in useUpdateFeedBrokenConnection) merges isLoadingLastUpdated + pendingFields.lastScrape into the same cards_ key the table reads, and keeps the old lastScrape until the server answers. On failure it only writes errorFields.lastScrape, so lastScrape really is the last successful sync:
https://github.com/Expensify/App/blob/5ebbde7d7cca4d372921e1ce0350b6962cf0cced/src/libs/actions/CompanyCards.ts#L650-L729
The details page reads that flag before the date, so a cell built from lastScrape alone shows a stale date while the RHP over it says "Updating...":
https://github.com/Expensify/App/blob/5ebbde7d7cca4d372921e1ce0350b6962cf0cced/src/pages/workspace/companyCards/DynamicWorkspaceCompanyCardDetailsPage.tsx#L241-L243
3. CSV import feeds have nothing to sync. Their cards come from a spreadsheet upload, not a bank connection. The Wallet already knows this and never shows "Last synced" for them: https://github.com/Expensify/App/blob/5ebbde7d7cca4d372921e1ce0350b6962cf0cced/src/pages/settings/Wallet/PaymentMethodList.tsx#L309 https://github.com/Expensify/App/blob/5ebbde7d7cca4d372921e1ce0350b6962cf0cced/src/pages/settings/Wallet/PaymentMethodList.tsx#L371
A column without that rule would print "Never" on every row of a CSV feed, which reads as "all your cards are broken" and makes sorting meaningless.
4. The current sort can't put stale cards first. compareItems pins unassigned rows above assigned ones in ascending order and has no date branch, so "oldest first" would open with a page of unassigned rows, which have no date at all:
https://github.com/Expensify/App/blob/5ebbde7d7cca4d372921e1ce0350b6962cf0cced/src/components/Tables/WorkspaceCompanyCardsTable/index.tsx#L353-L393
What changes do you think we should make in order to solve the problem?
1. One formatter, built on the Spend logic. Move the local timezone branch of DateCell into a small DateUtils function and use it from DateCell too, so the cell is literally the Spend abbreviation and not a copy of it:
function formatLocalDateAbbreviated(localDate: Date, localNow: Date, dateFnsLocale?: DateFnsLocale) {
const isPastYear = localDate.getFullYear() !== localNow.getFullYear();
return format(localDate, isPastYear ? CONST.DATE.MONTH_DAY_YEAR_ABBR_FORMAT : CONST.DATE.MONTH_DAY_ABBR_FORMAT, {locale: dateFnsLocale});
}
Then one helper in CardUtils, next to parseCardLastScrape (which already parses the DB datetime as UTC, accepts ISO and returns undefined for empty or invalid values):
https://github.com/Expensify/App/blob/5ebbde7d7cca4d372921e1ce0350b6962cf0cced/src/libs/CardUtils.ts#L1800-L1818
function getCardLastUpdated(card, translate, getLocalDateFromDatetime, dateFnsLocale) {
if (card.isLoadingLastUpdated) {
return {text: translate('workspace.moreFeatures.companyCards.updating'), timestamp: parseCardLastScrape(card)?.getTime()};
}
const date = parseCardLastScrape(card);
if (!date) {
return {text: translate('workspace.moreFeatures.companyCards.neverUpdated')};
}
const localDate = getLocalDateFromDatetime(card.lastScrape);
return {
text: formatLocalDateAbbreviated(localDate, getLocalDateFromDatetime(), dateFnsLocale),
fullText: format(localDate, CONST.DATE.FNS_DATE_TIME_FORMAT_STRING),
timestamp: date.getTime(),
};
}
fullText is the exact details page string. The details page uses fullText from this helper instead of its inline copy, so there's one source for both screens. As a bonus, an invalid value now falls back to "Never" instead of format() throwing RangeError, which in the table would take down the whole list, not one RHP.
2. Column. Add lastUpdated to CompanyCardsTableColumnKey and a sortable column after Card name, labelled with the existing workspace.moreFeatures.companyCards.lastUpdated ("Last updated", same as Classic). styles.mnw0 + dynamicSizing with shouldFitContent, measured from text. Don't add the column when isCSVUploadFeed(feedName), the same rule the Wallet applies to these cards:
https://github.com/Expensify/App/blob/5ebbde7d7cca4d372921e1ce0350b6962cf0cced/src/libs/CardUtils.ts#L931-L937
3. Row data. In cardsData, call the helper only when there is an assignedCard, and add lastUpdated (text, fullText, timestamp) to the row item. Unassigned rows get nothing.
4. Cell. In WorkspaceCompanyCardsTableRow, under the same !shouldUseNarrowTableLayout guard as Card / Card name / Export account:
https://github.com/Expensify/App/blob/5ebbde7d7cca4d372921e1ce0350b6962cf0cced/src/components/Tables/WorkspaceCompanyCardsTable/WorkspaceCompanyCardsTableRow.tsx#L175-L216
- synced:
Nov 4(orNov 4, 2025for a past year), wrapped inTooltipwith "Last successful sync: 2026-11-04 18:30:00" (one new stringlastSuccessfulSync) - assigned, never synced: "Never"
- update running: "Updating..."
- unassigned: empty cell, no "N/A"
Add text to the row accessibilityLabel
https://github.com/Expensify/App/blob/5ebbde7d7cca4d372921e1ce0350b6962cf0cced/src/components/Tables/WorkspaceCompanyCardsTable/WorkspaceCompanyCardsTableRow.tsx#L128
5. Narrow and medium layouts. No change. The cell is hidden there like the other secondary columns, so rows keep their two lines. The value stays one tap away on the details page.
6. Sorting. For lastUpdated only, keep unassigned rows after assigned rows in both directions (checked before the existing grouping), then compare timestamp: "Never" counts as oldest, ties fall back to card name like the exportAccount branch. An "Updating..." row keeps its old timestamp, so it doesn't jump while the update runs. Ascending then puts never synced and stalest cards on top, which is why admins open each card today.
Tests (Given/When/Then)
- helper: Los Angeles admin +
2026-11-05 02:30:00givesNov 4and the details pagefullText; past year shows the year; ISO value; empty and invalid give "Never";isLoadingLastUpdatedgives "Updating..." and keeps the timestamp DateCelllocal timezone output unchanged after the movecompareItems: ascending gives Never, then oldest, then unassigned; descending keeps unassigned last; ties by card name- row: cell on wide, nothing on narrow, empty for unassigned; column absent for a CSV feed
What alternative solutions did you explore? (Optional)
- Pass
lastScrapetoDateCellas is. Least code, butDateCellis an editable Search cell and its default branch formats in UTC, which gives the wrong day above. It also has no "Updating..." or "Never" state. - Full
yyyy-MM-dd HH:mm:ssin the cell to match the details page 1:1. Matches without a tooltip, but it's not the Spend abbreviation that was asked for and it widens the column a lot. The tooltip gives the same exact value. - Show "Never" for CSV feeds instead of hiding the column. Keeps every feed's table the same shape, but every row would say "Never" for cards that can't sync by design, and it goes against what the Wallet already does for the same cards.
- Relative time ("2 days ago"). Easy to scan, but it goes stale while the page is open and matches neither the Spend dates nor the CSV.
🚨 Edited by proposal-police: This proposal was edited at 2026-11-08 16:17:31 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
On the workspace Company cards page, admins have to open each card's details page to see when it last synced. We want a "Last synced" column in the Company cards list that shows each card's last successful sync time (from the existing lastScrape value), handles cards with no timestamp and unassigned cards, and stays readable in compact layouts.
What is the root cause of that problem?
This is a new feature. The Company cards table only defines the Member, Card, Card name, optional Export account and actions columns:
https://github.com/Expensify/App/blob/ce539ca4cded9df7a22551846b4cb7585f635de4/src/components/Tables/WorkspaceCompanyCardsTable/index.tsx#L210-L279
and the row component only renders cells for those columns:
https://github.com/Expensify/App/blob/ce539ca4cded9df7a22551846b4cb7585f635de4/src/components/Tables/WorkspaceCompanyCardsTable/WorkspaceCompanyCardsTableRow.tsx#L204-L217
The lastScrape timestamp is already on each assigned card (assignedCard is passed to every row), but it is only formatted and shown on the card details page:
https://github.com/Expensify/App/blob/ce539ca4cded9df7a22551846b4cb7585f635de4/src/pages/workspace/companyCards/DynamicWorkspaceCompanyCardDetailsPage.tsx#L147-L149
and in the CSV export:
https://github.com/Expensify/App/blob/ce539ca4cded9df7a22551846b4cb7585f635de4/src/components/Tables/WorkspaceCompanyCardsTable/WorkspaceCompanyCardsTableControls.tsx#L90
What changes do you think we should make in order to solve the problem?
- Compute the value once per row. In the
cardsDatamapping, add alastSyncedDatefield (the parsed date, used for sorting) and alastSynceddisplay string to each row item:
https://github.com/Expensify/App/blob/ce539ca4cded9df7a22551846b4cb7585f635de4/src/components/Tables/WorkspaceCompanyCardsTable/index.tsx#L300-L329
- Parse with the existing
parseCardLastScrapehelper inCardUtils(exported for this), which already treats the DB datetime as UTC and falls back to ISO 8601 for other formats:
https://github.com/Expensify/App/blob/ce539ca4cded9df7a22551846b4cb7585f635de4/src/libs/CardUtils.ts#L1809-L1818
- Format it for display in the user's timezone the same way the details page and CSV export do (
getLocalDateFromDatetime+CONST.DATE.FNS_DATE_TIME_FORMAT_STRING), so all three places show the same value. - Unassigned cards: leave the value empty. They have no
assignedCardand nothing to sync yet, so the cell stays blank, like the Card name and Export account cells do for unassigned rows. - Assigned card with no
lastScrape: show the existingworkspace.moreFeatures.companyCards.neverUpdatedcopy ("Never"), the same fallback the details page uses. - Sync in progress (
assignedCard.isLoadingLastUpdated, the same flag the details page reads): show the existingupdatingcopy so the column matches the details page while a manual update runs.
-
Add the column. Add a sortable
lastSyncedentry toCompanyCardsTableColumnKeyand tocolumns, placed before the Export account column. Its label is a newworkspace.moreFeatures.companyCards.lastSyncedtranslation ("Last synced") in every language file. UsedynamicSizingwithgetContentToMeasureon the formatted string, withshouldFitContent(the date string has a fixed width), like the Card column does. -
Render the cell. In
WorkspaceCompanyCardsTableRow, add a cell before the Export account cell, rendered only when!shouldUseNarrowTableLayout(same as the other secondary columns). It showsitem.lastSyncedin single-line text with the same styles as the Card cell. To make clear it means the last successful sync, wrap the value in the existingTooltipcomponent with a newlastSuccessfulSyncstring, e.g. "Last successful sync:" (no tooltip while an update is running). The table header has no tooltip support today, so the hint goes on the cell instead. Also add the value to the row's accessibilityLabellist:
https://github.com/Expensify/App/blob/ce539ca4cded9df7a22551846b4cb7585f635de4/src/components/Tables/WorkspaceCompanyCardsTable/WorkspaceCompanyCardsTableRow.tsx#L128
- Compact layouts. On narrow and medium layouts the table collapses each row into the Member cell, so a new column would not show. Instead, add the sync time to the Member cell's subtitle for assigned cards, after the card details. Today that subtitle is
<masked card> • <card name>; it becomes<masked card> • <card name> • <Last synced: date>. The subtitle is already a one-lineTextWithTooltip, so long values get truncated with the full text in the tooltip, and the row keeps its height. Unassigned cards keep their current subtitle.
https://github.com/Expensify/App/blob/ce539ca4cded9df7a22551846b4cb7585f635de4/src/components/Tables/WorkspaceCompanyCardsTable/WorkspaceCompanyCardsTableRow.tsx#L99
- Sorting. Add a
lastSyncedbranch tocompareItemsthat compareslastSyncedDatetimestamps. Cards that never synced sort as the oldest, and ties fall back to the card name, as the Export account branch does. Unassigned cards are already grouped before this branch is reached, so they need no special case:
https://github.com/Expensify/App/blob/ce539ca4cded9df7a22551846b4cb7585f635de4/src/components/Tables/WorkspaceCompanyCardsTable/index.tsx#L353-L394
- Unify the copy. Rename the CSV export header from
lastUpdatedto the newlastSyncedlabel, so the export and the column use the same name. The CSV keeps its own value, so a card that never synced stays blank in the file instead of getting the "Never" or "Updating..." display copy.
Compare branch: https://github.com/Expensify/App/compare/main...wildan-m:App:wildan/105949-company-cards-last-synced?expand=1
What alternative solutions did you explore? (Optional)
- Relative time ("2 hours ago") instead of an absolute timestamp. It is easier to scan, but it goes stale unless the list re-renders on a timer, and it doesn't match the absolute time on the details page and in the CSV. We could add it later as a tooltip on the absolute value.
- Always show the column, even on narrow layouts. Rejected: the narrow table renders a single Member cell per row, so an extra column would either be hidden or crowd the avatar and name. Putting the time in the subtitle keeps the information without changing the row layout.
Proposal
Please re-state the problem that we are trying to solve in this issue.
On the workspace Company cards table, admins can only see when a card last synced by opening each card's details page. We want a "Last synced" column that shows the card's existing lastScrape value right in the list.
What is the root cause of that problem?
This is a new feature, so nothing is broken. The value already exists, but only one screen renders it:
- Each assigned card's Onyx object already carries
lastScrape, the last successful sync. Failed attempts are tracked separately, as the doc comment onisLastScrapePastDismissThresholdnotes. - Only the card details page renders it ("Last updated: ..."):
DynamicWorkspaceCompanyCardDetailsPage.tsx#L147-L149, with an "Updating..." state while a sync runs, at#L215. - The table's column list stops at member / card / card name / export account / actions:
WorkspaceCompanyCardsTable/index.tsx#L210-L279. The row builder never readsassignedCard.lastScrape(#L281-L331), and the row has no cell for it (WorkspaceCompanyCardsTableRow.tsx#L204-L216). - The table's CSV export already writes the same value as "Last updated" (
WorkspaceCompanyCardsTableControls.tsx#L90), so the on-screen table is the only place it is missing.
Every path the new column has to handle:
- Unassigned card rows have no
assignedCard, so they have nolastScrapeand no details page (#L284-L285). - Assigned but never synced:
lastScrapeis empty. - Sync in flight: "Update" on the details page sets
isLoadingLastUpdatedandpendingFields.lastScrape(CompanyCards.ts#L650-L700). The table already reads that pending flag for errors (#L296). - Narrow and medium widths use the compact layout (
shouldUseNarrowTableLayout,#L197). There, every column except member is hidden and the row is just avatar, name and subtitle. - Sorting:
compareItemshas one branch per column key. - Two date formats:
lastScrapeis usually a UTC DB datetime with no offset. Some values are already ISO.parseCardLastScrapehandles both, but it is not exported.
What changes do you think we should make in order to solve the problem?
I would add the column the same way PR #100738 added the "Export account" column to this table:
- Row data (
index.tsx, in thecardsDatamap): addlastSyncedText:- unassigned →
undefined(empty cell); assignedCard.isLoadingLastUpdated→ the existingworkspace.moreFeatures.companyCards.updating("Updating...");lastScrapepresent →format(getLocalDateFromDatetime(lastScrape), CONST.DATE.FNS_DATE_TIME_FORMAT_STRING). This is the exact string the details page and the CSV show, so the three always agree;- otherwise → a new
neverSynced: 'Never'key. Also addlastSyncedTimestamp = parseCardLastScrape(assignedCard)?.getTime()for sorting (exportparseCardLastScrapefromCardUtils).
- unassigned →
- Column: add a sortable
lastSyncedentry before the export account column, labelled with a newlastSynced: 'Last synced'key. It usesdynamicSizing: {getContentToMeasure: (item) => ..., shouldFitContent: true}, so the track is only as wide as a date and doesn't squeeze the free-text columns. - Row cell (
WorkspaceCompanyCardsTableRow.tsx): render it like the export account cell, inside!shouldUseNarrowTableLayout. Wrap the text in the existingTooltipwith a newlastSyncedTooltip: 'Last successful sync'string. Add the value to the row'saccessibilityLabel(#L128). This is how we make clear the value is the last successful sync without making the header longer. - Sorting: add the branch below. "Never" sorts oldest, and ties fall back to the card name, like the
exportAccountbranch does.
if (activeSorting.columnKey === 'lastSynced') {
const diff = (a.lastSyncedTimestamp ?? 0) - (b.lastSyncedTimestamp ?? 0);
return (diff !== 0 ? Math.sign(diff) : cardNameComparison) * orderMultiplier;
}
New strings go in en.ts next to lastUpdated; the other locales are generated.
Regression safety: only the workspace Company cards table changes. The Expensify Cards table, the details page and the CSV export are untouched. The compact layout looks exactly as it does today, because the column is hidden there.
Why the obvious one-liner is not enough: rendering assignedCard.lastScrape straight into a new cell shows the raw DB string. That string is UTC with no offset, so it is off from the details page by the admin's timezone offset. It also shows a blank both for "never synced" and for unassigned rows, so the two can't be told apart, and it sorts as a string. The issue asks for missing timestamps to be handled, so the local-time conversion, the "Never" state and the timestamp sort are all needed.
Every requirement in the issue is covered:
- existing
lastScrape: ✅ - last successful sync made clear (tooltip and a11y label): ✅
- missing timestamps ("Never") and unassigned rows (empty): ✅
- compact layouts (hidden when narrow, fit-content when wide): ✅
What alternative solutions did you explore? (Optional)
- Relative text ("Synced 3 hours ago"), reusing
walletPage.cardLastSyncedthe wayPaymentMethodList.tsx#L370-L374does. It is shorter, but it goes stale while the page stays open. It also no longer matches the details page or the CSV, so the same card would show two different values. Easy to switch if Design prefers it. - Showing it in the narrow subtitle (
card • name • date): this crowds the only secondary line on mobile, which goes against "keep compact layouts readable". The date is one tap away on the details page there. - Header tooltip:
TableColumnhas no header-tooltip prop (Table/types.ts#L86-L104). Adding one changes the shared Table for every table in the app. The tooltip on the cell gives the same clarity with a smaller blast radius.
