feat: sync protos, add cash tip action and push chat type#516
Merged
Conversation
Carry the thumbnail rendition's BlurHash on ProfilePicture and render it as an instant blurred preview while a counterpart's avatar downloads, instead of a blank gradient. Ported from android code-payments/code-android-app#1131 (lean scope: BlurHash + placeholder; the existing largest-thumbnail selection is kept, avatars are fixed-size). - BlurHash: public-domain decoder + process-wide decode cache (FlipcashUI) - ProfilePicture.thumbnailBlurhash, read off the selected thumbnail rendition - SQLite: persist the blurhash (new column, SQLiteVersion 25 -> 26) - ContactAvatarView renders the blurhash while imageData is nil (precedence: bytes -> blurhash -> monogram) - Threaded through the tip/DM counterpart surfaces (conversation title + profile card, tip conversations list) - Tests: BlurHash decoder vectors; ProfilePicture blurhash extraction + legacy JSON back-compat
Adds a /fetch-protos skill that regenerates the Core and Payments Swift bindings via Scripts/run, verifies the build, and dispatches a proto-change-tracer agent to map field/RPC changes through the service -> client -> consumer chain.
Regenerate Core and Payments bindings. Core adds three additive fields: CashContent.action, Metadata.is_hidden, and Payload.chat_metadata. Wire CashContent.action through the chat stack: ConversationMessage carries a CashAction, persisted in a new conversation_message.cashAction column (SQLiteVersion 26 -> 27), and ChatCashContent renders a shared sent/tipped caption in both the in-app cash card and the notification transcript. Add NotificationPayload.chatType(_:) exposing the push's DM kind from Payload.chat_metadata, alongside the existing chatID/isContactJoin accessors. is_hidden is intentionally left unwired (no user blocking yet).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Regenerate the Core and Payments (OCP) Swift bindings and wire the two new Core proto fields that need consumers. Adds the
/fetch-protosskill +proto-change-traceragent used to produce this.Proto sync
Both domains regenerated via
Scripts/run. Only Core changed, with three additive fields:chat.Metadata.is_hiddenmessaging.CashContent.action(Action { SENT, TIPPED })push.Payload.chat_metadata(+ChatMetadata { sending_user_id, type })Note on
.grpc.swiftchurn — droppedSendableA large chunk of the
*.grpc.swiftdiff is a codegen-style change from the currentprotoc-gen-grpc-swift-2plugin, not a semantic change. The plugin stopped emitting: Sendableon the caseless namespace enums (e.g.Flipcash_Email_V1_EmailVerification, its nestedMethod, and per-RPC enums). These enums have no cases — they're uninhabited namespaces, so no instance can ever exist andSendableon them is a no-op. Everything stateful keeps its conformance:ClientProtocol: Sendable,struct Client<Transport>, and allResult: Sendablebounds are intact, as are the message types in*.pb.swift. The app builds clean, consistent with dropping a no-op conformance.Cash tip action (
CashContent.action)Threaded end-to-end so a tipped payment reads differently from a plain send:
ConversationMessagecarries aCashAction, mapped from the proto (unknown →.sent, per the proto contract)conversation_message.cashActioncolumn —SQLiteVersion26 → 27ChatCashContentgainsisTip+ a sharedcaption(isFromSelf:isTip:)used by both the in-app cash card and the notification transcript ("You tipped" / "You received a tip")Push chat type (
Payload.chat_metadata)NotificationPayload.chatType(_:)exposes the push's DM kind, symmetric with the existingchatID/isContactJoinaccessors. Behavioral routing (e.g. tip-DM notification handling) is deferred — no consumer needs it yet.Not wired
is_hiddenis intentionally left unwired — there's no user-blocking flow yet, so the flag is always false.Testing
.sentdefault, and all threechatTypecasescashActionround-trip) are included but currently can't run: theFlipcashTeststarget has a pre-existing compile break under the current toolchain, unrelated to this change.