feat: unified content management with authorship separation#680
Merged
Conversation
Implements unified content management system with separation of authorship from ownership, supporting co-authored content and proposal workflows: **Database Migration (150):** - Create content_authors table for co-authoring support - Add proposer tracking fields to perspectives table - Add review tracking (reviewed_by_user_id, reviewed_at, rejection_reason) - Update status constraint to include pending_review and rejected - Create helper functions: is_committee_lead(), is_content_owner() **Content Routes (/api/content):** - POST /propose - Submit content to personal or committee collections - GET /pending - List pending content for review (leads/admins) - POST /:id/approve - Approve pending content - POST /:id/reject - Reject with reason **My Content Routes (/api/me/content):** - GET / - Unified view of user's content (author/proposer/owner) - PUT /:id - Update content user owns - POST /:id/authors - Add co-author - DELETE /:id/authors/:authorId - Remove co-author **Addie Tools:** - propose_content - Create content targeting personal or committee - get_my_content - View all user's content with relationships - list_pending_content - Review queue for leads/admins - approve_content - Approve and publish pending content - reject_content - Reject with feedback **Proactive Notifications:** - Added pending_content to MemberContext interface - Committee leads and admins see pending counts in context - Addie proactively mentions pending items needing review 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create my-content.html with unified content management UI - Shows user's content (authored, proposed, owned) - Pending review tab for committee leads and admins - Create/edit content with committee targeting - Approve/reject workflow for reviewers - Filter by status and collection - Update /admin/perspectives to redirect to /my-content - Update admin APIs to accept pending_review and rejected statuses 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix SQL queries to use correct column names (workos_user_id) - Add GET /api/content/collections endpoint for public and user committees - Add migration 151 for public content collections (Editorial, Training) - Update my-content.html status hint logic to use collection data - Remove deprecated admin-perspectives.html 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Resolved import conflict in http.ts (added queuePerspectiveLink and InsightsDatabase) - Renumbered migrations to avoid version conflicts: - 150_unified_content_management.sql → 152_unified_content_management.sql - 151_public_content_collections.sql → 153_public_content_collections.sql 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements unified content management system (#670) that separates authorship from ownership, enabling:
Changes
Database (Migration 150)
content_authorstable for co-authoring withdisplay_orderperspectivescolumns:proposer_user_id,proposed_at,reviewed_by_user_id,reviewed_at,rejection_reasonpending_review,rejectedis_committee_lead(),is_content_owner()Content Routes (
/api/content)POST /propose- Submit content to personal or committee collectionsGET /pending- List pending content for reviewPOST /:id/approve- Approve pending contentPOST /:id/reject- Reject with reasonMy Content Routes (
/api/me/content)GET /- Unified view of user's content (author/proposer/owner)PUT /:id- Update owned contentPOST /:id/authors- Add co-authorDELETE /:id/authors/:authorId- Remove co-authorAddie Tools
propose_content- Create content targeting personal or committeeget_my_content- View all user's content with relationshipslist_pending_content- Review queue for leads/adminsapprove_content- Approve and publishreject_content- Reject with feedbackProactive Notifications
pending_contentadded to MemberContextTest plan
🤖 Generated with Claude Code