feat: implement patch#38
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (35)
📝 WalkthroughWalkthroughThis PR introduces post bookmarking, discussion threads on packs/topics/questions with tabbed navigation, post search integration, comprehensive feed/post-card improvements, home timeline selection between "everyone" and "following", and a tabified profile page with feed/saved/badges/stats/packs/games tabs. ChangesPost Bookmarking Feature
Discussion System & Tabbed Architecture
Home Feed Enhancements & Timeline Selection
Post Search Integration
Profile Page Refactor
Content & Infrastructure Updates
Sequence Diagram(s)sequenceDiagram
actor User
participant UI as Post Feed UI
participant API as Post Service
participant DB as Database
participant Cache as React Query Cache
User->>UI: Click bookmark button on post
UI->>Cache: Apply optimistic update (myBookmarked=true)
UI->>API: setPostBookmark(postId, bookmarked=true)
API->>DB: Insert post_bookmark record
DB-->>API: Success
API-->>UI: Return bookmarked=true
UI->>Cache: Confirm optimistic update
UI->>User: Show "Saved" toast & filled icon
Note over User,Cache: Bookmark persisted across feed, profile Saved tab, and other caches
sequenceDiagram
actor User
participant DiscussionUI as Discussion Section
participant API as Comment Service
participant DB as Database
participant Cache as Query Cache
User->>DiscussionUI: Scroll into view (pack/topic/question discussion)
DiscussionUI->>API: listThreadsByPack/Topic/Question(cursor)
API->>DB: Query root comments, then tree members, build reply forest
DB-->>API: Thread hierarchy
API-->>DiscussionUI: Paginated root threads with nested replies
DiscussionUI->>User: Render comment tree (collapsible branches)
User->>DiscussionUI: Click Reply on comment (depth < 3)
DiscussionUI->>DiscussionUI: Set replyToId, focus composer
User->>DiscussionUI: Submit reply text
DiscussionUI->>API: createComment(body, parentId, targetId)
API->>DB: Insert comment, link to parent
DB-->>API: New comment created
API-->>Cache: Invalidate thread list query
Cache->>DiscussionUI: Refetch threads
DiscussionUI->>User: Display reply in tree, clear draft
sequenceDiagram
actor User
participant Nav as Route/Tabs
participant HomeFeed as Home Feed
participant API as Post Service
participant Cache as Query Cache
User->>Nav: Click "Everyone" / "Following" timeline toggle
Nav->>Nav: setFeed("everyone" | "following"), update URL ?feed=...
HomeFeed->>HomeFeed: Derive homeFeed prop from route state
HomeFeed->>API: homePostListInfiniteOptions(feed="everyone" or "following")
API->>Cache: Query/invalidate feed cache by feed type
Cache-->>HomeFeed: Load posts from correct feed
HomeFeed->>User: Render timeline for selected audience
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
Summary by CodeRabbit
Release Notes
New Features
Improvements
Chores