Multiple Named Feeds per User
Feature Request
Allow users to have multiple named feeds, each with its own combination of feed generators and follow lists. This enables users to create focused feeds for different contexts (e.g., "Work Topics", "AI Research", "Politics").
Current Behavior
Each user has a single implicit feed composed of:
- Enabled feed generators (via
user_feed_generatorstable) - Active follow lists (via
user_active_follow_liststable) - A single view position tracked per viewer/owner pair
Proposed Behavior
Users can create multiple named feeds, each independently configured:
- Each feed has its own set of enabled generators with their parameters
- Each feed has its own set of active follow lists
- Each feed tracks its own view position (last seen event)
- One feed is marked as "default" (cannot be deleted, shown by default)
Requirements
Database Schema
-
New
user_feedstable:-
id(PK),creator_id(FK to users),name,description,is_default(boolean) - Unique constraint on
(creator_id, name) - Trigger to auto-create default feed named "My Feed" on user creation
-
-
Modify
user_feed_generators:- Add
feed_idcolumn (FK touser_feeds) - Change unique constraint to
(feed_id, generator_id, parameters) - Migration: create default feed for existing users, link existing records
- Add
-
Modify
user_active_follow_lists:- Change from
(user_id, follow_list_id)to(feed_id, follow_list_id) - Migration: link existing active lists to default feed
- Change from
-
Modify
feed_view_positions:- Change from
(viewer_user_id, feed_owner_user_id)to(viewer_user_id, feed_id) - Each feed has independent view tracking
- Migration: link existing positions to default feed
- Change from
API Functions
-
Feed CRUD:
-
createFeed(p_creator_id, p_name, p_description)- returns feed_id -
getFeeds(p_user_id)- list all feeds for user with is_default flag -
getFeed(p_feed_id)- get single feed details -
updateFeed(p_feed_id, p_name, p_description)- rename/update -
deleteFeed(p_feed_id)- delete (prevent default feed deletion)
-
-
Modify existing functions to accept
feed_id:addGeneratorToFeed(p_feed_id, p_generator_id, p_parameters)removeGeneratorFromFeed(p_assignment_id, p_feed_id)activateFollowListForFeed(p_feed_id, p_list_id)deactivateFollowListForFeed(p_feed_id, p_list_id)-
get_user_feed_events(p_feed_id, ...)- events for specific feed -
record_feed_view(p_viewer_id, p_feed_id, ...)- track per feed -
get_feed_new_count(p_viewer_id, p_feed_id)- new count per feed
-
Backward compatibility:
- Keep existing function signatures working with default feed
- Add overloaded versions or default parameters
UI Components
-
Feed Selector:
- Dropdown or tabs to switch between feeds
- Show feed name and new event count badge
- Quick access to default feed
-
Feed Management Page:
- List all user's feeds
- Create new feed (name, description)
- Edit feed details
- Delete feed (with confirmation, prevent default deletion)
- Duplicate feed (copy generators and follow lists)
-
Per-Feed Configuration:
- Reuse existing
PvFeedManagementcomponent - Scope generator assignments to selected feed
- Scope follow list activation to selected feed
- Reuse existing
-
Modify existing components:
-
PvUserFeedViewer- add feed selector -
PvFeedEventList- accept feed_id prop -
PvFeedNewCount- accept feed_id prop -
PvFeedManagement- scope to selected feed
-
Migration Strategy
- Create
user_feedstable - Insert default feed for all existing users
- Add
feed_idcolumn to modified tables (nullable initially) - Backfill
feed_idwith default feed for existing records - Make
feed_idNOT NULL - Update constraints and indexes
- Update API functions
- Deploy UI changes
User Stories
-
As a user, I want to create a "Work" feed with only work-related tags and sources, so I can focus during business hours.
-
As a user, I want to create an "AI Research" feed that follows specific AI-related propositions and uses the "Propositions by Tag" generator for AI tags.
-
As a user, I want to switch between feeds quickly to change context without reconfiguring generators each time.
-
As a user, I want each feed to track what I've seen independently, so switching feeds shows me new events in that feed.
-
As a user, I want to duplicate an existing feed as a starting point for a new one with similar configuration.
Related Files
Database
-
ratings-sql/V073__feed_generators.sql- current feed generator schema -
ratings-sql/V075__feed_view_positions.sql- view position tracking -
ratings-sql/V077__follow_lists.sql- follow lists and active lists -
ratings-sql/R__060_feed_generators_api.sql- feed generator API -
ratings-sql/R__062_feed_events_view.sql- feed event functions -
ratings-sql/R__063_feed_view_api.sql- feed view tracking API -
ratings-sql/R__065_follow_lists_api.sql- follow list API
UI
ratings-ui-demo/src/pvcomponents/pv-user-feed-viewer.tsxratings-ui-demo/src/pvcomponents/pv-feed-event-list.tsxratings-ui-demo/src/pvcomponents/pv-feed-management.tsxratings-ui-demo/src/pvcomponents/pv-feed-new-count.tsxratings-ui-demo/src/components/feed-view-context.tsxratings-ui-demo/src/services/api-v1.ts
Open Questions
- Should users be able to share/publish feeds for others to subscribe to?
- Should there be a limit on the number of feeds per user?
- Should feeds support visibility settings (private/public)?
- Should we support feed "presets" or templates that users can start from?