Merge solo sealed answers that unlock on pairing into staging

This commit is contained in:
jjbrunton committed 2026-08-30 19:49:51 +01:00
commit 7d392e756d
26 files changed
+510 -75

No files matched your search

+2
View File
@@ -4,6 +4,8 @@ import { apiRequest } from "./apiClient";
export interface CoupleStateResponse {
couple: Couple | null;
partner: Profile | null;
/** Count of this user's banked answers with no couple yet (couple_id IS NULL). */
sealed_count: number;
}
export interface CoupleMutationResponse {
+14
View File
@@ -0,0 +1,14 @@
/**
* Builds the message shared when inviting a partner to pair. Once the inviter has
* sealed answers banked (answered questions solo, before a partner joined), the
* copy leads with that earned value instead of a plain invite, because it gives
* the recipient a concrete reason to join right away.
*/
export function buildInviteShareMessage(inviteCode: string, sealedCount: number): string {
const link = `https://sauci.app/join/${inviteCode} (or enter code ${inviteCode} in the app)`;
if (sealedCount > 0) {
const noun = sealedCount === 1 ? "question" : "questions";
return `Join me on Sauci! I have already answered ${sealedCount} ${noun} about us. Tap this link to unlock them: ${link}`;
}
return `Join me on Sauci! Tap this link to pair up instantly: ${link}`;
}