Skip to content

Add Learn Workbench Mini App - #173

Open
meisijiya wants to merge 1 commit into
MiniMax-AI:mainfrom
meisijiya:add-learn-workbench
Open

meisijiya wants to merge 1 commit into
MiniMax-AI:mainfrom
meisijiya:add-learn-workbench

Conversation

@meisijiya

@meisijiya meisijiya commented Nov 27, 2026 •

Copy link
Copy Markdown

Add Learn Workbench, a teach-method learning workbench for MiniMax Code. Pick a learning folder, let the Agent write the mission and curriculum, and give every lesson its own branch conversation. It also annotates lessons, distils notes, and opens file links at the matching lines in an in-app panel.

Tested environment

  • MiniMax Code 3.1.19 on Windows 11 (10.0.26200).
  • Tested: setup; curriculum generation and regeneration (lesson titles, claimed files and statuses preserved); lesson generation; per-lesson rewrite; clean-then-regenerate; annotations and highlights; note extraction; the code-link panel; workspace create, import and remove.
  • Not verified: macOS, Linux, clients older than 3.1.19, and very long conversations.

Checks

  • node scripts/validate.mjs: plugins/meisijiya/learn-workbench: OK, examples/hello-miniapp: OK, repository: OK (0 errors, 0 warnings).
  • npm test: 94 pass, 2 fail. Both failures are the repository's own symlink tests in test/files.test.mjs, which fail with EPERM on Windows because creating symlinks requires Developer Mode or administrator rights. They are unrelated to this package and should pass on macOS/Linux.

Access

Declares agentAccess: ["session.run"], agentConcurrency: 4 and surface.window; minimum client MiniMax Code 3.1.2. No MCP endpoints, no device access, no host-navigation read. File access is limited to the learning folder the user picks; details are in the package README under "Data & access".

Written with MiniMax Code

A teach-method learning workbench: mission and curriculum written by the main conversation, a branch conversation per lesson that writes one self-contained HTML lesson, text-selection annotations with highlights, note extraction into Markdown, a floating code panel for file links such as main.py:608, and workspace management (create/import/remove, per-lesson regenerate, clean artifacts, model switch). The package is self-contained (no build step, no node_modules) and is the same code published at https://github.com/meisijiya/learn-workbench-miniapp.


Show it working
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@MyPrototypeWhat MyPrototypeWhat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the Learn Workbench PR. We re-checked on 7e56fde8. This isn't ready to merge yet.

The blocking issue is the lesson iframe. Lessons are served same-origin from /w/... and loaded with sandbox="allow-scripts allow-same-origin allow-popups allow-modals" in app.js. LESSON_CSP sets connect-src 'none', which only blocks fetches made by the iframe itself. With allow-scripts and allow-same-origin together, a script in a lesson page can reach the parent page — its DOM, storage, and parent.fetch. We independently confirmed that code setup. A review run also showed that a lesson script could change the parent title, write the parent's localStorage and cookies, inject a script into the parent, and call /api/bootstrap (which includes home and drives) and /api/fs/list?path=/ through parent.fetch and get a 200. Dropping allow-same-origin turned those accesses into SecurityError. Lesson HTML is generated from web research and is allowed to run its own scripts, so this isn't just theoretical.

A few related points, not all of them blockers in the same way:

  • /api/fs/list will list any absolute directory. That fits the folder picker, but combined with the iframe issue, a lesson script can browse outside the workspace.
  • resolveInside (and the create path) only do lexical path.resolve / path.relative. They do not realpath, so a symlink inside the workspace can be read, and create can follow a link past the home-directory / drive-root string checks.
  • The main session automatically allowOnces writes to workspace files classified as other (neverProtect). If someone imports an existing project, that can touch non-workbench files. We did not run this through the Host to a disk write.
  • The icon is the default hello-miniapp bar-chart graphic. It is a real, recognizable image, so we are not blocking on that alone, but it is not specific to this plugin.
  • There are no package tests, and the PR body has no hosted screenshots or video of the product UI.

Please tighten the lesson sandbox so a lesson page cannot reach the parent page or its APIs, and look at the path and write-scope issues above. Happy to re-review once that's in.

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.

2 participants