Skip to content

chore(deps): move to flipcash2 contract dd5e92db - #1504

Merged
bmc08gt merged 4 commits into
code/cashfrom
chore/flipcash2-contract-dd5e92db
Sep 18, 2026
Merged

bmc08gt merged 4 commits into
code/cashfrom
chore/flipcash2-contract-dd5e92db

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Moves Android onto flipcash2 contract dd5e92db and scaffolds the seams it opens.

Blocked on code-payments/flipcash2-client-protocol#16. This branch pins flipcash2-client-protocol = "0.10.0", which is not published yet, so CI cannot resolve it — expect com.flipcash:flipcash2-client-protocol:0.10.0 FAILED until that PR merges and publish.yml runs. Draft until then. The work here was built against the client checkout through protoLocalRoot / protoLocalPackages, which CI never sees.

The required migration

EmojiReaction.reacted_by_self (bool) is replaced in place by self_reactor (Reactor). Android had call sites across seven files; all of them now read the reactor, and a repo-wide grep for reactedBySelf comes back empty. Reactor gained a version, which is the reactor list's sort key now — descending, newest first — so reacted_ts is display-only.

The watermark rule matters here: an emoji's version has to be kept after its count reaches zero, or a delayed lower-versioned ADDED resurrects an emptied emoji.

Scaffolded, not implemented

Three commits ahead of the pin bump, in the order the contract makes sense in:

  • View-mode redaction and mute/unmute — the ViewMode plumbing on the read RPCs, MuteChat / UnmuteChat through the service and controller layers, and the ViewerState / MuteState domain types.
  • The Reporting service — the Api / Service / Repository / Controller quad, ReportTarget, ReportError, and DI wiring for the new flipcash.reporting.v1 package.

What is deliberately absent, because it is feature work rather than contract work: there is no mute-duration picker, no countdown for a lapsing timed mute, and no notification suppression on the new ChatMetadata.muted push flag. ViewerStateChanged is handled in EventStreamDelegate as a documented no-op — chat_metadata has no column for it, so persisting viewer state needs a Room schema migration that does not belong in a contract sync.

Eight targeted compile tasks pass against the local override.

flipcash2 replaced EmojiReaction.reacted_by_self (bool) with a
self_reactor Reactor message, so a reaction now carries who reacted and
when instead of just a flag. Reactor also gains a version field.

Update the domain model, both proto-to-domain mapping directions, Room
serialization (EmojiReactionSerialized/ReactorSerialized), and the
local reaction-overlay logic in EventStreamDelegate, which has to
derive self status itself since ReactionUpdate carries no self flag:
it compares the update actor to the signed-in user and uses the
ADDED/REMOVED action to set or clear self_reactor.
Threads the flipcash2 ViewMode (FULL / FULL_OR_REDACTED / REDACTED)
through GetChat, GetMessage(s), and GetDelta so a caller can ask for
redacted content instead of full and the response can report a message
as ChatMessage.redacted.

Adds MuteChat/UnmuteChat as a new pair of RPCs on Chat: MuteState
(Until/Forever) and ViewerState (per-caller chat state, currently just
mute) get domain models, ChatMetadata and MetadataUpdate carry the new
ViewerStateChanged case, ChatController/ChatRepository gain muteChat/
unmuteChat, and MuteChatError/UnmuteChatError join the error taxonomy.

Two things are deliberately left as scaffolding for the muting feature
itself, not built here:
- EventStreamDelegate acknowledges ViewerStateChanged without
  persisting it — there is no chat_metadata column for viewer state
  yet, and adding one is a Room migration that belongs with that
  feature's storage work.
- PushChatMetadata.muted is threaded through from the proto so it
  reaches NotificationPayload, but nothing yet uses it to suppress a
  notification.
flipcash2 adds a standalone Reporting service (Report RPC) for filing
a report against a user, chat, message, or blob, with an optional
free-form description.

Adds the full Api/Service/Repository/Controller quad following the
existing per-domain layering (see ResolverApi/ResolverService for the
same generated-class-name-collision pattern via an import alias), a
ReportTarget domain sealed interface mirroring the request's oneof,
placed flat under models/ like the existing ResolveIdentifier rather
than in a new subpackage, and ReportError in the shared error
taxonomy. Wired into FlipcashModule alongside the other repositories.

No caller wires this up yet; that is UI work for a later change.
@bmc08gt bmc08gt self-assigned this Sep 18, 2026
@github-actions github-actions Bot added type: chore Maintenance, config, CI/CD area: network gRPC, connectivity, API, exchange rates area: build-system Gradle, convention plugins, build-logic and removed type: chore Maintenance, config, CI/CD labels Sep 18, 2026
@bmc08gt
bmc08gt marked this pull request as ready for review September 18, 2026 22:56
@bmc08gt
bmc08gt merged commit a37ec79 into code/cash Sep 18, 2026
3 of 4 checks passed
@bmc08gt
bmc08gt deleted the chore/flipcash2-contract-dd5e92db branch September 23, 2026 16:45
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant