Skip to content

[$250] [Search v2.2] – All messages from pinned chat are displayed in search pinned section #49570

Closed

Description

@IuliiaHerets

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.39-0
Reproducible in staging?: Y
Reproducible in production?: N/A - new feature, doesn't exist in prod
Issue was found when executing this PR: #49186
Email or phone of affected tester (no customers): gocemate+a2244@gmail.com
Issue reported by: Applause Internal Team

Action Performed:

  1. Navigate to LHN> Pin any 1:1 chat that have messages from other user
  2. Go to Search> Chat> Pinned
  3. Take a look at chats in this section> Open few messages and take a look at the green line

Expected Result:

Pinned chat should be present in Pinned section and when open a message green line should remain on the first unread message

Actual Result:

All messages between users from pinned chat are displayed in search pinned section. When open few messages green line change it's position

Workaround:

Unknown

Platforms:

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6610298_1726863372004.Recording__4010.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021838084013513034465
  • Upwork Job ID: 1838084013513034465
  • Last Price Increase: 2024-09-30
  • Automatic offers:
    • rayane-djouah | Contributor | 104082378
Issue OwnerCurrent Issue Owner: @s77rt

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 21, 2024
  2. melvin-bot commented on Sep 21, 2024

    @melvin-bot

    Triggered auto assignment to @JmillsExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. github-actions commented on Sep 21, 2024

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  4. melvin-bot commented on Sep 21, 2024

    @melvin-bot

    Triggered auto assignment to @nkuoch (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  5. IuliiaHerets commented on Sep 21, 2024

    @IuliiaHerets
    Author

    We think that this bug might be related to #wave-control

  6. luacmartins commented on Sep 22, 2024

    @luacmartins
    Contributor

    I don't think this is a deploy blocker. All messages showing up is the expected behavior. Only thing that needs to be fixed is the unread marker jumping around.

  7. 24 remaining items

  8. wildan-m commented on Sep 25, 2024

    @wildan-m
    Contributor

    @rayane-djouah sure. Thanks for mentioning that @QichenZhu

  9. wildan-m commented on Sep 26, 2024

    @wildan-m
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    What is the root cause of that problem?

    We are not updating unread marker time when the last unread report action deleted

    What changes do you think we should make in order to solve the problem?

    We can update unread marker time when some of the report actions deleted, we can add new condition to indicate some report action deleted add this condition: mostRecentReportActionCreated >= prevMostRecentReportActionCreated

    Change this code to:

        const mostRecentReportActionCreated = sortedVisibleReportActions[0]?.created ?? '';
        const prevMostRecentReportActionCreated = usePrevious(mostRecentReportActionCreated);
        useEffect(() => {
        
            if (unreadMarkerReportActionID) {
                return;
            }
        
        
            if (mostRecentReportActionCreated <= unreadMarkerTime && mostRecentReportActionCreated >= prevMostRecentReportActionCreated) {
                return;
            }
        
            setUnreadMarkerTime(mostRecentReportActionCreated);

    What alternative solutions did you explore? (Optional)

    To maintain the unread marker visible after repeated search clicks, lastReadTime should not be updated in openReport. A backend modification is needed to introduce a new parameter shouldUpdateLastReadTime set to true for routes other than SCREENS.SEARCH.REPORT_RHP.

    Also wrap setUnreadMarkerTime in src/pages/home/report/ReportActionsList.tsx with the REPORT_RHP check

        const [unreadMarkerTime, setUnreadMarkerTime] = useState(report.lastReadTime ?? '');
    
        const setUnreadMarkerTimeIfNotSearchReport = (lastReadTime: string) => {
            if(route.name === SCREENS.SEARCH.REPORT_RHP)
            {
                return;
            }
            setUnreadMarkerTime(lastReadTime)
        }
    
  10. wildan-m commented on Sep 26, 2024

    @wildan-m
    Contributor

    Proposal Updated

    • adjust solution with latest source code link
    • Add alternative solution
  11. melvin-bot commented on Sep 30, 2024

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  12. luacmartins commented on Oct 1, 2024

    @luacmartins
    Contributor

    @rayane-djouah let me know what you think of the updated proposal #49570 (comment)

  13. rayane-d commented on Oct 2, 2024

    @rayane-d
    Contributor

    @luacmartins This bug is no longer reproducible because it was caused by PR #48445, which was reverted in PR #49770. I think we can close this issue.

    @IuliiaHerets Could you please retest and confirm whether this issue is no longer reproducible?

    Screen.Recording.2024-10-02.at.3.06.19.PM.mov
  14. luacmartins commented on Oct 2, 2024

    @luacmartins
    Contributor

    Cool, I agree. Let's close this out once @IuliiaHerets confirms.

  15. IuliiaHerets commented on Oct 2, 2024

    @IuliiaHerets
    Author

    @luacmartins This bug report contains two issues.

    1. All messages are displayed in Pinned section ( not sure if that's expected, it is still repro)
    2. Green line appears on every open message from pinned chats (this is not repro any more)
    Recording.4219.mp4
  16. luacmartins commented on Oct 2, 2024

    @luacmartins
    Contributor

    Thanks for confirming!

    All messages are displayed in Pinned section ( not sure if that's expected, it is still repro)

    Yes, this is expected

  17. luacmartins commented on Oct 2, 2024

    @luacmartins
    Contributor

    Cool, seems like the issue here is resolved. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions