[NoQA] Fix requestIndex type errors blocking main typecheck#92212
Conversation
Use getClientRequestIndex() for knownOngoingRequestIDs tracking and update MiddlewareTest fixtures to requestIndex so typecheck and lint pass on main. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@Krishna2323 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/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
🚧 @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.91-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Help site review: no changes required. This PR is an internal data-layer type/lint fix. It renames the client-side request identifier from I checked @mountiny, no linked help site PR was created because this change has no user-facing impact. Please confirm you agree no docs update is needed; if you believe a doc is affected, point me to it and I'll draft the changes. |
Explanation of Change
PR #91166 merged after #91948 renamed the client-side request identifier from
requestIDtorequestIndex. The merge leftknownOngoingRequestIDsguard code andMiddlewareTestfixtures still referencingrequestID, which broke typecheck and lint on main.This fix uses the existing
getClientRequestIndex()helper (already used elsewhere inPersistedRequests.ts) for the ongoing-request own-write guard, and renames test fixtures torequestIndex.Fixed Issues
$ #92200
$ #92199
$ #92223
PROPOSAL:
Tests
npm run typecheckand confirm it passesnpm test -- tests/unit/MiddlewareTest.ts tests/unit/PersistedRequests.tsand confirm all tests passOffline tests
N/A — no offline-specific behavior changed.
QA Steps
N/A — [NoQA]. Data-layer type fix with no user-visible change; covered by unit tests and CI.
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