[Payment due @nkdengineer] [No QA] Remove duplicate shouldUseNarrowLayout declaration in InboxTabSelector - #101195
Conversation
Co-authored-by: nkdengineer <nkdengineer@users.noreply.github.com>
|
🤖 Web test steps verification results: On dev NewDot web this branch builds and runs, the Inbox tab selector renders All / Unread / To-dos with their icons in narrow layout, and switching tabs updates the active tab and content. No error banners or blank screens appeared on any screen exercised. One note on scope: the wide-layout Inbox renders the tabs without icons, which is expected — view run · no recording available |
|
🤖 Android test steps verification results: ✅ pass InboxTabSelector renders and functions correctly on Android: All / Unread / To-dos display with icons, switching tabs updates the selection and content, and no JS or console errors were logged during the test window. That confirms the fix for the duplicate Note on scope: the installed build was already compiled, so this run exercises the runtime behavior of the Inbox screen rather than the compile step. That is still the meaningful signal here — the bug being fixed was a hard parse error that would have taken down the whole JS bundle. view run · no recording available |
|
@MelvinBot Mark it as ready |
|
Marked as ready for review. All CI checks pass. The only failure is Two things still need a human before this can merge:
view run · no recording available |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
@marcochavezf 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] |
|
🎯 @nkdengineer, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
🚧 mountiny 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/mountiny in version: 9.4.80-0 🚀
|
No help site changes requiredThis PR deletes one duplicated line — a second How I checked
Help site updates are warranted when a PR adds, removes, renames, or changes the behavior of something a customer interacts with. A duplicate-declaration removal with no behavior change does not meet that bar.
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.4.80-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Payment issue created: #101367 |





Explanation of Change
mainis currently red for every open PR:src/pages/inbox/sidebar/InboxTabSelector.tsxdeclaresshouldUseNarrowLayouttwice in the same function scope, which is a hard parse error.Two PRs each added the same line independently:
const {shouldUseNarrowLayout} = useResponsiveLayout();near the top ofInboxTabSelector, feedingisScreenFocused.iconvalues.The two insertions are ~7 lines apart, so git auto-merged them with no conflict and the duplicate landed on
maininad2bdf1without anyone seeing a combined file.This PR deletes the second declaration. Both were the same destructure of the same argument-free hook call, so the remaining one at the top of the function yields the identical value, and every consumer (the
isScreenFocusedcall plus the threeicon:entries) resolves to it. No behavior changes — this only makes the file parse again.Fixed Issues
$
PROPOSAL:
No tracked issue — this is a build break on
mainfound while investigating failing checks on #101184.AI Tests
I could not run the local AI test bundle —
npm,npx, andnode-invoked binaries are all blocked in this execution environment, sonpm run lint,npm run lint-changed,npm run typecheck,npm test, andnpm run react-compiler-compliance-check check-changeddid not execute. CI on this PR is the validation.What I did verify, by inspection of the post-change file:
shouldUseNarrowLayoutis now declared exactly once, at line 40.useResponsiveLayoutimport is still used, so no unused-import error.isScreenFocusedargument and the threeicon:entries) sit below that single declaration.The three CI checks that fail on
maintoday each report this one identifier and nothing else, so they are the direct signal for this change:typecheck—TS2451: Cannot redeclare block-scoped variable 'shouldUseNarrowLayout'ESLint check—'shouldUseNarrowLayout' is already defined. @typescript-eslint/no-redeclare(exactly1 error)test—Identifier 'shouldUseNarrowLayout' has already been declared. (47:11), which takes down every suite that renders the LHNTests
// 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 validate your change worked.
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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.