[codex] Add Strava-inspired share moments#107
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ohong
left a comment
There was a problem hiding this comment.
Nightly review (automated). CI is green (ci, claude-review, Vercel preview all passed), but found one finding worth fixing before merge:
Trust/correctness bug — lib/share-moments.ts "Big Build Day" moment: it fires whenever cost_usd >= 100 with no check on usage.is_verified, yet the headline text hardcodes "$X verified session". Other surfaces in this codebase (ActivityCard.tsx, post-share.ts) carefully gate cost display on verification — a JSON-uploaded, unverified session with a self-reported/inflated cost_usd would get a shareable card literally claiming "$XXX verified session," which is a user-spoofable false claim baked into the feed card and auto-generated social copy. Recommend gating that branch on usage.is_verified or dropping "verified" from the copy.
Scope creep — ShareMenu.tsx has a bunch of unrelated border-radius changes (rounded-2xl→rounded-md, rounded-[28px]/rounded-[24px]/rounded-[22px]→rounded-md, rounded-xl→rounded-sm) across the panel, swatches, and buttons that don't relate to share moments. Per CLAUDE.md scope rules, worth reverting or splitting into its own PR.
Docs: CLAUDE.md asks for a dated docs/DECISIONS.md entry for design decisions alongside the CHANGELOG update — only CHANGELOG was touched here; docs/strava-growth-shareability.md is a nice rationale doc but not a substitute.
Nothing else stood out — invite URL construction is safe (usernames are server-validated), no SSR/hydration issues, no other logic bugs found. Not calling this "ready to merge" until the verified-cost mislabeling is addressed.
Generated by Claude Code
Summary
Adds a Strava-inspired shareability layer for Straude session cards. Each post now gets a derived share moment that turns raw activity data into a social reason to share: Output PR, Big Build Day, Toolkit Flex, Receipts Attached, Community Pull, Build Log, or Share Ready.
Why
Strava makes runs and rides shareable by turning activity data into visible progress, identity signals, social recognition, and friendly rivalry. This applies the same data/content-loop principle to Straude: code with AI -> push usage -> package the session as proof-of-work -> share/invite -> new builder joins and pushes.
Product rationale and follow-up ideas are documented in
docs/strava-growth-shareability.md, with inspiration from:What changed
buildShareMoment()and invite URL helpers for data-derived share angles./join/[username]invite copy action from the share panel.Validation
bun --cwd apps/web test-> 65 files / 533 tests passed.bun --cwd apps/web typecheck-> passed.bun --cwd apps/web lint-> passed.bun --cwd apps/web build-> passed after allowing network for Next font fetches.