"Payload drop" scan experience — hand over a link or code on scan
CI / policy (push) Has been cancelled
CI / backend (push) Has been cancelled
CI / profile (push) Has been cancelled
CI / mobile (push) Has been cancelled

Experience #8: a published card can carry a payload that's shown prominently on
scan — a primary link CTA, or a discount/access code with tap-to-copy.

- Backend: demo publish accepts an optional payload {kind, label, value},
  stored in definition.profile.payload (flows through the public profile). Test
  extended to assert it. Gate green (120 tests).
- Web ([handle].astro): renders a "link" payload as a big CTA button and a
  "code" payload as a dashed chip with copy-on-tap. astro check clean.
- Mobile (publish.tsx): payload kind chips (None/Link/Code) + label + value,
  sent with publishToWeb.

Verified live: publish with a code payload -> profile shows a copyable CARD20
chip; link payload -> CTA button.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
Omar Sobh
2026-06-05 20:49:55 -05:00
co-authored by Claude Opus 4.8
parent 895ca4993a
commit a61d0221d1
6 changed files with 149 additions and 3 deletions
+1
View File
@@ -56,6 +56,7 @@ export interface PublishPayload {
links: { label: string; url: string }[];
welcomePrompt?: string;
welcomeMessage?: string;
payload?: { kind: "link" | "code"; label: string; value: string };
}
/** Publish a demo card to the web (no auth) → a real, scannable profile URL. */