Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(MessagesList): clean up expired, removed messages from the chat #12258

Merged
merged 3 commits into from
May 6, 2024

Conversation

Antreesy
Copy link
Contributor

@Antreesy Antreesy commented May 3, 2024

☑️ Resolves

Tested cases:
// group is older than any known newGroup
[1][2,3],[4,5] => [6] (6 - clear history) - remove all old groups
// at least one message from group is no longer in the store
[1][2,3],[temp-4] => [1][2,3],[4] - replace temporary message
[1][2,3],[4],[5,6] => [1][2,3],[4] (4 - message expiration, all messages after 4 were removed)
[1][2,3],[4,5] => [1][2,3],[6] (mocked case, whole group was removed)
[1][2,3],[4,5] => [1][2,3],[4],[6] (mocked case, non-first message was removed)
[1][2,3],[4,5] => [1][2,3],[5],[6] (mocked case, first message was removed)

🖌️ UI Checklist

🖼️ Screenshots / Screencasts

🏚️ Before 🏡 After
image image

🚧 Tasks

  • clear expired and purged messages:
    • from the top of the list
    • from the middle of the list
  • Add test coverage for soft update
    • Follow-up: move soft-update logic to test-able composable

🏁 Checklist

  • 🌏 Tested with Chrome, Firefox and Safari or should not be risky to browser differences
  • 🖥️ Tested with Desktop client or should not be risky for it
  • ⛑️ Tests are included or not possible

@Antreesy Antreesy added this to the 💙 Next Major (30) milestone May 3, 2024
@Antreesy Antreesy requested a review from DorraJaouad May 3, 2024 12:14
@Antreesy Antreesy self-assigned this May 3, 2024
@Antreesy Antreesy force-pushed the fix/noid/cleanup-chat branch 2 times, most recently from 17284c3 to 9ff4f61 Compare May 3, 2024 19:28
@Antreesy Antreesy requested a review from DorraJaouad May 6, 2024 09:13
Copy link
Contributor

@DorraJaouad DorraJaouad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests look good overall 🦅

src/components/MessagesList/MessagesList.spec.js Outdated Show resolved Hide resolved
src/components/MessagesList/MessagesList.spec.js Outdated Show resolved Hide resolved
…jects and timestamps, increase coverage

Signed-off-by: Maksim Sukharev <[email protected]>
… in the store, ensure soft update is reactive

Signed-off-by: Maksim Sukharev <[email protected]>
@Antreesy
Copy link
Contributor Author

Antreesy commented May 6, 2024

/backport to stable29

@Antreesy Antreesy merged commit 7278e35 into main May 6, 2024
46 checks passed
@Antreesy Antreesy deleted the fix/noid/cleanup-chat branch May 6, 2024 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants