Guides: create, read, publish, delete (text only) (#8) #21

Merged
miko merged 2 commits from feature/8-guides into feature/7-permissions 2026-11-01 18:34:48 +01:00
Owner

Closes #8. Stacked on #20 (permission module, #7); merge that first, then retarget this to development.

  • Guide model and migration (20261101200000_add_guide)
  • Create (creator becomes owner, starts as draft), edit title/language/description, publish/unpublish, soft delete, admin list and restore at /admin/guides/deleted
  • /guides/<id>/<slug>; a missing or wrong slug redirects to the canonical one; the slug never takes edit
  • Optimistic locking: a stale save shows a conflict notice with "Reload"
  • Editor.js with the allow-listed tools; descriptions are stored only as sanitised Editor.js JSON, and rendered by our own React renderer (src/richText/, ADR-0005); plain text goes into searchText
  • Every check goes through src/permissions/permissions.ts
  • Categories list their visible guides; a category with guides (deleted ones too) can't be deleted

Known limits: the Editor.js list tool still offers "checklist", rendered as a plain list. The status change and delete don't bump version, since the edit form doesn't carry status. Signed-in flows weren't clicked through in a browser.

🤖 Generated with Claude Code

Closes #8. Stacked on #20 (permission module, #7); merge that first, then retarget this to `development`. - `Guide` model and migration (`20261101200000_add_guide`) - Create (creator becomes owner, starts as draft), edit title/language/description, publish/unpublish, soft delete, admin list and restore at `/admin/guides/deleted` - `/guides/<id>/<slug>`; a missing or wrong slug redirects to the canonical one; the slug never takes `edit` - Optimistic locking: a stale save shows a conflict notice with "Reload" - Editor.js with the allow-listed tools; descriptions are stored only as sanitised Editor.js JSON, and rendered by our own React renderer (`src/richText/`, ADR-0005); plain text goes into `searchText` - Every check goes through `src/permissions/permissions.ts` - Categories list their visible guides; a category with guides (deleted ones too) can't be deleted Known limits: the Editor.js list tool still offers "checklist", rendered as a plain list. The status change and delete don't bump `version`, since the edit form doesn't carry status. Signed-in flows weren't clicked through in a browser. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Guide model and migration; create, edit (optimistic locking via version),
publish/unpublish, soft delete and admin restore, all checked through the
permission module. /guides/<id>/<slug> redirects to the canonical slug.
Descriptions are edited with Editor.js and rendered by our own sanitising
React renderer (ADR-0005); plain text goes into searchText.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Store and load descriptions only as sanitised Editor.js JSON, so the editor
never inserts submitted HTML (stored XSS). Drop headings and quotes left
empty by sanitising; treat a malformed version as a conflict; share form
helpers, guide access fields and guide URLs; glossary-conform names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
miko merged commit 2b26a1ac6e into feature/7-permissions 2026-11-01 18:34:48 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MassiveDynamic/kataba!21
No description provided.