Skip to content

Course base · Manual outline editing (rename, reorder, move, merge, split) #164

Description

@lucaosti

Sub-issue of #138. Depends on #150 (course builder integration).

Goal

Make the outline correctable by hand, so a reviewer can fix the model's structural mistakes quickly instead of regenerating and hoping for better.

Why

Topic grouping is a judgement call, and the model will get some of it wrong: merging distinct topics, splitting one topic across chapters, ordering material in a way that teaches badly. If the only remedy is regeneration, reviewers either accept a flawed structure or lose their edits — both bad.

Editing operations

  • Rename a chapter or lesson
  • Reorder chapters, and lessons within a chapter
  • Move a lesson between chapters
  • Merge two chapters
  • Split a chapter
  • Delete a chapter or lesson, with clear handling of its lessons and generated content
  • Create a chapter or lesson manually

Behaviour requirements

  • Edits persist immediately and survive reload
  • Manual edits are marked as such, so later regeneration can preserve them (this is what Course base · Re-ingestion behaviour that preserves human edits #165 depends on)
  • Deleting a chapter with lessons prompts rather than silently cascading
  • Reordering updates the pedagogical ordering the outline pipeline produced, without breaking source provenance
  • Undo, or at minimum a confirmation on destructive operations

Tasks

  • API endpoints for each operation, with authorization checks
  • Track edit provenance: which items were human-modified, and when
  • Review UI (app/courses/[courseId]/review/page.tsx) — drag-to-reorder or explicit move controls
  • Ensure lesson content and quizzes follow their lesson when it moves
  • Tests for each operation, including the destructive ones

Acceptance criteria

  • Every operation above works from the review UI and persists
  • Human-edited items are distinguishable from generated ones in the data model
  • Moving a lesson carries its content, quiz and source references
  • Destructive operations confirmed, and covered by tests
  • A reviewer can fully restructure an outline without regenerating

Note

The edit-provenance marking is the part that is easy to skip and expensive to retrofit. Without it, the re-ingestion work (#161) has no way to know what a human changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmvpRequired for the MVP

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions