mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
fix(acquisition): use recognized privacy markers
This commit is contained in:
1 parent
4a57f31615
commit
0f9c9c2e15
5 files changed
+17
-6
No files matched your search
@@ -30,6 +30,7 @@ import { getPendingInviteCode, clearPendingInviteCode } from "../../src/lib/pend
|
||||
import { checkClipboardForInviteCode } from "../../src/lib/clipboardInviteOffer";
|
||||
import { ApiError } from "../../src/lib/apiClient";
|
||||
import { hasSeenPairedUnlock } from "../../src/lib/pairedUnlockSeen";
|
||||
import { PAIRING_PRIVACY_SUMMARY } from "../../src/lib/pairingPrivacyCopy";
|
||||
|
||||
export default function PairingScreen() {
|
||||
const { fetchCouple, fetchUser, couple, partner, sealedCount, user, isLoading: isAuthLoading } = useAuthStore();
|
||||
@@ -536,7 +537,7 @@ export default function PairingScreen() {
|
||||
<Ionicons name="link" size={40} color={colors.text} />
|
||||
</LinearGradient>
|
||||
<Text style={styles.subtitle}>
|
||||
Answer privately. Compare your shared discoveries together.
|
||||
{PAIRING_PRIVACY_SUMMARY}
|
||||
</Text>
|
||||
</Animated.View>
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import { PAIRING_PRIVACY_SUMMARY } from "../../lib/pairingPrivacyCopy";
|
||||
|
||||
describe("PAIRING_PRIVACY_SUMMARY", () => {
|
||||
it("explains what each response style reveals before a user answers", () => {
|
||||
expect(PAIRING_PRIVACY_SUMMARY).toContain("Vote-style answers reveal shared outcomes");
|
||||
expect(PAIRING_PRIVACY_SUMMARY).toContain("Text, audio, photo, and who-likely responses are shown after you both answer");
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
export const PAIRING_PRIVACY_SUMMARY = "Vote-style answers reveal shared outcomes. Text, audio, photo, and who-likely responses are shown after you both answer.";
|
||||
@@ -73,11 +73,12 @@ describe('/join/[code] JoinClient', () => {
|
||||
expect(source).not.toContain('Neither of you sees the other’s individual answers.')
|
||||
})
|
||||
|
||||
it('marks the invite-code surface out of PostHog DOM capture and replay', async () => {
|
||||
it('uses PostHog-recognized selectors to exclude the invite-code DOM from capture and replay', async () => {
|
||||
const source = await readFile(componentPath, 'utf8')
|
||||
|
||||
expect(source).toContain('data-ph-no-capture')
|
||||
expect(source).toContain('data-ph-mask')
|
||||
expect(source).toContain('ph-no-capture ph-mask')
|
||||
expect(source).not.toContain('data-ph-no-capture')
|
||||
expect(source).not.toContain('data-ph-mask')
|
||||
})
|
||||
|
||||
it('shows a clear fallback message for a malformed invite code', async () => {
|
||||
|
||||
@@ -127,7 +127,7 @@ export function JoinClient({ code }: { code: string }) {
|
||||
: 'Join to compare answers together. Vote-style questions reveal shared outcomes; open text, audio, photo, and who-likely responses can be visible to you both after you have each answered.'
|
||||
|
||||
return (
|
||||
<main className="min-h-screen bg-gradient-to-b from-background-light to-background" data-ph-no-capture data-ph-mask>
|
||||
<main className="min-h-screen bg-gradient-to-b from-background-light to-background ph-no-capture ph-mask">
|
||||
<header className="py-6 px-6 border-b border-white/5">
|
||||
<div className="max-w-4xl mx-auto flex items-center gap-4">
|
||||
<Link href="/" className="flex items-center gap-2 text-white/70 hover:text-white transition-colors">
|
||||
@@ -150,7 +150,7 @@ export function JoinClient({ code }: { code: string }) {
|
||||
<h1 className="text-3xl sm:text-4xl font-bold mb-3">You've been invited to compare answers</h1>
|
||||
<p className="text-white/70 mb-10">{desktopCopy}</p>
|
||||
|
||||
<section className="surface-solid p-6 sm:p-8 mb-6" aria-labelledby="invite-code-heading" data-ph-no-capture data-ph-mask>
|
||||
<section className="surface-solid p-6 sm:p-8 mb-6 ph-no-capture ph-mask" aria-labelledby="invite-code-heading">
|
||||
<h2 id="invite-code-heading" className="text-white/70 text-sm font-medium mb-3">Your invite code</h2>
|
||||
<p
|
||||
className="text-4xl sm:text-5xl font-bold tracking-[0.3em] text-primary mb-6"
|
||||
|
||||
Reference in new issue
Block a user