Skip to content

Add bookmarked posts hub with management tools#20

Open
hoangsonww wants to merge 3 commits into
masterfrom
codex/add-new-feature-to-app
Open

Add bookmarked posts hub with management tools#20
hoangsonww wants to merge 3 commits into
masterfrom
codex/add-new-feature-to-app

Conversation

@hoangsonww

Copy link
Copy Markdown
Owner

Summary

  • add a dedicated Bookmarked Posts page that loads saved post IDs from localStorage and fetches their data from Supabase
  • allow users to remove individual bookmarks, clear all saved posts, and access the page from the account dropdown
  • document the new bookmark library feature in the README

Testing

  • npm run lint

https://chatgpt.com/codex/tasks/task_e_68da8f15f0d4832c923b417f026c6ad6

@vercel

vercel Bot commented Sep 29, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
meadows-social-media Ready Ready Preview Comment Sep 29, 2025 2:19pm

@hoangsonww
hoangsonww requested a review from Copilot September 29, 2025 14:07
@hoangsonww hoangsonww self-assigned this Sep 29, 2025
@hoangsonww hoangsonww added documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Sep 29, 2025

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a comprehensive bookmarking system that allows users to save posts and manage them through a dedicated interface. The changes enable users to bookmark posts locally and access them through a new dedicated page with management capabilities.

  • Adds a new getPostsByIds function to fetch multiple posts while preserving order
  • Creates a complete bookmarks page with localStorage integration and management tools
  • Integrates bookmarks access into the main navigation dropdown

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
web/utils/supabase/queries/post.ts Adds query function to fetch posts by IDs with order preservation
web/pages/bookmarks.tsx Implements the main bookmarks page with localStorage sync and management features
web/components/header.tsx Adds bookmarks navigation item to user dropdown menu
README.md Documents the new bookmark library feature

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread web/pages/bookmarks.tsx Outdated
@hoangsonww

Copy link
Copy Markdown
Owner Author

This pull request introduces a major upgrade to the bookmarking feature in the social feed app, transitioning from client-side bookmarks stored in localStorage to server-side bookmarks managed via Supabase. It adds a new "Bookmark Library" page for users to view and manage their saved posts across devices, implements supporting backend and frontend logic, and updates the UI to reflect these changes.

Bookmarking Feature Upgrade

  • Replaced client-side bookmarking with server-side bookmarks stored in Supabase, enabling cross-device access and persistence.
  • Added database migration and schema for the new bookmark table, including foreign key constraints for profile_id and post_id.

Bookmark Library Page

  • Implemented web/pages/bookmarks.tsx, a new page for users to view, remove, and bulk-clear their bookmarks, including logic to migrate legacy localStorage bookmarks to Supabase.

UI/UX Improvements

Backend Logic

  • Added comprehensive Supabase bookmark query utilities (getBookmarkedPosts, isPostBookmarked, addBookmark, removeBookmark, clearBookmarks, saveBookmarksBulk) in web/utils/supabase/queries/bookmark.ts.
  • Introduced a utility to fetch posts by IDs while preserving order in web/utils/supabase/queries/post.ts.

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

Labels

codex documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants