Zum Inhalt springen

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


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).


  • 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).

The share button loads a cached text grid and image for the day. It prefers native sharing with an image, then text sharing, social deep links and finally copying the URL to the clipboard.The share button loads a cached text grid and image for the day. It prefers native sharing with an image, then text sharing, social deep links and finally copying the URL to the clipboard.

  1. Web Share API with file — navigator.share({ title, text, url, files: [pngBlob] }) after navigator.canShare({ files: [pngBlob] }) === true.
  2. Web Share API without file — same call without files.
  3. Twitter / X intent — https://twitter.com/intent/tweet?text= + URL-encoded text+url.
  4. WhatsApp deep link — https://wa.me/?text= + URL-encoded text+url.
  5. 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.


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.)


  • navigator.share throws AbortError → user dismissed; do nothing.
  • navigator.share throws 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.

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.