09 — Share artifact generation
09 — Share artifact generation
Section titled “09 — Share artifact generation”Status: Draft
Date: 2026-05-23
Owner: frontend (09 engagement-features)
Related spec: docs/superpowers/specs/2026-05-23-09-engagement-features-design.md §6–§7
Purpose
Section titled “Purpose”Sequence for the user-initiated share action: from tap → Emoji-Bid-Grid render → Web Share API attempt → fallback chain → final hand-off (Twitter intent / WhatsApp deep link / clipboard).
Inputs
Section titled “Inputs”auction_id(the date being shared, e.g.2026-06-04).- User agent capabilities:
navigator.share,navigator.canShare({files:[...]}),navigator.clipboard, secure context. - Pre-rendered artifacts:
/grid/{date}.txt(text),/grid/{date}.png(image — cached 7 d).
Sequence
Section titled “Sequence”Fallback chain (canonical order)
Section titled “Fallback chain (canonical order)”- Web Share API with file —
navigator.share({ title, text, url, files: [pngBlob] })afternavigator.canShare({ files: [pngBlob] }) === true. - Web Share API without file — same call without
files. - Twitter / X intent —
https://twitter.com/intent/tweet?text=+ URL-encoded text+url. - WhatsApp deep link —
https://wa.me/?text=+ URL-encoded text+url. - Copy URL —
navigator.clipboard.writeText(url)+ toast.
A user-visible popover under the button exposes all five as explicit choices once the primary share is invoked at least once.
Text payload shape (shared everywhere)
Section titled “Text payload shape (shared everywhere)”nowyourlink — 2026-06-04
⬜🟦🟦🟩🟩🟨🟨🟧🟧🟥🟥🟥🟥🟥🟧🟧🟨🟨🟩🟦🟦⬜⬜⬜
nowyourlink.com/day/2026-06-04(Header + 4 rows × 6 cells + footer. Identical content across /grid/{date}.txt, Web Share text, Twitter intent body, WhatsApp message body.)
Failure modes
Section titled “Failure modes”navigator.sharethrowsAbortError→ user dismissed; do nothing.navigator.sharethrows other → fall through to next step in chain.- Insecure context (no clipboard) →
<textarea>+document.execCommand('copy')fallback. - PNG render fails → drop to text-only Web Share or skip step 1; still attempts steps 2–5.
Observability
Section titled “Observability”The island emits a single anonymous event share.attempt with the step that succeeded (1–5) to CF Web Analytics (cookieless). No PII, no auction-amount data, no user id.