Skip to content

Fix conversation list desynchronization when archiving #90

@exedev-shelley

Description

@exedev-shelley

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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions