Skip to content

social: the feed, posting, and publishing a note - #3

Merged
zacktiger merged 1 commit into
mainfrom
worktree-social-layer
Aug 4, 2026
Merged

zacktiger merged 1 commit into
mainfrom
worktree-social-layer

Conversation

@zacktiger

@zacktiger zacktiger commented Aug 4, 2026 •

Copy link
Copy Markdown
Owner

Adds Rollout 2's in-app half: an identity, a published set, and a third tab to read it from.

Two composers, deliberately. The note editor gains one menu item -- Share to the feed -- which confirms before it does anything; the feed's own composer states the handle and the word Public before a word is typed and writes nothing to the private library. Nothing on Notes or To-dos links into the feed, and the app still opens on Notes.

A post is a note that was public from birth. bornPublic is the only structural difference between it and a note shared later, which buys posts threads, updates and the follow-through loop for free, and keeps them out of the notes list. Both go through one publish path.

Feed order is reverse chronological on the thread's last activity, not on creation -- a six-week-old commitment coming back with "done" is the event worth showing, and composeFeed has nowhere to put a ranking signal.

Safety ships with the first public row rather than later, per App Store 1.2: report, block (symmetric, and it unfollows), and a reports table with a queue index.

No server yet. db/social-repo.ts is the seam -- every social read and write is one of its methods -- and lib/social-seed.ts stands in for other users until there is a real one. The Supabase migration is written and not yet applied; its RLS adds exactly one policy, "is this row public", with feed composition left in testable code.

docs/product.md rules 1 and 3 forbade a compose-to-feed box; amended in this commit, with the structural guard they were protecting kept.

Claude-Session: https://claude.ai/code/session_017DRL4dVgg5oebLSTenQv2G

Summary by CodeRabbit

  • New Features
    • Added a Feed tab for browsing posts in reverse chronological order.
    • Users can create and publish public posts, share notes to the Feed, and view published threads.
    • Added profiles with handles, bios, follower counts, following, and profile editing.
    • Added likes, follows, views, blocking, reporting, sharing, and post removal.
    • Added onboarding for claiming a profile handle.
  • Bug Fixes
    • Private Notes no longer display public Feed posts.
  • Documentation
    • Updated product and rollout documentation for the Feed experience and publishing rules.

Adds Rollout 2's in-app half: an identity, a published set, and a third
tab to read it from.

Two composers, deliberately. The note editor gains one menu item -- Share
to the feed -- which confirms before it does anything; the feed's own
composer states the handle and the word Public before a word is typed and
writes nothing to the private library. Nothing on Notes or To-dos links
into the feed, and the app still opens on Notes.

A post is a note that was public from birth. `bornPublic` is the only
structural difference between it and a note shared later, which buys posts
threads, updates and the follow-through loop for free, and keeps them out
of the notes list. Both go through one publish path.

Feed order is reverse chronological on the thread's last activity, not on
creation -- a six-week-old commitment coming back with "done" is the event
worth showing, and `composeFeed` has nowhere to put a ranking signal.

Safety ships with the first public row rather than later, per App Store
1.2: report, block (symmetric, and it unfollows), and a reports table with
a queue index.

No server yet. `db/social-repo.ts` is the seam -- every social read and
write is one of its methods -- and `lib/social-seed.ts` stands in for other
users until there is a real one. The Supabase migration is written and not
yet applied; its RLS adds exactly one policy, "is this row public", with
feed composition left in testable code.

docs/product.md rules 1 and 3 forbade a compose-to-feed box; amended in
this commit, with the structural guard they were protecting kept.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017DRL4dVgg5oebLSTenQv2G
@zacktiger
zacktiger merged commit fc154fd into main Aug 4, 2026
1 check was pending
@zacktiger
zacktiger deleted the worktree-social-layer branch August 4, 2026 17:24
@coderabbitai

coderabbitai Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a8b98974-2c95-49df-9bd0-a4a50e68f5a3

📥 Commits

Reviewing files that changed from the base of the PR and between f21e7c9 and 80ab582.

📒 Files selected for processing (26)
  • apps/mobile/src/app/(tabs)/_layout.tsx
  • apps/mobile/src/app/(tabs)/index.tsx
  • apps/mobile/src/app/(tabs)/social.tsx
  • apps/mobile/src/app/_layout.tsx
  • apps/mobile/src/app/handle.tsx
  • apps/mobile/src/app/note/[id].tsx
  • apps/mobile/src/app/post/[id].tsx
  • apps/mobile/src/app/post/new.tsx
  • apps/mobile/src/app/profile/[handle].tsx
  • apps/mobile/src/components/feed-card.tsx
  • apps/mobile/src/components/icon.tsx
  • apps/mobile/src/db/migrations.ts
  • apps/mobile/src/db/notes-repo.ts
  • apps/mobile/src/db/social-repo.ts
  • apps/mobile/src/lib/format.ts
  • apps/mobile/src/lib/social-seed.ts
  • apps/mobile/src/store/social-store.tsx
  • docs/plan-rollout-2.md
  • docs/product.md
  • packages/core/src/index.ts
  • packages/core/src/note.ts
  • packages/core/src/social.test.ts
  • packages/core/src/social.ts
  • packages/core/src/types.ts
  • packages/db/src/schema.ts
  • supabase/migrations/20260804200000_social.sql

📝 Walkthrough

Walkthrough

The change adds a local social platform with feed composition, public note publishing, profiles, follows, likes, views, blocks, reports, and mobile screens for feed, posts, handles, and profiles.

Changes

Social platform

Layer / File(s) Summary
Social domain contracts and database schema
packages/core/src/*, packages/db/src/schema.ts, supabase/migrations/...
Defines publishing, feed, profile, URL, preview, and report logic. Adds social tables, constraints, indexes, and access policies.
Mobile social persistence and state
apps/mobile/src/db/*, apps/mobile/src/store/social-store.tsx, apps/mobile/src/lib/*
Adds SQLite social persistence, seed data, timestamp formatting, and the SocialProvider state layer.
Feed tab and feed presentation
apps/mobile/src/app/(tabs)/*, apps/mobile/src/components/*, docs/*
Adds the Feed tab, filtering controls, animated feed cards, empty states, icons, and product rollout documentation.
Publishing and post screens
apps/mobile/src/app/note/[id].tsx, apps/mobile/src/app/post/*
Adds note sharing and unsharing, direct post creation, published-thread display, and social actions.
Handles and profile screens
apps/mobile/src/app/handle.tsx, apps/mobile/src/app/profile/[handle].tsx
Adds handle claiming, profile editing, profile statistics, follow and like actions, and block controls.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Feed
  participant SocialProvider
  participant SocialRepo
  participant FeedCard
  Feed->>SocialProvider: request feed state and scope
  SocialProvider->>SocialRepo: read mirrored feed items
  SocialRepo-->>SocialProvider: return filtered social data
  SocialProvider-->>Feed: provide composed feed
  Feed->>FeedCard: render feed item
  FeedCard->>SocialProvider: toggle like
  SocialProvider->>SocialRepo: persist reaction
Loading

Poem

I’m a rabbit with a feed to share,
New posts hop through everywhere.
Profiles bloom and likes take flight,
Notes turn public when the path is right.
Squeak—social state now feels just right!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch worktree-social-layer

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant