Conversation Publishing - Design Document
Status: Phases 0–3 shipped (before 2026-07-20 — predates this repo's shallow history): share-by-link, moderation submission, the creator review step with Publish Preferences and the 7-day window (day-5 reminder, day-7 auto-publish), content flags on the public page, creator unpublish, conversation comments and bookmarks, Browse → Conversations, and the "Published Conversations" list on character, package and (since b2c085e0, 2026-09-03) mode pages. Not built: a content-flag filter in the Browse UI (the API accepts excludeFlags, nothing sends it) and all of Phase 4 (dual comment moderation, Hub trending, digest mode).
As built (verified 2026-09-29 against the code). Creator review:
CreatorConversationEndpoints.csmapsGET /api/creator/conversations/pending,…/{id}/review(+/messages),PUT …/{id}/accept,PUT …/{id}/reject,DELETE …/{id}/unpublish, andGET/PUT /api/creator/publish-preferences.fn_approve_publish_request(24_publish_request_moderation.sql) hands a conversation approval to the character's creator, stores the moderator'scontent_flags, and applies the creator'sauto_reject_flags/require_review. Frontend:CreatorConversationReviewsPage(/creator/conversations/pending, reached from the type-15/16 notifications),CreatorConversationReviewPage,CreatorPublishPreferencesPage(/creator/publish-preferences), and the creator unpublish action onConversationPage.
Open follow-ups (knowledge review, 2026-09-29)
- No standing way in to the creator's review queue or its preferences. Neither
/creator/conversations/pendingnor/creator/publish-preferenceshas a nav entry (App.tsxroutes only;Navigation.tsx/ Creator's Space link to neither). The queue is reachable only from a type-15/16 notification; the preferences page was reachable from nowhere until 2026-09-29, when a "Publish preferences" button was added to the queue's header (CreatorConversationReviewsPage.tsx, pinned byCreatorConversationReviewsPage.preferencesEntry.test.tsx). A creator who wants to pre-set auto-reject flags before their first request still can't find either page. Fix shape: an entry on Creator's Space (CreatorHubPage→ Space tab) in the shape of the existing agent-proposalsNotice— pending count + "Review conversations", with "Publish preferences" beside it, visible to any Creator even at zero pending. - The preferences page predates the house form pattern. A lone "Save Preferences" button that is always enabled; no Cancel, no dirty tracking (CLAUDE.md §Form Save/Cancel). Bring it onto the Cancel/Save pair when the entry above lands.
Problem
Today
Users can share conversations via unlisted link (share token) or submit them for public listing through moderation. But the flow stops at moderation approval -- there is no creator involvement. A user can publish a conversation featuring a creator's character, and the creator has no say in whether that conversation represents their work well.
This is a real problem. On competitor platforms, users routinely publish disturbing, off-brand, or abusive conversations using popular characters. The character creator has no recourse. Their work gets associated with content they find objectionable, and the platform's reputation suffers.
What this enables
- Creator sovereignty: The person who built the character/package decides whether a conversation using their work gets published. This is the core principle.
- Content flag transparency: Moderation flags (violence, sexual content, etc.) travel with the conversation so creators can make informed decisions without reading every message.
- Community engagement: Published conversations become discussion spaces -- users comment, react, and discover characters through real usage examples.
- Discovery: Browsing published conversations on a character's page shows prospective users what the experience is actually like.
- Trust: Users know that published conversations have been reviewed by both moderation and the creator. The platform maintains quality standards.
Core Principles
- Creator veto is absolute. If the creator doesn't want a conversation published under their character, it doesn't get published. No appeals process for the publisher.
- Moderation before creator. Creators should never have to see content that violates platform rules. Moderation filters first, then forwards clean (but possibly flagged) content to the creator.
- Flags, not blocks. Moderation flags content categories (violence, sexual themes, etc.) but doesn't auto-reject based on flags alone. The flags inform the creator's decision.
- Two sharing tiers. Share-by-link (unlisted, no review) remains separate from public publishing (discoverable, reviewed). They serve different purposes.
Publish Flow
Current State (What Exists)
User submits publish request
-> moderation_status = 0 (pending)
-> Admin claims review (status = 1)
-> Admin approves (status = 2, is_public = true)
OR rejects (status = 3)
Target State
User submits publish request
-> moderation_status = 0 (pending)
-> Content checks run (auto or manual)
-> Admin reviews
-> Rejected for policy violation (status = 3, done)
-> Approved with content flags (moderation_status = 4, creator_review)
-> Creator reviews (7-day window)
-> Creator accepts (status = 2, is_public = true)
-> Creator rejects (status = 5, creator_rejected)
-> No response in 7 days: auto-publish (status = 2, is_public = true)
Creator can still reject/unpublish at any time after auto-publish
-> Published
AWOL Creator Handling
Creators get 7 days to respond to a publish review request. If they don't act:
- The conversation auto-publishes (
moderation_status = 2,is_public = true). - The creator retains full unpublish rights indefinitely -- they can reject at any time after auto-publish.
- A reminder notification is sent at day 5 (2 days before auto-publish).
This prevents conversations from sitting in limbo when a creator is inactive, on break, or has abandoned their account. The safety net is that moderation already passed the conversation, and the creator can always unpublish later.
Implementation: A task in the existing ScheduledMaintenanceService finds conversations where web_conversations.moderation_status = 4 (creator review) and creator_review_started_at exceeds the configured window. It auto-publishes them and sends a notification to both the publisher ("your conversation was published") and the creator ("this conversation was auto-published -- you can unpublish it at any time").
The 7-day window is stored as a platform setting (Publishing.CreatorReviewWindowDays) so it can be tuned without a code change.
Status Values
Two separate status columns are in play. They track different things:
web_conversations.moderation_status — tracks the conversation's publish lifecycle from the user's perspective:
| Value | Name | Meaning |
|---|---|---|
| NULL | Not submitted | No publish request active |
| 0 | Pending | Awaiting moderation review |
| 1 | Under review | Claimed by a moderator |
| 2 | Approved | Published and visible |
| 3 | Rejected | Rejected by moderation (policy violation) |
| 4 | Creator review | Passed moderation, awaiting creator decision |
| 5 | Creator rejected | Creator chose not to publish (or unpublished) |
Values 4 and 5 are new. Everything else already exists.
publish_requests.status — tracks the moderation workflow (0=Pending, 1=UnderReview, 2=Approved, 3=Rejected, 4=Flagged). These values are unchanged. When moderation approves a conversation, publish_requests.status goes to 2 (Approved) while web_conversations.moderation_status goes to 4 (CreatorReview). The approval function handles both columns.
Notifications (summary)
See the full Notification Requirements section below for implementation details.
| Event | Recipient | Type |
|---|---|---|
| Request submitted | (existing) | -- |
| Moderation approved -> creator review | Creator | ConversationPublishReview (15) |
| Reminder at day 5 of creator review | Creator | ConversationPublishReminder (16) |
| Auto-published after 7 days | Publisher | ConversationAutoPublished (17) |
| Auto-published after 7 days | Creator | ConversationAutoPublished (17) |
| Creator accepted | Publisher | ContentApproved (2) |
| Creator rejected | Publisher | ContentRejected (3) |
| Creator unpublishes (post-auto-publish) | Publisher | ContentRejected (3) |
| Moderation rejected | Publisher | ContentRejected (3) |
Content Flags
Purpose
When moderation approves a conversation for creator review, they attach content flags describing what the conversation contains. The creator sees these flags and can make an informed decision without reading every message.
Flag Categories
Content flags are a separate vocabulary from content_filter_keywords.category -- they serve different purposes (moderator annotation vs automated keyword matching). An empty array means clean content.
| Flag | Description |
|---|---|
violence |
Graphic violence, gore, torture |
sexual_content |
Sexual content or themes |
profanity |
Heavy profanity throughout |
substance_use |
Drug/alcohol references |
self_harm |
Self-harm or suicide themes |
hate_speech |
Discriminatory language |
horror |
Horror, disturbing imagery |
Storage
Flags attach to the publish request, not the conversation itself. They're a moderation annotation stored as TEXT[] on publish_requests.content_flags (see Data Model). Explicit moderator-set flags are simpler and more reliable for creator review than deriving them from moderation_check_results.
Creator Settings
Creators can pre-configure which flags they'll auto-reject:
CREATE TABLE creator_publish_preferences (
user_id INTEGER PRIMARY KEY REFERENCES users(id) ON DELETE CASCADE,
auto_reject_flags TEXT[] DEFAULT '{}',
-- e.g., {'sexual_content', 'self_harm'} -> auto-reject conversations with these flags
require_review BOOLEAN DEFAULT TRUE,
-- FALSE = auto-accept anything moderation passes (for creators who don't want to review)
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
This means:
- If
require_review = FALSEand no auto-reject flags match: auto-publish after moderation approval. - If
require_review = TRUE: always send to creator for manual review. - If any
auto_reject_flagsmatch the conversation's content flags: auto-reject without bothering the creator.
Creator Unpublish
The Right
The creator of the character (or package) used in a published conversation can unpublish it at any time. This is a creator moderation action, not a platform moderation action.
Mechanism
Creator unpublish (character/package creator rejects the content):
Creator visits published conversation
-> Sees "Unpublish" action (only visible to character/package creator)
-> Confirms
-> moderation_status = 5 (creator_rejected), is_public = false
-> Conversation disappears from browse
-> Publisher gets notification: ContentRejected
-> Re-submission is BLOCKED (status 5 is final)
Publisher self-unpublish (voluntary withdrawal by the conversation owner):
Publisher visits their published conversation
-> Uses existing DELETE /api/conversations/{id}/publish endpoint
-> moderation_status = NULL, is_public = false
-> Conversation disappears from browse
-> Re-submission is ALLOWED (status reset to NULL)
These are distinct actions with different status transitions. Creator unpublish is a veto; publisher unpublish is a withdrawal.
Edge Cases
- Package conversations: Conversations have a direct
package_idFK. The package creator can unpublish if their package was used, in addition to the character creator. - Note: Multi-character conversations don't exist --
web_conversations.character_idisNOT NULLwith a single FK. Creator resolution is always: one character, one creator. - Deleted characters: If the character is deleted, published conversations using it remain published. The creator can still unpublish them (as built: taking something down stays open), and platform moderation can still act. A conversation that isn't public yet is not published while the character stays deleted (owner, 2026-11-22, Relay eod-418): moderation approval, force publish, the creator's accept and the 7-day auto-publish all refuse or skip it and say why, the creator can decline, the writer can withdraw (from the creator's review too), and restoring the character lifts the block.
Browse & Discovery
Where Published Conversations Appear
- Browse page:
GET /api/browse/conversations(exists, needs filters) - Character detail page: List of published conversations using this character
- Package detail page: List of published conversations using characters from this package
- Creator profile: List of published conversations using any of this creator's characters
- Hub: Featured/trending conversations (future)
Character/Package Detail Integration
New endpoints:
GET /api/browse/characters/{id}/conversations
-> Paginated list of approved public conversations for this character
-> Sorted by: recent, popular (comment count), reactions
GET /api/browse/packages/{id}/conversations
-> Conversations where web_conversations.package_id matches
Database Support
The public_conversation_view already joins web_conversations with characters and includes character_id. Filtering by character is a simple WHERE clause.
Conversations have a direct package_id FK on web_conversations, so filtering by package is a simple WHERE package_id = ?. No junction table is needed -- packages have a single nullable character_id, not a many-to-many relationship.
Browse Filters
| Filter | Description |
|---|---|
| Character | Filter by specific character |
| Creator | Filter by character creator |
| Content flags | Show/hide flagged content categories |
| Sort | Recent, popular, most commented |
| Search | Full-text search on title + description |
Comments & Reactions
Comments
The comment system does not yet route EntityType.Conversation (4) -- added in Phase 0. When a conversation is published:
- Comment settings should be auto-created with the publisher's defaults (existing
creator_comment_defaultssystem). - However, the character creator (not the publisher) should have creator-level moderation powers over the comment section. This is because the conversation represents the creator's character.
Open question: Should both the publisher and the character creator have comment moderation rights? Recommendation: Yes. Publisher manages their conversation's discussion, creator protects their character's reputation. Either can hide/delete comments.
Reactions
Reactions currently exist only on comments (comment_reactions table). For conversations themselves, we have two options:
Option A: No standalone reactions. Use favorites/bookmarks. The user_conversation_bookmarks table doesn't exist yet -- created in Phase 0.
Option B: Conversation reactions. Add a conversation_reactions table mirroring comment_reactions. Richer engagement but another system to build.
Recommendation: Option A for launch. Favorites infrastructure exists for other entities; user_conversation_bookmarks is added in Phase 0. Add standalone reactions later if there's demand.
Data Model Changes
Modified Tables
-- publish_requests: add content_flags and creator_review columns
ALTER TABLE publish_requests
ADD COLUMN content_flags TEXT[] DEFAULT '{}',
ADD COLUMN creator_user_id INTEGER REFERENCES users(id),
ADD COLUMN creator_review_started_at TIMESTAMP WITH TIME ZONE,
ADD COLUMN creator_reviewed_at TIMESTAMP WITH TIME ZONE,
ADD COLUMN creator_reminder_sent BOOLEAN DEFAULT FALSE;
-- web_conversations.moderation_status: extend with values 4 (CreatorReview) and 5 (CreatorRejected)
-- No schema change needed, just new values in application code
-- publish_requests.status values are UNCHANGED (0-4 keep existing meanings)
New Tables
-- Creator preferences for conversation publishing on their characters
CREATE TABLE IF NOT EXISTS creator_publish_preferences (
user_id INTEGER PRIMARY KEY REFERENCES users(id) ON DELETE CASCADE,
auto_reject_flags TEXT[] DEFAULT '{}',
require_review BOOLEAN DEFAULT TRUE,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
Modified Views
public_conversation_view needs:
- Content flags from the publish request
- Comment count from
mv_entity_comment_counts - Favorite count (if tracked)
New Enum Values
// ModerationStatus (extend existing)
public const int CreatorReview = 4;
public const int CreatorRejected = 5;
// NotificationType (extend existing)
ConversationPublishReview = 15 // Creator asked to review
ConversationPublishReminder = 16 // Day 5 reminder
ConversationAutoPublished = 17 // Auto-published after timeout
Subscription Tier Limits
The current tier system has free and pro; this feature adds a premium tier. The key interaction: published conversations don't count toward private conversation limits. Publishing is an incentive -- it frees up a slot.
New Tier
INSERT INTO subscription_tiers (name, display_name, price_monthly_cents, price_yearly_cents, is_default, sort_order)
VALUES ('premium', 'Premium', 0, 0, FALSE, 2)
ON CONFLICT (name) DO NOTHING;
-- price_monthly_cents / price_yearly_cents TBD during pricing decisions
Limit Keys
The existing conversations.active_conversations limit (free: 10, pro: unlimited) gains a premium value and a new counting rule:
| Limit Key | Free | Pro | Premium | Category | Display Name |
|---|---|---|---|---|---|
conversations.active_conversations |
10 |
50 |
unlimited |
Conversations & Context | Active conversations |
publishing.publish_requests_per_day |
1 |
5 |
20 |
Conversation Publishing | Publish requests per day |
publishing.share_links |
5 |
unlimited |
unlimited |
Conversation Publishing | Share links (unlisted) |
conversations.active_conversations — existing limit, updated with three changes:
- Pro changes from
unlimitedto50(premium getsunlimited). - Premium tier added with
unlimited. - Counting rule: only private (non-published) conversations count. A conversation with
is_public = TRUE AND moderation_status = 2is excluded from the count. This means publishing a conversation frees up a slot, creating a natural incentive to publish.
publishing.publish_requests_per_day — rate limit on how many publish requests a user can submit per day. Prevents spam. Checked at submit time.
publishing.share_links — total number of active share-by-link (unlisted) conversations. Share links require no moderation review, so this limits how many a free user can have simultaneously.
Counting Rule Implementation
The active conversation count needs to exclude published conversations. The existing enforcement point (wherever conversations.active_conversations is checked) must change its count query from:
-- Before: counts all non-deleted, non-archived conversations
SELECT COUNT(*) FROM web_conversations
WHERE user_id = $1 AND is_deleted = FALSE AND is_archived = FALSE;
-- After: excludes published conversations
SELECT COUNT(*) FROM web_conversations
WHERE user_id = $1 AND is_deleted = FALSE AND is_archived = FALSE
AND NOT (is_public = TRUE AND moderation_status = 2);
This is a single WHERE clause change at the enforcement point. The fn_get_user_subscription_limit function itself doesn't need modification -- only the code that compares the limit value to the count.
Enforcement Points
| Limit | Checked at | Endpoint |
|---|---|---|
conversations.active_conversations |
Create new conversation | POST /api/conversations |
publish_requests_per_day |
Submit publish request | POST /api/conversations/{id}/publish |
share_links |
Generate share link | POST /api/conversations/{id}/share |
Enforcement uses the existing fn_get_user_subscription_limit(user_id, limit_key) function. No new infrastructure needed beyond the updated count query.
Implementation
Added to Phase 0 as prerequisite work:
- Add
premiumtier tosubscription_tiersseed data. - Add
publishing.*limit keys tosubscription_tier_limitsfor all three tiers. - Update pro tier's
conversations.active_conversationsfromunlimitedto50. - Update the active conversation count query to exclude published conversations (
is_public = TRUE AND moderation_status = 2). - Add limit checks to the share and publish endpoints.
- Backfill existing
protier limits for any newpremium-specific keys across other feature areas (ifpremiumdiffers fromproon existing limits, seed those too).
API Changes
New Endpoints
| Method | Path | Purpose |
|---|---|---|
| GET | /api/browse/characters/{id}/conversations |
Conversations for a character |
| GET | /api/browse/packages/{id}/conversations |
Conversations for a package |
| PUT | /api/creator/conversations/{id}/accept |
Creator accepts publish |
| PUT | /api/creator/conversations/{id}/reject |
Creator rejects publish |
| DELETE | /api/creator/conversations/{id}/unpublish |
Creator unpublishes |
| GET | /api/creator/conversations/pending |
Creator's pending reviews |
| GET | /api/creator/publish-preferences |
Get creator preferences |
| PUT | /api/creator/publish-preferences |
Update creator preferences |
Modified Endpoints
| Method | Path | Change |
|---|---|---|
| POST | /api/conversations/{id}/publish |
Include content flags in response |
| GET | /api/browse/conversations |
Add content flag filters |
| GET | /api/browse/conversations/{id} |
Include content flags |
Admin Endpoints
| Method | Path | Change |
|---|---|---|
| PUT | /api/publish-requests/{id}/approve |
Accept content_flags[] parameter, set status to 4 (creator_review) instead of 2 for conversation entities |
Implementation Plan
Phase 0: Prerequisites
These items fix existing infrastructure so the publish ecosystem can build on top of it.
- Register conversations in comment routing. Add
["conversations"] = EntityRegistry.Conversationto theUuidEntitiesdictionary inCommentsEndpoints.cs. Add conversation resolution toGetEntityOwnerIdAsyncin the comment repository (returnsweb_conversations.user_id). - Create
user_conversation_bookmarkstable. Mirror the existing bookmark tables (user_character_bookmarks, etc.) for entity type 4. Add the bookmark endpoints for conversations. - Clarify
public_conversationstable role. Thepublic_conversation_viewdoesn't require a row inpublic_conversations-- it filters byis_public = TRUE AND moderation_status = 2. Decision: keeppublic_conversationsfor title/description storage. Insert a row when the conversation reaches status 2 (whether by creator accept or auto-publish). Publisher provides title/description at publish request submission time; store them onpublish_requestsand copy topublic_conversationson approval. - Define content flag vocabulary. Content flags are a new vocabulary, separate from
content_filter_keywords.category. Canonical list:violence,sexual_content,profanity,substance_use,self_harm,hate_speech,horror. Nononevalue -- an empty array means clean content. Store asTEXT[]onpublish_requests. - Document entity type mapping.
publish_requests.entity_typeusesContentEntityType(0=Character, 1=Mode, 2=Lorebook, 3=Conversation), which differs fromEntityRegistry.EntityType(Conversation=4, Creator=3). The approval function already maps between these in a CASE statement. Notifications useEntityRegistryvalues (4 for conversations) since the frontend consumesEntityRegistrymappings. - Add
premiumsubscription tier and conversation limits. Insertpremiumtier intosubscription_tiers. Updateconversations.active_conversations(pro:50, premium:unlimited). Seedpublishing.publish_requests_per_dayandpublishing.share_linksfor all three tiers. Update the active conversation count query to exclude published conversations (is_public = TRUE AND moderation_status = 2). Add limit checks to share and publish endpoints. See Subscription Tier Limits for values.
Phase 1: Creator Review Flow (Backend)
Schema changes:
- Add columns to
publish_requests:content_flags TEXT[] DEFAULT '{}',creator_user_id INTEGER REFERENCES users(id),creator_review_started_at TIMESTAMP WITH TIME ZONE,creator_reviewed_at TIMESTAMP WITH TIME ZONE,creator_reminder_sent BOOLEAN DEFAULT FALSE. - Create
creator_publish_preferencestable. - Add new
web_conversations.moderation_statusvalues: 4 (CreatorReview), 5 (CreatorRejected). These are onweb_conversations.moderation_statusonly --publish_requests.statuskeeps its existing values (0-4 where 4=Flagged). The approval function setsweb_conversations.moderation_status = 4andpublish_requests.status = 2(Approved by moderation) simultaneously. - Update the unique active index on
publish_requestsif needed:WHERE status IN (0, 1, 4)already includes Flagged (4); verify no conflict with the new flow.
Notification infrastructure:
- Add
NotificationTypevalues:ConversationPublishReview = 15,ConversationPublishReminder = 16,ConversationAutoPublished = 17. - Add user settings keys:
Notifications.ConversationPublishReview,Notifications.ConversationPublishReminder,Notifications.ConversationAutoPublishedtoSettingsKeys.cs. - Add preference checks for types 15/16/17 in
fn_create_notification. - Add frontend notification click routing: type 15/16 ->
/creator/conversations/pending, type 17 ->/browse/conversations/{uuid}.
Core flow:
- Modify
fn_approve_publish_request: for conversation entities (entity_type = 3), resolve character creator viaweb_conversations.character_id -> characters.user_id. Setweb_conversations.moderation_status = 4(not 2). Storecreator_user_idandcreator_review_started_aton the publish request. Applycreator_publish_preferencesauto-rules: ifrequire_review = FALSEand noauto_reject_flagsmatch, skip to status 2 (auto-accept). If flags matchauto_reject_flags, set status 5 (auto-reject). Otherwise, notify creator (type 15). - Add creator accept/reject endpoints. Accept: set
moderation_status = 2,is_public = true, insertpublic_conversationsrow, notify publisher (ContentApproved). Reject: setmoderation_status = 5, notify publisher (ContentRejected). - Add creator unpublish endpoint. Set
moderation_status = 5,is_public = false, notify publisher (ContentRejected). Distinct from publisher self-unpublish: publisher'sDELETE /api/conversations/{id}/publishreverts tomoderation_status = NULL(allows re-submission), creator unpublish sets status 5 (final, blocks re-submission). - Extend
ScheduledMaintenanceServicewith a new task:ProcessCreatorReviewTimeoutsAsync. Runs on existing 1-minute tick. Calls a new DB function that finds publish requests in creator review state wherecreator_review_started_atexceeds thresholds. Day 5: send reminder (type 16), setcreator_reminder_sent = TRUE. Day 7: auto-publish (setmoderation_status = 2,is_public = true, insertpublic_conversationsrow), send type 17 to both publisher and creator. - Add
Publishing.CreatorReviewWindowDaysplatform setting (default: 7).
Phase 2: Browse & Discovery (Backend + Frontend)
- Add
GET /api/browse/characters/{id}/conversationsendpoint. Filterpublic_conversation_viewbycharacter_id. - Add
GET /api/browse/packages/{id}/conversationsendpoint. Filter byweb_conversations.package_iddirectly (packages have a 1:1 character relationship, but conversations storepackage_idas a direct FK). - Add content flag filters to
GET /api/browse/conversations. Users can exclude flagged categories. - Update
public_conversation_view: join topublish_requestsforcontent_flags, join tomv_entity_comment_countsfor comment count, join to bookmark count if available. - Build conversation list component for character/package detail pages.
- Build browse conversations page with filters.
Phase 3: Creator Tools (Frontend)
- Creator pending reviews page -- list conversations awaiting their decision with content flags, character name, publisher username, time remaining before auto-publish.
- Creator publish preferences settings page -- auto-reject flags, require review toggle.
- Creator unpublish action on published conversations (visible only to character/package creator).
- Content flag display on review cards -- badge per flag category.
Phase 4: Polish
- Dual comment moderation. Extend
CommentService.ModerateCommentAsync: for conversation entities, resolve both the conversation owner (web_conversations.user_id) and the character creator (characters.user_idviaweb_conversations.character_id). Either user gets moderation rights. Add aGetEntityModeratorIdsAsyncmethod toICommentRepositorythat returns multiple user IDs for conversation entities. - Trending/featured conversations on Hub.
- Content flag display for users browsing (with blur/warning for flagged content).
- Notification digest mode for high-volume creators (
Notifications.ConversationPublishDigest).
Notification Requirements
Current System Recap
Notifications are created in PostgreSQL triggers and functions, not in C# code. Each notification stores a pre-rendered content_text string, a type enum, entity_type/entity_id for linking, and triggered_by_user_id for actor display. The frontend renders content_text directly for ungroupable types, or generates summary text ("Alice and 3 others...") for groupable types.
Why Existing Types Are Not Enough
ContentApproved (2) / ContentRejected (3) can't cover all scenarios because:
Different audiences need different messages. "Your conversation was published" (to publisher) vs "A conversation using your character was auto-published — you can unpublish it" (to creator) are fundamentally different messages, even if both result in a published conversation. Reusing
ContentApprovedfor both loses the call-to-action for the creator.No action-URL pattern. Current notifications link to the entity itself (the character, lorebook, etc.). Creator review notifications need to link to the review queue or the review action page, not just the conversation. The
entity_type/entity_idpair doesn't encode "go to your creator review dashboard".No scheduled notification precedent for deferred delivery. Current notifications fire on database triggers (INSERT/UPDATE). A
ScheduledMaintenanceServiceexists (1-minute tick) and apending_scheduled_notificationsqueue is in place, but they handle follower fan-out, not time-delayed notifications. The day-5 reminder and day-7 auto-publish extend this existing service (see Phase 1, step 12).Grouping gap for high-volume creators. A popular character could generate dozens of review requests. Each arrives as an individual ungroupable notification. There's no batching or digest mechanism.
New Notification Types
| Value | Name | Recipient | Groupable | Message Example |
|---|---|---|---|---|
| 15 | ConversationPublishReview |
Creator | No | "[Username] wants to publish a conversation using your character \"[Name]\". It's waiting for your review." |
| 16 | ConversationPublishReminder |
Creator | No | "Reminder: a conversation using \"[Name]\" will auto-publish in 2 days if you don't review it." |
| 17 | ConversationAutoPublished |
Publisher + Creator | No | Publisher: "Your conversation \"[Title]\" was published automatically." / Creator: "A conversation using your character \"[Name]\" was auto-published. You can unpublish it at any time." |
All three are ungroupable — each requires individual attention. They display raw content_text.
Action Links
The current notification model links to an entity via entity_type + entity_id. For creator review notifications, we need the frontend to route differently based on notification type:
| Type | Frontend route |
|---|---|
ConversationPublishReview (15) |
/creator/conversations/pending (review queue) or /creator/conversations/{uuid}/review (specific review) |
ConversationPublishReminder (16) |
Same as above |
ConversationAutoPublished (17) |
/browse/conversations/{uuid} (the published conversation) |
ContentApproved (2) for conversations |
/browse/conversations/{uuid} |
ContentRejected (3) for conversations |
/vault/shared (user's shared conversations list) |
Implementation: The frontend notification click handler already switches on type. Add cases for 15/16/17 that build the appropriate route. No schema change needed — entity_type (Conversation) + entity_id is enough to build the URL. The type determines where to link.
Note: The entity_type value for conversations differs between systems: EntityRegistry uses 4, but publish_requests uses 3 (see Phase 0, step 5). Notifications should use the EntityRegistry value (4) since they're consumed by the frontend which uses EntityRegistry mappings.
Notification Creation
Trigger-based (existing pattern):
ConversationPublishReview— created when admin approves a conversation publish request (status changes to 4). The approve function resolvescharacters.user_idvia the conversation'scharacter_idand inserts the notification for the creator.ContentApproved/ContentRejected— created when creator accepts/rejects (status changes to 2 or 5). Notification goes to the publisher (publish_requests.user_id).
Scheduled job (extending existing ScheduledMaintenanceService):
The existing ScheduledMaintenanceService in ServerAPI runs every 1 minute and already handles fn_process_scheduled_notifications() and token cleanup. Add a new task ProcessCreatorReviewTimeoutsAsync that calls a DB function to:
ConversationPublishReminder— find requests whereweb_conversations.moderation_status = 4andcreator_review_started_atis 5+ days ago andcreator_reminder_sent = FALSE. Insert reminder notification, setcreator_reminder_sent = TRUE.ConversationAutoPublished— find requests whereweb_conversations.moderation_status = 4andcreator_review_started_atis 7+ days ago. Auto-publish (setmoderation_status = 2,is_public = true, insertpublic_conversationsrow), create notifications for both publisher and creator.
User Preference Keys
Creators should be able to control these notifications. New settings keys:
| Key | Default | Controls |
|---|---|---|
Notifications.ConversationPublishReview |
true |
New review request notifications |
Notifications.ConversationPublishReminder |
true |
Day-5 reminder before auto-publish |
Notifications.ConversationAutoPublished |
true |
Auto-publish notifications |
These are checked in the notification creation function / scheduled job before inserting. If a creator disables ConversationPublishReview, they still get the auto-publish notification (separate setting) so they're aware of what went live.
Publisher-side: No new preference keys needed. Publishers already receive ContentApproved/ContentRejected which are controlled by existing preferences.
Batching for High-Volume Creators (Phase 4)
For creators with popular characters, receiving 20 individual review notifications per day is noisy. Phase 4 should introduce a digest mode:
- New preference:
Notifications.ConversationPublishDigest(default:false) - When enabled, instead of individual
ConversationPublishReviewnotifications, the scheduled job creates a single daily summary:"You have 12 conversations pending review for your characters. Review them in your creator dashboard." - Individual notifications are still created but marked as
is_read = true(so they appear in history but don't badge) - The digest notification type could be
ConversationPublishDigest(18) or reuseConversationPublishReviewwith a differentcontent_textpattern
This is Phase 4 because it only matters once adoption reaches scale.
Schema Summary
All publish_requests column changes are listed in the Data Model section. Notification-specific additions:
// New notification types in application code
ConversationPublishReview = 15
ConversationPublishReminder = 16
ConversationAutoPublished = 17
// New user settings keys in SettingsKeys.cs
Notifications.ConversationPublishReview // default: true
Notifications.ConversationPublishReminder // default: true
Notifications.ConversationAutoPublished // default: true
Security Considerations
- Creator identity verification: The system must verify that the user accepting/rejecting is actually the creator of the character used in the conversation. Use
characters.user_idto verify. - Rate limiting: Publish requests should be rate-limited per user to prevent spam.
- Content flag tampering: Only moderators can set content flags. Creators and publishers cannot modify them.
- Notification spam: Don't notify creators for every single publish request if they have auto-rules configured. Only notify for requests that actually need manual review.
- Unpublish cascading: When a conversation is unpublished, any share tokens should remain valid (unlisted sharing is separate from public listing). Only
is_publicandmoderation_statuschange.
Open Questions
- Re-submission after creator rejection: Can the publisher re-submit the same conversation? Recommendation: No. Creator rejection is final for that conversation. The user can publish a different conversation.
- Creator notification batching: Planned for Phase 4 as an opt-in digest mode. See Notification Requirements > Batching.
- Anonymous publishing: Should publishers be able to publish conversations without their username attached? Leaning no -- accountability matters.
- Conversation editing after publish: Can the publisher edit the title/description after approval? Recommendation: Title/description yes, conversation content no (it was reviewed as-is).
- Character transfer: If a character is transferred to a new creator, do their unpublish rights transfer too? Recommendation: Yes.