Repository navigation
Conversation
Seatbelt-Operation: s08-a7f9ba43-4541881-sign-1
Seatbelt-Operation: recovery-20260924-100942-merge-sign-1
Seatbelt-Operation: recovery-20260925-100942-narrow-sign-1
|
@ikevin127 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. |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-10-17.at.19.01.27.mov |
| const reportID = params && 'reportID' in params ? params.reportID : undefined; | ||
| return {contextualReportID: typeof reportID === 'string' ? reportID : undefined, isSearchRouterScreen}; |
There was a problem hiding this comment.
🟢 src/components/Search/SearchRouter/SearchRouterUtils.ts:52-53
Small one: the in check and the typeof check are split across two expressions. They can go into a single condition, which is how the same guard is written in getFocusedReportParams.ts:23 and reconcileMovedScanFailedReport.ts:47:
const params = maybeReportRoute.params;
const contextualReportID = params && 'reportID' in params && typeof params.reportID === 'string' ? params.reportID : undefined;
return {contextualReportID, isSearchRouterScreen};There was a problem hiding this comment.
@ikevin127 This is addressed, Thanks for checking.
Combined the parameter-presence and string checks into one condition and returned contextualReportID directly. The existing SearchRouter tests pass.
ikevin127
left a comment
There was a problem hiding this comment.
🟢 LGTM - I have one small finding ☝️ - the rest is clean.
Seatbelt-Operation: reviewer-fix-100942-454c579d-b61c-42f6-bd19-bee67964d699
|
🚧 blimpich 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/blimpich in version: 9.5.15-1 🚀
|
|
No help site update needed. This PR only replaces two type assertions in the Search helpers with type-safe code, so nothing users see or do changes. |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.5.15-3 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Removes two unsafe type assertions from Search helpers. Search uses a report ID for contextual suggestions only when the Report or Expense Report route supplies a string ID; the filter map keeps its existing values with an explicit accumulator type.
Changed files
src/components/Search/SearchRouter/SearchRouterUtils.tssrc/components/Search/SearchRouter/buildSubstitutionsMap.tsFixed Issues
$ #94739
PROPOSAL: #94739 (comment)
Tests
Focused lint, formatting, spelling, parser regeneration, and existing Jest suites passed.
QA Steps
Use a chat containing an existing message and an expense report containing an existing comment.
1. Chat Search context.
2. Expense-report Search context.
3. About clears prior context.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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
Recordings (2)
100942-mobile-corrected.mp4
100942-desktop-corrected.mp4