Skip to content

Dispute chat does not scroll to latest messages when returning to tab #46

@mostronatorcoder

Description

@mostronatorcoder

Problem

When attending a dispute and exchanging messages with the buyer/seller, the chat works correctly in real-time showing the latest messages as they are sent.

However, if you navigate away from the Disputes Management tab and then return to it, the chat view only shows the first messages and does not scroll to the most recent ones. The user has to manually scroll down to see the latest conversation.

Steps to Reproduce

  1. Open a dispute in Disputes Management
  2. Exchange several messages with the counterparty (e.g., 7+ messages)
  3. Navigate to a different tab in Mostrix
  4. Return to the Disputes Management tab
  5. Observe that the chat shows only the first messages, not scrolled to the bottom

Expected Behavior

When returning to the Disputes Management tab, the chat should automatically scroll to the most recent messages (bottom of the conversation).

Suggested Fix

In the dispute chat widget, add a scroll-to-bottom behavior when:

  1. The tab becomes visible again (focus/visibility change)
  2. The dispute is selected/reloaded

This could be implemented with a ScrollController that calls jumpTo(maxScrollExtent) or animateTo(maxScrollExtent) when the widget regains focus or is rebuilt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions