Skip to content

Implement Tutorial v2 module - #3445

Open
nighca wants to merge 24 commits into
goplus:issue-3403-tutorial-v2from
nighca:issue-3419
Open

Implement Tutorial v2 module#3445
nighca wants to merge 24 commits into
goplus:issue-3403-tutorial-v2from
nighca:issue-3419

Conversation

@nighca

@nighca nighca commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • introduce the ID-based Tutorial facade that loads Course data and dispatches to Guided or Playground learning flows
  • retain Guided Courses as a global, session-storage-backed GuidedTutorial, while Playground Courses are route-local sessions
  • add the Playground Course route and reusable CoursePlayground composition for its ownerless project, inEditorPath, editor providers, and learner-facing presentation
  • implement the route-local Playground runner: XGo execution, Copilot session, Tutorial framework host, and Runtime/Copilot event forwarding
  • establish explicit Runner terminal events and component-owned Runner lifetime
  • align Course and Course Series API data with Tutorial v2's discriminated contract
  • update the Tutorial v2 documentation to describe the established module boundary and ownership split

Design status

This PR establishes the intended overall shape and responsibility distribution of Tutorial v2; it is not an exploratory prototype. Some integrations remain intentionally narrow until their owning work lands:

Follow-up refinement can improve these details without changing the module boundary introduced here.

Validation

  • vue-tsc --build --force
  • ESLint on changed frontend files
  • focused Vitest for the Playground Runner (4 tests)
  • real headless-Chrome flow for the mock Playground Course:
    • showMessage is presented
    • dismissing it reaches the completion modal
    • the Monaco editor remains mounted behind both dialogs
  • git diff --check

Refs #3419

Ethanlita added a commit to Ethanlita/builder that referenced this pull request Aug 24, 2026
The Tutorial lifecycle prototype (goplus#3445) reads the completion feedback
from a feedback field, and the name also says what the value is. Align
the wire shape before either side ships.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Ethanlita added a commit to Ethanlita/builder that referenced this pull request Aug 24, 2026
The contract (tutorial-class-framework.go / module_TutorialFramework.ts)
declares completeWith(message); the earlier switch to a {feedback} wire
field (b3784e9) followed the goplus#3445 prototype instead of the contract.
The contract is the source of truth, so revert to the {content} shape
shared by the other presentation capabilities and name the parameter
message; the prototype side should align with the contract instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@nighca nighca changed the title Prototype Tutorial lifecycle boundary Implement Tutorial v2 module Aug 26, 2026
@nighca
nighca marked this pull request as ready for review August 26, 2026 12:22
},
"copilotContext": "Help the learner understand stepTo without writing the solution for them. The goal is to move Lita to Mushroom.",
"inEditorRoute": "/simple/sprites/Lita"
"inEditorPath": "/simple/sprites/Lita"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个字段命名调整是为了跟现有的 editor 的路由参数名保持一致

content: FileCollection;
};
/** Current unsaved Playground Course content used to generate its Copilot context. */
export type GeneratePlaygroundCourseCopilotContextParams = Pick<

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这些类型名调整是为了跟原来代码中相关的类型命名风格保持一致。

type Course struct {
Editor Editor
onStart func()
done chan struct{}

@nighca nighca Aug 28, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这边 class framework 的改动只是为了把我 mock 数据中的逻辑能跑起来,最终以 #3442 为准

super.dispose()
}

private createFramework(): XGoFramework {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里应该是回头要改成调用 #3442 提供的 createTutorialFramework

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant