-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Author: tonezime
Channel: #feedback
Link: https://discord.com/channels/1405685085923049482/1405686161791516873/1470826379577786591
Issue
Archiving conversations in the Shelley web UI causes the archived conversation and others to jump around in the conversation list. The archived conversation itself doesn't disappear from the list. There's a desynchronization issue that requires a page reload to fix the display.
Context
Related issue: Archived conversations currently appear in reverse-chronological order of being archived. A user has suggested that sorting by the latest message timestamp (updated_at) would be more useful, rather than updating updated_at to the archive timestamp.
See:
shelley/db/query/conversations.sql
Line 75 in 9649ecc
| SET archived = TRUE, updated_at = CURRENT_TIMESTAMP |
Workaround
Reloading the page fixes the display. A database-level workaround is available:
UPDATE conversations
SET updated_at = (
SELECT MAX(m.created_at)
FROM messages m
WHERE m.conversation_id = conversations.conversation_id
)
WHERE archived = TRUE