Repository navigation
[NoQA] Use server IDs for DEW report action pagination cursors - #105660
Conversation
Co-authored-by: Vit Horacek <mountiny@users.noreply.github.com>
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
🤖 Web test steps verification results: ✅ pass On dev NewDot web, I created a workspace and submitted an expense report, and its actions showed in order. A 12-message chat loaded fully after I left it, reopened it, and scrolled up and down, with every API call returning 200 and no error banners. The PR's only documented step is the JS console check, so I added two regression checks for report-action loading. I did not reproduce the DEW case itself, because the test account has no workspace with Dynamic External Workflow enabled. The web tooling can't read the browser console directly, so step 3 is based on network status codes and the UI.
view run · no recording available |
|
@MelvinBot review |
|
@ahmedGaber93 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] |
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. |
ReviewThe fix looks correct, and I found no blocking issues. Pages and cursors now hold only real action IDs, so One minor edge case (not blocking): a routed row can briefly disappear when its submit or forward action is the newest action on a page and newer actions still exist ( Why this happens
Optional alternative: keep routed rows in the pages and skip them only when picking the cursor IDs ( Other checks
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8fbf6ee9f
ℹ️ 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".
…rward action Co-authored-by: Vit Horacek <mountiny@users.noreply.github.com>
|
@chiragsalian 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] |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
Fixed the failing Details
|
Co-authored-by: Vit Horacek <mountiny@users.noreply.github.com>
|
|
|
|
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb Safari |
|
🚧 madmax330 has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/madmax330 in version: 9.5.34-0 🚀
|
|
No help site update needed — this PR fixes report history loading after submission or forwarding, restoring expected behavior without adding a feature, changing a workflow, or making existing article text incorrect. |
|
No FullStory changes needed. This PR only fixes DEW report-action pagination cursors and adds regression tests; it introduces no new UI, screens, user properties, or sensitive content. |
|
@MelvinBot could this blocker #106323 be caused by this pr? |
|
Unlikely based on the final merged code, but not conclusively ruled out. The earlier display-hook changes were removed before merge.
58 relevant tests passed, but these don’t establish an end-to-end reproduction. The decisive check is the same cached follow-up, offline, with and without the guard, using the revert build. No retest verdict is posted yet. If both fail, check whether the selected follow-up actually contains a cached |
|
@MelvinBot if this is not reproducible in production though and this was the first pr merged in this staging release, what change could have introduced it? |
|
You’re right—if QA reproduced this on the original merge build, this PR is the only new App runtime change to isolate. My earlier “unlikely” conclusion was too strong without that comparison. I checked the release history:
I haven’t identified another change—or demonstrated how this guard causes the symptom. The missing evidence is whether QA tested that original build, and whether the revert build restores the same cached follow-up offline. If it does, that would implicate this PR despite the apparently independent code paths. |
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.5.34-1 🚀
Bundle Size Analysis (Sentry): |











Explanation of Change
NewDot adds an app-only "routed" row after each Dynamic External Workflow (DEW) submit or forward action. The row's ID is the real action ID plus
DEW, and it is timestamped 1 ms after the real action.The pagination middleware sorts each response with
getSortedReportActionsForDisplay, which adds these rows. When a page ended at a DEW submit or forward, the…DEWrow became the page's newest ID and was saved asnewestFetchedReportActionID.GetNewerActionsthen sent that ID, the API rejected it with 666 "Missing reportActionID for GetNewerActions", and the cursor never moved. As a result, the report stopped showing anything newer, such as approvals and exports.This PR keeps routed rows in page metadata and skips them only when selecting
newestFetchedReportActionID. The cursor must be an ID present in the raw server response (Pagination.ts:160–162), so generated rows remain visible at linked-page boundaries without being sent to the API. No display-hook workaround is needed.Reports that already saved a
…DEWcursor recover on the nextOpenReport, which saves a real server cursor.Regression tests cover submit and forward actions across initial, newer, and older responses, pagination markers, and linked-page rendering.
AI Tests
prettierscript.Fixed Issues
$ #105649
PROPOSAL:
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.
Tested in Slack on the customer account who was impacted https://expensify.slack.com/archives/C049HHMV9SM/p1793646156198389?thread_ts=1793623500.596159&cid=C049HHMV9SM and worked well
Offline tests
QA Steps
// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas do they need to test for regressions.
N/A
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, 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.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
Not yet tested — needs manual QA.
Android: mWeb Chrome
Not yet tested — needs manual QA.
iOS: Native
Not yet tested — needs manual QA.
iOS: mWeb Safari
Not yet tested — needs manual QA.
MacOS: Chrome / Safari
Not yet tested — needs manual QA.