caelum0x 913ab6e6ae feat(railyard): Rithub share loops — dashboard share card, README badge, OG/twitter cards, ref counting, import-reversibility preview
Ships the Rithub row of plans/growth-loops-2026-11-19.md's
"SHARE EVERYWHERE + REASONS TO SHARE" table:

- templates/shared/share_card.tmpl: one-time dashboard share card shown
  the first time a signed-in user has >=1 imported repo (the dashboard's
  own complement of the 0-repo "Bring your code" screen). Icon-only
  share row (X, LinkedIn, Bluesky, Reddit, HN, WhatsApp, Telegram, copy
  link, native share-sheet "More"), every link carrying
  rithub.dev/?ref=<username>. Client-side localStorage gate, dismissible,
  never posts on the user's behalf.
- templates/repo/header.tmpl: "hosted on Rithub" README badge popup,
  one-click copy of the markdown snippet (badge SVG served from
  custom/public/assets/badge/hosted-on-rithub.svg, ?ref=<owner> in the
  link).
- templates/base/head_opengraph.tmpl: added the missing twitter:card/
  twitter:title/twitter:image tags on the repo/issue/diff/profile
  branches (only the homepage branch had them before), so shared repo
  links render a real preview card on X/Slack-style unfurlers.
- scripts/ref-count.py + ref-count.sh: counts ?ref=<value> visits from
  Caddy's own JSON access logs into ref-counts.json (box-only, offset-
  tracked, idempotent across cron ticks) — no new Gitea route needed.
- templates/shared/bring_your_code.tmpl: real user feedback (PremAnjwani,
  Product Hunt forum) — a compact "what moves, what doesn't" preview
  right before the GitHub import button (copied/how/not-copied/
  reversible), every fact sourced from scripts/lib/bulk-migrate.sh's
  real migrate request body and the live container's own convert-mirror
  template (verified repo-owner self-service, not site-admin-only).

Deployed to railyard-box (container restart only, no rebuild) and
verified live: repo-page OG/twitter tags + badge markdown with real
?ref, dashboard share card + import preview rendered for a real signed-
in session (disposable mail.tm QA account, repo migrated then deleted,
account deleted), share-card JS link construction verified in a Node
sandbox, ref-count script verified against a real ?ref hit and proven
idempotent on a second run, cron installed (*/15 min).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-19 18:30:31 +03:00
..