Skip to content

[BUG] Messages out-of-order after ban/unban fix #31

@Cod-e-Codes

Description

@Cod-e-Codes

Summary
After the frozen-history fix (b9407f6), some clients display messages in the wrong order.

Steps to reproduce

  1. Connect Client A and B.
  2. Send messages M1–M3.
  3. Ban Client A.
  4. Send messages M4–M6 from B.
  5. Unban Client A and reconnect.
  6. Send more messages (M7–M8) and check ordering.

Observed

  • Messages sometimes appear out-of-order.
  • Persists after client restarts.
  • Affects some clients intermittently.

Expected
All messages should appear in chronological order.

Suspected causes

  • Server query may lack deterministic ORDER BY.
  • Client merge logic may misplace messages.
  • Timestamp collisions or sequence-ID mismatch.

Next steps

  • Ensure server returns messages in a consistent order.
  • Client should sort messages by sequence ID before rendering.
  • Add a test for ordering after ban/unban + reconnect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggoPull requests that update go code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions