You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Sprint V-3 — Content Templates for entity creation
Add content templates that pre-fill the editor with structured content
when creating entities. Templates can be campaign-scoped or global, and
optionally bound to specific entity types.
Backend:
- Migration 000003: content_templates table with campaign/entity type FKs
- ContentTemplate model, repository (CRUD with campaign+type filtering),
service (validation, seeding), handler (REST API), routes
- ContentTemplateSeeder interface on campaigns for auto-seeding on create
- 4 default templates: Session Recap, NPC Profile, Location, Quest Log
- Entity Create handler applies template content on creation
Frontend:
- Template picker dropdown on entity create form (loads via API on type select)
- "Insert Template" slash command in editor (/ menu) with floating picker
- SlashCommands.addCommand() for dynamic command registration
- template_picker.js: form picker + editor insert menu logic
Customization Hub:
- New "Content Templates" tab with Alpine.js CRUD interface
- Create/edit/delete campaign templates with icon picker
- Built-in templates shown as read-only
https://claude.ai/code/session_01QJLkgjQDu5qohzJKGV4hj9
14.**Template picker on entity create form**: Dropdown appears when entity type is selected, populated via API. Selected template content is applied to the entity entry after creation.
18
+
19
+
15.**Editor slash command**: `/template` or `/insert template` in the editor shows a floating menu of available templates. Selecting one inserts the template's ProseMirror content at the cursor position.
20
+
21
+
16.**Default templates**: Four built-in templates (Session Recap, NPC Profile, Location, Quest Log) are seeded on campaign creation via `ContentTemplateSeeder` interface.
22
+
23
+
17.**Customization Hub tab**: "Content Templates" tab shows all campaign templates with create/edit/delete for campaign-scoped templates. Built-in templates show read-only badge.
24
+
25
+
### Previous Update
11
26
2026-03-10 -- **Cleanup & consolidation pass after bug fixes.**
12
27
13
28
7.**JSON injection fix**: HX-Trigger header in `CreateEntityType` error path used string concatenation to build JSON. Replaced with `json.Marshal()` to prevent malformed JSON from error messages containing special characters.
-[x]**Sprint V-3: Content Templates** — `content_templates` table, ContentTemplateService with CRUD + seeding, REST API, template picker on entity create form (loads by entity type), "Insert Template" slash command in editor, 4 default templates (Session Recap, NPC Profile, Location, Quest Log) seeded on campaign creation, Customization Hub "Content Templates" tab for management.
205
205
-[ ]**Sprint V-4: Enhanced Graph View & Cover Images** — @mention links in graph, entity type/tag filtering, local graph (N hops), clustering, orphan detection. Cover/banner image layout block type for entity pages.
206
206
-[ ]**Sprint V-5: Session Journal Audio Attachments** — Audio file upload support in Session Journal notes. Users can attach audio recordings (voice memos, session recordings, ambient tracks) to session notes. Privacy controls: share audio with session participants (public to group) or keep private (visible only to uploader). Media plugin integration for storage/serving. Allowed MIME types: audio/mpeg, audio/ogg, audio/wav, audio/webm. Inline audio player in note view. Migration for audio attachment metadata.
0 commit comments