FluxyChat

Rooms

UI kit

ChatWindow, ChannelList, RoomInfo, AvatarStack. State still comes from the SDK.

@fluxy-chat/ui is layout. @fluxy-chat/react / @fluxy-chat/sdk own the socket.

import { ChatWindow } from "@fluxy-chat/ui";
import { useChat } from "@fluxy-chat/react";

function Room({ roomId }: { roomId: string }) {
  const { messages, sendMessage, online, typingUsers } = useChat({ roomId });

  return (
    <ChatWindow
      roomName={roomId}
      messages={messages}
      online={online}
      occupancy={{ connections: online, presenceMembers: 2 }}
      typingUsers={typingUsers}
      windowSize={300}
      enableTypingIndicators
      onSend={(text) => sendMessage(text)}
    />
  );
}

ChatWindow props (not children): transcript, composer, optional ChannelList, RoomInfo header when roomName is set, typing footer, send-error alert, connection chrome, discontinuity banner, room-reaction bursts.

PieceWhat it does
ChatWindowCap latest N (windowSize), load-older at the top, header/footer slots
RoomInfo{name} · N in chat · M watching (M = connections − presenceMembers)
ChannelListOccupancy per room, collapse, empty "Select a room…", add/leave
MessageInputEnter sends, textarea grows to 150px, emoji at caret, onSendError
MessageListPreserve scroll on prepend, loadMoreThreshold 150, empty “No messages yet”
AvatarStackselfId first, overflow +N
ParticipantListroster, self first, extra watchers
formatTypingCaption1 / 2 / N people
formatSenderTooltipname, client id, time

Drop-in widget (guest + pk_): @fluxy-chat/ui-kit FluxyChatWidget. It wires those ChatWindow props from useChat.

FluxyChatSettingsProvider gates edit / delete / react on ChatWindow. Wrap the tree to change defaults. Delete asks Delete this message?. Pass discontinuity and roomReactions / onSendRoomReaction for the Ably hole banner and footer bursts. Pass connectionStatus for reconnect chrome.