Parent
Part of #3403.
Background
Playground Course content crosses the Course API boundary as an opaque FileCollection. The frontend needs a typed Tutorial-project business model, analogous to the existing SPX models in spx-gui/src/models/spx/, to own the Course project format and safely turn it into the in-memory representations used by authoring, preview and learning.
Scope
- Add frontend Tutorial-project domain models under
spx-gui/src/models/ following the conventions used by spx-gui/src/models/spx/.
- Define the typed representation and validation/loading/serialization boundary for the Tutorial-project file collection: Course metadata, embedded SPX project files, Tutorial program and course-local assets.
- Keep the persisted/API representation as
FileCollection; interpret it into the typed model only in the frontend.
- Provide the model operations needed to construct an ownerless in-memory
SpxProject, clone project state for preview/learning, and serialize updated Course content without leaking mutable author state.
- Add focused tests for valid and invalid Tutorial-project file collections and for clone/round-trip behavior.
Design references
Acceptance criteria
- The model has a single documented mapping between the opaque
FileCollection and the typed Tutorial-project representation.
- Invalid or incomplete Course content is reported as a model/load error rather than reaching editor or Tutorial runtime code as unchecked paths.
- Loading, editing, cloning and serializing do not share mutable project/file state between the author, preview and learner sessions.
- The model creates an in-memory SPX project without owner or cloud-project identity, preserving the existing effect-free editor behavior.
Dependencies
Development coordination
Follow the coordination requirements in #3403:
- Create the implementation branch from the latest
goplus/issue-3403-tutorial-v2 and target that integration branch in the pull request until the initiative is integrated into dev.
- Follow the User Tutorial v2 product design and the relevant contracts in the Tutorial v2 tech design.
- If this work changes a shared decision or module contract, update the corresponding design document in the same child PR rather than silently diverging from it.
Parent
Part of #3403.
Background
Playground Course content crosses the Course API boundary as an opaque
FileCollection. The frontend needs a typed Tutorial-project business model, analogous to the existing SPX models inspx-gui/src/models/spx/, to own the Course project format and safely turn it into the in-memory representations used by authoring, preview and learning.Scope
spx-gui/src/models/following the conventions used byspx-gui/src/models/spx/.FileCollection; interpret it into the typed model only in the frontend.SpxProject, clone project state for preview/learning, and serialize updated Course content without leaking mutable author state.Design references
Acceptance criteria
FileCollectionand the typed Tutorial-project representation.Dependencies
Development coordination
Follow the coordination requirements in #3403:
goplus/issue-3403-tutorial-v2and target that integration branch in the pull request until the initiative is integrated intodev.