"Payload drop" scan experience — hand over a link or code on scan
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:
co-authored by
Claude Opus 4.8
parent
895ca4993a
commit
a61d0221d1
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user