Skip to content

#219 Typing indicators (ephemeral, never stored) FIXED#261

Open
felladaniel36-hash wants to merge 2 commits into
codebestia:mainfrom
felladaniel36-hash:#219-Typing-indicators-(ephemeral,-never-stored)-FIX
Open

#219 Typing indicators (ephemeral, never stored) FIXED#261
felladaniel36-hash wants to merge 2 commits into
codebestia:mainfrom
felladaniel36-hash:#219-Typing-indicators-(ephemeral,-never-stored)-FIX

Conversation

@felladaniel36-hash

Copy link
Copy Markdown

Description

Implemented real-time typing_start and typing_stop Socket.IO event handling relayed via Pub/Sub conversation rooms with strictly zero database writes:

  • Backend Pub/Sub Relaying & Sanitization: Replaced blind broadcast handlers in messaging.ts with explicit payload construction { conversationId, userId, ...(deviceId ? { deviceId } : {}) }, permanently guaranteeing that draft message content is never relayed. Fast-path verifies room membership via socket.rooms.has(conversationId) to avoid unnecessary database queries.
  • Auto-Expiration & Event Cleanup: Added per-socket typingTimers tracking active typing sessions with a 5-second inactivity timeout. Automatically dispatches typing_stop upon timer expiration, and instantly clears typing indicators when a socket disconnects or emits send_message.
  • Frontend Emitters Integration: Instrumented MessageInput.tsx with debounced timers (2000ms delay) to emit real-time typing events as users type and immediately stop typing indicators upon sending text or confirming Soroban token transfers.
  • Build & Type Fixes: Resolved TypeScript build issues in conversations.ts and treasury.ts.
  • Unit Testing: Created comprehensive test suite apps/backend/src/__tests__/typing.test.ts validating all acceptance criteria (zero DB writes, timeout auto-clearing, room-member isolation, content stripping, and disconnect cleanup).

Type of change

  • Bug fix

  • New feature

  • Documentation update

  • Other

Checklist

  • I have read the contributing guidelines

  • I have tested my changes locally

  • My code follows the project's coding standards

CLOSE #219

@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@felladaniel36-hash Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@felladaniel36-hash

Copy link
Copy Markdown
Author

PLEASE REVIEW... AND PING ME BACK

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.

Typing indicators (ephemeral, never stored)

1 participant