Closed camelPhonso closed 1 month ago
🤖 meep morp!
This Issue is now marked as stale because there has been no activity for a while.
🔎 The Issue will be automaticaly unassigned and moved to the Backlog if it doesn't receive new activity in the next 7 days.
💡 To unstale this Issue please push any commits that are ready or provide an update in the comments.
!request I'd like to take on the issue.
I'd like to take on the issue.
This issue has a pr in review at the moment :)
Description of the Bug
In our seed data there is a message unread for each of the test users in separate conversations.
When we first start the environment we can see the notification dot over the button linking to
/conversations
but once we navigate to that route the notification is not showing in the appropriate conversation.From
/
From
/conversations
Similarly, if you send a new message and then log in as the other user you can see that the
/conversations
link shows a notification dot but the relevantConversationCard.tsx
does not.What should happen instead
The conversation that previews "Unread to refugee" should be marked as unread when you are logged in as the refugee. The same should happen with the last conversation on the list when you log in as the donor.
Note: Marking a conversation as unread by clicking the dropdown menu on the
ConversationCard.tsx
still works as expected.Steps to reproduce this bug
npx supabase db reset
if you have been interacting with the data before this/conversations
routeWhat could we do to solve this bug?
ConversationsList.tsx
sets a state that is intended to map through the list of all conversations and map out an array of theconversation_id
value of each conversation that has notifications (check the database schema for this). That list is passed down to theConversationCard.tsx
to allow an evaluation that decides whether the notification dot should be showing.This at least is how it was working before, but that logic seems to have been lost maybe in a merge.
The solution may look different now, but will surely need touching those files.
🧪 This will need some E2E tests being added to avoid further regression. Cypress is still frighteningly blind to our messaging right now.
Assignment
This issue is free for anyone to take