Typing Indicators

In a live chat, the visitor and the agent each see a small italic "X is typing…" line when the other side is composing a message. No DB writes; messages aren't broadcast; the indicator just appears and disappears.

On the agent side

When the visitor is typing, the message thread shows:

Visitor is typing…

The line lives below the last message and clears automatically after the visitor stops for 3 seconds. It also clears the moment a new visitor message arrives (the message replaces the placeholder).

On the visitor side (widget)

Similar — when the agent is typing, a line under the chat scroll area says:

Sarah is typing…

We use the agent's name from the reply form. Auto-clears after 3 seconds of silence.

How it works under the hood

It's a Pusher / Reverb "client event" — the same WebSocket channel that carries new messages is used to broadcast lightweight typing pings. No server-side persistence, no DB write.

Each side throttles its own pings to one per 1.5 seconds while typing — keystrokes pile up faster than the network matters, so we cap the rate.

When the indicator doesn't show

  • WebSocket disconnected — the chat falls back to polling every 15 seconds for new messages, but typing indicators are real-time only. They don't poll.
  • Visitor on slow connection — the indicator might lag visibly. Not a bug, just network reality.
  • Either side has the chat in a background tab — typing pings still send, the recipient just doesn't see them until they switch back.

Off-switch

There isn't one. Typing indicators run as part of the standard chat infrastructure, with no per-feature toggle. If you genuinely don't want them, contact us — we'd want to understand why before adding a knob.