Skip to content

feat: add real-time "seen" status for messages - #106

Open
jessmed749 wants to merge 2 commits into
Longhorn-Developers:mainfrom
jessmed749:feature/seen-messages
Open

feat: add real-time "seen" status for messages#106
jessmed749 wants to merge 2 commits into
Longhorn-Developers:mainfrom
jessmed749:feature/seen-messages

Conversation

@jessmed749

@jessmed749 jessmed749 commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Feature: Seen Status for Messages

Overview

Adds real-time "seen" indicators to messages, similar to iMessage/WhatsApp behavior.


Changes

page.tsx

  • Fixed subscription callback to properly handle UPDATE events
  • Ensures is_read updates propagate in real-time via Supabase
  • When a receiver opens a chat, markMessagesAsRead triggers an UPDATE that syncs across clients

ChatWindow.tsx

  • Added "Seen" label below messages
  • Displays only on the most recent outgoing message where is_read === true
  • Mimics modern messaging UX (only last seen message shows status)

Behavior

  • When receiver opens chat → messages marked as read
  • Supabase UPDATE triggers → sender UI updates instantly
  • "Seen" appears under latest read message only

Notes

  • Uses existing is_read field
  • No breaking changes

@jessmed749 jessmed749 closed this Apr 3, 2026
@jessmed749 jessmed749 reopened this Apr 3, 2026
@jessmed749 jessmed749 changed the title Feature/seen messages feat: add real-time "seen" status for messages Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant