Show Scanning in the date column and pin scanning expenses to the top of transaction lists#93469
Show Scanning in the date column and pin scanning expenses to the top of transaction lists#93469wildan-m wants to merge 4 commits into
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
5d97546 to
9a2463b
Compare
|
@DylanDylann 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9a2463bddf
ℹ️ 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".
| let displayText = displayTextOverride; | ||
| if (displayText === undefined) { | ||
| const formattedDate = DateUtils.formatWithUTCTimeZone(date, DateUtils.doesDateBelongToAPastYear(date) ? CONST.DATE.MONTH_DAY_YEAR_ABBR_FORMAT : CONST.DATE.MONTH_DAY_ABBR_FORMAT); | ||
| displayText = suffixText ? `${formattedDate} • ${suffixText}` : formattedDate; | ||
| } |
There was a problem hiding this comment.
Preserve the category suffix when overriding the date
When a narrow transaction row has a category while the receipt is still scanning (for example, the user assigns a category before SmartScan finishes), suffixText is the only place that category is rendered. This branch replaces the whole display string with displayTextOverride, so the category disappears until scanning completes; the override should replace only the formatted date and still append the suffix when present.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Good catch — addressed in 99802d4. The override now applies to the date portion only and the suffix is still appended, so a category set on a still-scanning receipt shows Scanning… • <category> on the narrow layout instead of dropping it. Added a render test covering this case.
On the narrow layout a transaction's category renders only as the date cell's suffix. The scanning override replaced the whole display string, so a category set on a still-scanning receipt vanished until the scan finished. Apply the override to the date portion only and keep the suffix. Adds a render test for scanning + category on narrow layout.
Explanation of Change
A freshly scanned receipt is created with a placeholder date of today at midnight, so the expense list shows a real-looking date for a receipt whose date isn't actually known yet — and under the default newest-first sort, the in-progress scan sinks below every other expense created that day, making it hard to track the scan's progress.
While the receipt is scanning, the date cell now shows "Scanning…" — the same treatment and copy the merchant cell already uses — and the row is pinned to the top of both the Expenses tab and the report's transaction table, regardless of the selected sort column or direction. Both changes key off the existing scanning state, so once the scan completes the row automatically reverts to its real date and chronological position with no extra plumbing. The pin takes precedence over the existing prioritization of rows that need attention, and only applies on the views that show the scanning state.
Fixed Issues
$ #89966
PROPOSAL: #89966 (comment)
Tests
Offline tests
QA Steps
Same as tests.
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
Kapture.2026-06-13.at.22.09.41.mp4
Android: mWeb Chrome
Kapture.2026-06-13.at.22.13.41.mp4
iOS: Native
Kapture.2026-06-13.at.21.48.29.mp4
iOS: mWeb Safari
Kapture.2026-06-13.at.22.00.44.mp4
MacOS: Chrome / Safari
Kapture.2026-06-13.at.21.09.07.mp4