Skip to content

WebSocket text messages push empty heard[] until page refresh #398

@pskillen

Description

@pskillen

Type: bug | Area: WebSocket / text messages / heard

Problem

When viewing a message channel and a new message arrives over the WebSocket (live prepend), the message card shows 0 heard and does not update until a full page refresh. After refresh, REST list returns the correct heard count.

Reproduced on the messages page while staying on the active channel (message appears in the list in realtime, but heard count is wrong).

Likely cause

TextMessageWebSocketNotifier serializes via TextMessageWSSerializer.get_heard(), which only populates observations when original_packet.prefetched_observations exists (Meshtastic MessagePacket path). Otherwise it returns [].

MeshCore rows use original_mc_packet + MeshCorePacketObservation; REST TextMessageSerializer.get_heard() handles both — WS path does not mirror that yet. Notifier also does not prefetch observations at notify time.

Code: Meshflow/ws/serializers.py (TextMessageWSSerializer), Meshflow/ws/services/text_message.py, compare Meshflow/text_messages/serializers.py (get_heard).

Acceptance criteria

  • Live WS message on the active channel shows correct heard count (≥1 when feeders observed it) without refresh.
  • MT and MC messages both behave consistently with REST list/detail.
  • Optional: opening heard dialog from a WS-only row shows observers (or explicit empty state if truly none).

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions