Skip to content

feat(chat): add persistence and coordinator#871

Merged
bmc08gt merged 7 commits into
code/cashfrom
feat/chat-persistence
Jun 5, 2026
Merged

feat(chat): add persistence and coordinator#871
bmc08gt merged 7 commits into
code/cashfrom
feat/chat-persistence

Conversation

@bmc08gt
Copy link
Copy Markdown
Collaborator

@bmc08gt bmc08gt commented Jun 5, 2026

No description provided.

bmc08gt added 6 commits June 5, 2026 08:33
New ChatId message, ChatUpdate event type for real-time chat streaming,
and objc_class_prefix additions on contact protos.

Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
Bidirectional event stream Api, Service, Repository, and Controller
plus shared chat domain models and proto ↔ domain extensions.

Domain models: ChatId, ChatMessage, MessageContent, MessagePointer,
TypingNotification, ChatType, ChatMember, ChatMetadata, MetadataUpdate,
ChatUpdate.

Uses openBidirectionalStream from OCP bidi infrastructure with
ping/pong keepalive. EventStreamingController exposes a SharedFlow
of ChatUpdate for downstream consumers.

Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
Unary RPCs for GetChat and GetDmChatFeed — Api, Service,
ChatMetadataMapper, Repository, and Controller.

Introduces ChatFeedPage domain model, GetChatError and
GetDmChatFeedError sealed classes, and Hilt wiring.

Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
All 6 messaging RPCs — GetMessage, GetMessages, GetMessagesByIds,
SendMessage, AdvancePointer, NotifyIsTyping — Api, Service,
Repository, and Controller.

Introduces ClientMessageId domain model, SendMessageError,
GetMessageError, GetMessagesError, AdvancePointerError, and
NotifyIsTypingError sealed classes, and Hilt wiring.

Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
Add three new Room tables (chat_metadata, chat_messages, chat_members)
with corresponding entities, DAOs, and ChatTypeConverters for JSON
serialization. Bump database version 18 → 19 with additive AutoMigration.

Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
Add ChatMetadataDataSource, ChatMessageDataSource, ChatMemberDataSource
wrapping the new chat DAOs with null-safe FlipcashDatabase access.
Add ChatEntityMapper for bidirectional domain ↔ entity conversion.

Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
@bmc08gt bmc08gt self-assigned this Jun 5, 2026
@github-actions github-actions Bot added type: feature New functionality area: network gRPC, connectivity, API, exchange rates area: build-system Gradle, convention plugins, build-logic area: session and removed type: feature New functionality labels Jun 5, 2026
@bmc08gt bmc08gt removed the area: build-system Gradle, convention plugins, build-logic label Jun 5, 2026
Add apps/flipcash/shared/chat/ with ChatCoordinator that bridges the
gRPC chat service controllers with Room persistence and exposes reactive
state to feature modules. Follows the ContactCoordinator pattern:
SessionListener for login hydration, DefaultLifecycleObserver for
stream lifecycle, network reconnect for re-sync.

Key capabilities:
- Feed sync via ChatController.getDmChatFeed()
- Event stream processing for real-time messages, pointers, typing
- Optimistic message sends with SENDING/SENT/FAILED status tracking
- Ephemeral typing indicators (in-memory only)
- Full reset on logout via RealSessionController

Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
@bmc08gt bmc08gt force-pushed the feat/chat-persistence branch from 6937605 to b4967f3 Compare June 5, 2026 15:57
@github-actions github-actions Bot added type: feature New functionality area: build-system Gradle, convention plugins, build-logic and removed type: feature New functionality labels Jun 5, 2026
Base automatically changed from feat/chat-setup to code/cash June 5, 2026 16:09
@bmc08gt bmc08gt merged commit 7c69924 into code/cash Jun 5, 2026
3 checks passed
@bmc08gt bmc08gt deleted the feat/chat-persistence branch June 5, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build-system Gradle, convention plugins, build-logic area: network gRPC, connectivity, API, exchange rates area: session

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant