Skip to content

Conversation

@huult
Copy link
Contributor

@huult huult commented Aug 13, 2025

Details

Fixed Issues

$ #64012
PROPOSAL: #64012 (comment)

Tests

Same QA step

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

  1. Open the Expensify app.
  2. Navigate to Reports → Reports.
  3. Tap on an expense.
  4. Verify that tapping an expense or the Review button from the Reports view loads the top of the expense thread.
  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Screen.Recording.2025-07-22.at.15.01.11.mov
Android: mWeb Chrome
Screen.Recording.2025-07-22.at.15.02.14.mov
iOS: Native
Screen.Recording.2025-07-22.at.15.03.45.mov
iOS: mWeb Safari
Screen.Recording.2025-07-22.at.15.07.50.mov
MacOS: Chrome / Safari
Screen.Recording.2025-07-22.at.14.56.07.mov
MacOS: Desktop
Screen.Recording.2025-07-22.at.14.58.43.mov

@huult huult requested a review from a team as a code owner August 13, 2025 03:33
@melvin-bot melvin-bot bot requested a review from fedirjh August 13, 2025 03:33
@melvin-bot
Copy link

melvin-bot bot commented Aug 13, 2025

@fedirjh 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]

@huult
Copy link
Contributor Author

huult commented Aug 19, 2025

@fedirjh bump

@fedirjh
Copy link
Contributor

fedirjh commented Aug 19, 2025

@huult Can you explain this PR?

@huult
Copy link
Contributor Author

huult commented Aug 19, 2025

@fedirjh Which one do you not understand?

@fedirjh
Copy link
Contributor

fedirjh commented Aug 19, 2025

@huult There are no details about the changes, what does it fix?

@huult
Copy link
Contributor Author

huult commented Aug 19, 2025

I updated the condition to remove hasNewestReportAction, because it returns false when there are no messages, causing a bug where the list can’t scroll to the end as expected in this ticket

const shouldScrollToEnd =
            (isExpenseReport(report) || isTransactionThread(parentReportAction)) && isSearchTopmostFullScreenRoute() && hasNewestReportAction && !unreadMarkerReportActionID;

to

const shouldScrollToEnd =
            (isExpenseReport(report) || isTransactionThread(parentReportAction)) && isSearchTopmostFullScreenRoute() &&  !unreadMarkerReportActionID;

@fedirjh
Copy link
Contributor

fedirjh commented Aug 19, 2025

when there are no messages, causing a bug where the list can’t scroll to the end

@huult So the bug only appears if the chat is empty?

@huult
Copy link
Contributor Author

huult commented Aug 19, 2025

@fedirjh yes, like #64012 (comment)

@fedirjh
Copy link
Contributor

fedirjh commented Aug 19, 2025

@huult I couldn't replicate the bug in #64012 (comment) , even with empty messages expense. So I am not really sure if the code changes within this PR will fix the bug.

@fedirjh
Copy link
Contributor

fedirjh commented Aug 19, 2025

@trjExpensify Can you please trigger a build on this PR? we want to make sure the bug is fully fixed with @heyjennahay's account #64012 (comment)

@trjExpensify
Copy link
Contributor

Yep, web-only fine @fedirjh?

@fedirjh
Copy link
Contributor

fedirjh commented Aug 19, 2025

@trjExpensify Yes, that works.

@trjExpensify
Copy link
Contributor

Running 👍

@github-actions
Copy link
Contributor

🚧 @trjExpensify has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions
Copy link
Contributor

🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
Built from App PR #68419.

Android 🤖 iOS 🍎
⏩ SKIPPED ⏩ ⏩ SKIPPED ⏩
The build for Android was skipped The build for iOS was skipped
Desktop 💻 Web 🕸️
⏩ SKIPPED ⏩ https://68419.pr-testing.expensify.com
The build for Desktop was skipped Web

👀 View the workflow run that generated this build 👀

@fedirjh
Copy link
Contributor

fedirjh commented Aug 20, 2025

cc @heyjennahay Could you please test if the bug is fixed in https://68419.pr-testing.expensify.com/

@heyjennahay
Copy link
Contributor

I just tested and unfortunately the issue is still happening. And there seems to be a new issue too 😬

Video recording of test in the link you provided showing:
a) when the over limit expense is clicked on, the expense loads at the bottom and not at the violation at the top (amount)
b) the expenses in the report view no longer show their red violation (see screenshot from the same report in staging below)

2025-08-20_14-57-59 (1)

Same report in staging with violations showing (correctly)
image

@huult
Copy link
Contributor Author

huult commented Aug 20, 2025

@heyjennahay This only scrolls to the top when the expense is opened from the report tab cc @fedirjh

@heyjennahay
Copy link
Contributor

Ah got it. Let me test again now

@heyjennahay
Copy link
Contributor

Ok confirming that opening the expense via the Reports page does bring you to the violation. However the issue of the missing violations when you click into the report still occurs (also confirmed it doesn't happen on staging)

2025-08-20_15-20-15 (1)

@huult
Copy link
Contributor Author

huult commented Aug 20, 2025

@heyjennahay It looks like this issue is not related to this PR, I think.

@mountiny
Copy link
Contributor

@huult @fedirjh We have a solution from Callstack to this issue and I think that is more robust and should avoid the issues you are experiencing here #68528

I believe we should go ahead with that one

@pac-guerreiro @rinej @allgandalf

@mountiny mountiny changed the title Update condition to scroll to end [HOLD https://github.com/Expensify/App/pull/68528] Update condition to scroll to end Aug 20, 2025
@Christinadobrzyn Christinadobrzyn removed the request for review from fedirjh August 27, 2025 19:34
@huult
Copy link
Contributor Author

huult commented Sep 3, 2025

#68528 This was related to another PR that was merged. I tested it and the issue looks fixed. #68932

Screen.Recording.2025-09-03.at.10.54.09.mov

cc @fedirjh

@huult
Copy link
Contributor Author

huult commented Sep 4, 2025

cc @truph01

@truph01
Copy link
Contributor

truph01 commented Sep 8, 2025

@huult

  • Were you able to reproduce the issue on the latest main branch?

  • Also, while testing the PR, I noticed inconsistent behavior: there is a case where it loads the top of the expense report, and in other cases, it loads the end. The scrolling behavior doesn't appear to be consistent.

Screen.Recording.2025-09-08.at.17.51.24.mov

@huult
Copy link
Contributor Author

huult commented Sep 9, 2025

@truph01 #68932 (comment) I saw that the PR was reverted. Please wait for the new deploy to test again.

@truph01
Copy link
Contributor

truph01 commented Sep 9, 2025

I saw that the PR was reverted. Please wait for the new deploy to test again.

Could you merge main? @huult

@huult
Copy link
Contributor Author

huult commented Sep 10, 2025

@truph01 it's done

@truph01
Copy link
Contributor

truph01 commented Sep 15, 2025

@huult I just tested your solution in the latest main, and it looks like it doesn't work. Here is a video:

Screen.Recording.2025-09-15.at.15.52.15.mov

Here is the code change I applied:

        const shouldScrollToEnd = (isExpenseReport(report) || isTransactionThread(parentReportAction)) && isSearchTopmostFullScreenRoute() && !unreadMarkerReportActionID;

@truph01
Copy link
Contributor

truph01 commented Sep 19, 2025

@huult Could you check my comment?

@huult
Copy link
Contributor Author

huult commented Sep 19, 2025

@truph01 omg, sorry. I missed your comment. I’ll check this soon

@huult
Copy link
Contributor Author

huult commented Sep 22, 2025

Screen.Recording.2025-09-22.at.09.26.23.mov

@truph01 It’s working after I merged from main.

@huult
Copy link
Contributor Author

huult commented Sep 23, 2025

@truph01 Could you check my comment?

@huult huult changed the title [HOLD https://github.com/Expensify/App/pull/68528] Update condition to scroll to end Update condition to scroll to end Nov 24, 2025
@huult huult closed this Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants