Feed Copying (Clone Feed from Any User)

Feature Request

Allow users to copy/clone feeds from any user (including themselves). This enables users to adopt curated feed configurations from others or duplicate their own feeds as starting points.

Proposed Behavior

A user can copy any feed (including default feeds) to create a new named feed for themselves. The copy operation supports two modes for follow lists:

  • Shallow copy of follow lists: Reference the same follow lists (shared)
  • Deep copy of follow lists: Create new follow lists with copied entries (independent)

Feed generators are always shallow-copied (reference the same generator definitions). All feed generators (system and user-created) are accessible to all users.

Requirements

Core Functionality

  1. Copy Source:
    • Any user's feed can be copied (default or named)
    • Source feed remains unchanged
    • Source user is not notified
  2. Copy Target:
    • Target is always a new named feed
    • Target user can be same as source (duplicate own feed) or different user
    • Target user specifies the new feed name
  3. Feed Generators (Always Shallow Copy):
    • Copy user_feed_generators assignments to the new feed
    • Same generator_id references (points to same generator definition)
    • Copy parameters and enabled values
    • All generators (system and user-created) are accessible to all users
  4. Follow Lists - Shallow Copy Mode:
    • Assign the SAME follow lists to the new feed
    • Be careful about which user the follow list came from when assigning
  5. Follow Lists - Deep Copy Mode:
    • Create NEW follow lists owned by the target user
    • Copy all follow_list_entries from source lists
    • Naming convention: "{original_name} (from {source_username})" or user-specified
    • New lists are automatically assigned for the new feed
    • Target user has full ownership and can modify independently

Database Considerations

  1. No new tables required (assuming #134 (closed) Multiple Named Feeds is implemented first)
  2. Audit trail (optional):
    • Track copy source: copied_from_feed_id, copied_from_user_id on user_feeds
    • Useful for attribution and debugging

UI Components

  1. Copy Feed Button/Action:
    • Should replace the current duplicate feed icon and functionality. The existing duplicate feed functionality should be removed.
    • Opens copy dialog
  2. Copy Feed Dialog:
    • Source feed info (name, owner, generator count, follow list count)
    • New feed name input (default: "Copy of {source_name}")
    • Optional description input
    • Follow list copy mode selector:
      • "Share follow lists (shallow)" - tooltip: "Use the same follow lists. Changes to lists affect all feeds using them."
      • "Copy follow lists (deep)" - tooltip: "Create independent copies. You can modify without affecting the original."
    • Preview section showing what will be copied
    • Copy button
  3. Feed Attribution (optional):
    • Show "Copied from {username}'s {feed_name}" in feed details
    • Link to original feed/user

Edge Cases

  1. Self-copy:
    • User copies their own feed
    • Shallow copy of follow lists works directly
    • Deep copy creates duplicate lists with "(copy)" suffix
  2. Copying default feed:
    • Default feeds don't have explicit feed_id in current schema
    • API accepts source_user_id to identify default feed
    • Resulting feed is a named feed (not default)
  3. Empty follow lists:
    • Deep copy should still create the empty list structure
    • Preserves the organizational intent
  4. Large follow lists:
    • Deep copy of lists with many entries could be slow
    • Consider async operation for large copies
    • Show entry count in preview

User Stories

  1. As a new user, I want to copy an experienced user's feed configuration to quickly get a useful feed setup.
  2. As a user, I want to duplicate my "Work" feed to create a "Work - Experimental" feed where I can try different generators.
  3. As a user, I want to copy my friend's feed but have my own independent follow lists that I can customize.
  4. As a user, I want to share my curated feed setup with others without them modifying my follow lists.
  5. As an admin, I want to create template feeds that new users can copy as starting points.

Open Questions

  1. Should follow lists support a public/private visibility setting to enable shallow cross-user copying? - All follow lists are shared / public and don't need any flag. A follow list is still owned by its creator and can be modified by him, but can be used by other users directly.
  2. Should we track copy provenance (which feed was copied from whom)? - No
  3. Should there be rate limiting or quotas on feed copying? - No
  4. Should the source user be notified when their feed is copied? - No
  5. Should we support "sync" mode where a copied feed stays updated with the source? (more complex, maybe separate feature) - No
Edited by Dimitrije Jankovic