Summary
Covers Mollie-style duplicate module sessions; branch from live assignments model
0Questions
0Links
0Comments
0PRs
Spec body
# Free module navigation Students should be able to move freely between the modules in an assignment without being forced through a strictly sequential tutor flow. The current flow was built around the old `StudentCourse` sequence: students start at module 1, complete it, click through a confirmation gate, then the app creates or advances them into module 2, then module 3, and so on. That no longer matches how teachers and students want to use the writing process. Students need to revisit thesis, intro, body, conclusion, and title work as their essay changes. ## Product decision Remove the sequential progression gate from the student tutor/module experience. Treat assignment modules as a freely navigable set ordered by the AssignmentType's module positions. Students can: - Move forward to any later module without completing earlier module state. - Move backward to any earlier module without losing the chat/feedback that already happened there. - Re-enter a module and see the existing session for that module/document instead of creating a duplicate fresh session. - Continue writing in the editor while switching modules. ## Why now Mollie Bridges's "Immigration Essay" incident exposed the failure mode: the system created multiple Thesis Statement sessions for the same document, so feedback existed in older sessions but the UI could look reset. This is the same class of problem as: - [Cannot revisit earlier section to get feedback](../bugs/cant-revisit-section-with-feedback.md) - [Next button stuck moving between sections](../bugs/next-button-stuck-section-transition.md) Those should collapse into this feature/fix rather than being handled as isolated button bugs. ## Scope ### Data model / server behavior - Enforce one active module session per `(documentId, assignmentTypeModuleId)` or the current equivalent on `assignments-unification`. - Session creation must be idempotent: if the student opens a module that already has a session for this document, return that session. - Existing duplicate sessions should not be deleted blindly. Prefer choosing the newest non-empty session for display and leaving old sessions available for migration/forensics. - The document route should load all relevant module sessions sorted by the AssignmentType module order, not by "latest session means current step." ### UX behavior - Replace the current forward/back confirmation gate with direct module navigation. - Show every module in assignment order. - Selecting a module swaps the tutor/session panel to that module. - "Next" and "Back" become simple navigation affordances, not completion gates. - Prior tutor messages remain visible when revisiting a module. ### Out of scope - Teacher-authored per-module lock rules. - Minimum word-count/time gates before feedback. That belongs to [Teacher feedback gates](teacher-feedback-gates.md). - Revision/graded-feedback flow. This is the pre-submission writing flow. ## Engineering notes Branch from `assignments-unification`; do not build this on old `StudentCourse` terminology unless the branch still exposes compatibility names. Likely touched surfaces: - Student document route loader for module/session ordering. - Module-session create endpoint, making it idempotent. - Tutor component navigation/gate logic. - Assignment-start route if it eagerly creates only the first module session. - E2E coverage for free module movement and duplicate-session prevention. ## Acceptance criteria - Student can open a new assignment and jump directly from the first module to a later module. - Student can go back to an earlier module and still see previous tutor messages/feedback. - Reopening the same module does not create another module-session row for the same document/module. - Mollie-style case is covered: repeated entry into Thesis Statement reuses the prior Thesis Statement session. - Existing documents with duplicate sessions still render without data loss. - Targeted tests cover server idempotency and the student navigation flow.
Repo sync
No repo sync metadata recorded yet.