Skip to content

Add vibe-learning Mini App - #215

Open
Chriswangc wants to merge 3 commits into
MiniMax-AI:mainfrom
Chriswangc:add-vibe-learning
Open

Chriswangc wants to merge 3 commits into
MiniMax-AI:mainfrom
Chriswangc:add-vibe-learning

Conversation

@Chriswangc

@Chriswangc Chriswangc commented Dec 5, 2026 •

Copy link
Copy Markdown

Vibe Learning is a learning page for MiniMax Code: write down one thing you want to understand, and the Agent answers with prose plus a diagram it draws itself, revealing the diagram one step at a time when the topic has a sequence. Select a passage you did not get and ask about it, and the answer arrives in a note card attached to that passage. It is a port of Tasihi89's MIT-licensed Vibe Learning, with the original's single Claude Code seam replaced by the MiniMax Code Agent.

Tested environment

  • MiniMax Code 3.1.23 (build 3.1.23.238) on macOS 27.3, Apple Silicon.
  • The manifest declares "engines": { "mcode": ">=3.1.20" } because the package uses the permissions manifest field, so it needs MiniMax Code 3.1.20 or later.
  • npm run check in this repository: 0 errors, 0 warnings for this package.

What was exercised in the Client:

  • The home page, empty and with projects listed.
  • Creating a project from the home page, which starts a background turn that researches the topic and writes a title, a scope, a briefing document and starter questions. The page picked up the new title without a reload.
  • A full answer: prose plus an Agent-drawn SVG diagram, and a stepped diagram paged through with Next step.
  • Selecting a passage and asking about it: the answer came back inside the note card with its own small diagram.
  • Cancelling an answer in flight: the Agent turn was aborted, the busy state cleared, and no partial record was written.
  • The tool-approval card's layout in the real page.
  • Learning data surviving a runtime restart.

Not verified

  • A live tool-approval round trip. This Host's global permission mode approves tools on its own, so no permission.requested was raised during the session. The approval card's layout was checked in the real page, and the request/decision round trip was checked directly against the Node service.
  • The Agent-driven questionnaire path. A questionnaire raised by the Agent is skipped so that a turn cannot hang; it was never observed in a session.
  • The retell flow (saying the model back in your own words and having the Agent compare and correct it).
  • The course mode, which renders a pre-made course page; no course data ships with this package.

Access this Mini App declares

permissions.agent: ["run"] only.

  • One Agent turn per question, each in a fresh Agent session, plus one background turn per new project that prepares the topic.
  • No session access (permissions.session is not declared), no Connector, no device permission, and no tool access.
  • Tool-permission requests are shown in the page; allowOnce is sent only after the user presses Allow once. Nothing is approved automatically.

npm run check warnings

None for this package.

Written by MiniMax M3.1-Flash

What changed

  • plugins/chriswangc/vibe-learning/ — a new Mini App package.
  • README.md — one row at the top of the MiniApps table.
  • README.zh-CN.md — the matching Chinese row.

Ported from Vibe Learning

The upstream project is a standalone macOS app that drives claude -p on the learner's own machine.
This port keeps the interface, the answer format, the diagram rules and the on-disk data format, and
replaces that one seam with context.agent.run:

Upstream This port
claude -p child process context.agent.run in the Mini App's Node entry
--allowedTools whitelist the Host's permission request, answered by the learner in the page
~/.vibe-learning/ the Host-provided context.dataDir
127.0.0.1:4178 the Host-assigned context.listen port

The upstream MIT license is kept at miniapp/client/LICENSE-vibe-learning-MIT.txt, and the bundled
browser libraries (marked, DOMPurify, KaTeX) keep their own licenses under
miniapp/client/vendor/.

How it works

  • The home page creates a project and the page starts answering the learner's first question.
  • The learning page renders the answer the Agent produced: prose blocks and diagrams the Agent drew
    as SVG. A stepped diagram is revealed one page at a time.
  • The Node entry builds the prompt from the answer specification, the topic, the briefing document
    and the last few questions on the page, then streams the Agent's reply back to the page as NDJSON,
    the same line protocol the upstream project used.
  • Every tool-permission request is surfaced in the page as a card with the tool, the reason and the
    arguments. allowOnce is sent only after the learner presses the button. A request nobody answers
    within 15 minutes is denied so that a turn cannot hang.
  • Durable state is written atomically under context.dataDir as it changes. A deleted project is
    moved aside rather than erased.

Validation run locally

  • The Node entry was exercised against a stubbed Agent: every route, the NDJSON answer stream, the
    topic background turn, the approval round trip, and the path-traversal rejections.
  • node --check on the Node entry, and a parse of the page script.
  • The package was installed in MiniMax Code, published, opened, and put through the Client
    acceptance above.

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

A port of Tasihi89's MIT-licensed Vibe Learning to the MiniMax Code Agent
runtime: the learning page, the question/answer flow, the Agent-drawn
diagrams and the per-project data format are kept as-is, and only the
upstream `claude -p` subprocess is replaced.
Visual: white page, neutral grey surfaces, no borders or shadows, large
radii, pill buttons, sans-serif headings. Brand colours #2293FF (actions),
#29B3FC (hover) and #FF536E (highlights).

Waiting state: the node entry now forwards turn.started, run.queued and
tool.finished, so the page shows the real phase, tool steps, queue position,
model and elapsed time instead of an opaque spinner.

Desktop: the top bar now scales with the content, and the three-column
breakpoint moves from 900px to 1120px.
Skill learning: a project is either a single topic or a skill. A skill project
gets a roadmap of 4-8 sections in topic.json (optional `syllabus` field, so old
projects are unaffected), each with a goal and the question that opens it.
Picking a section fills the input; asking marks the section learned, and it can
be unticked. Switching back to single topic only hides the roadmap and keeps the
data; regenerating clears the learned marks and the section tags on answers.

Export: the whole project or one answer as a single self-contained HTML file
(marked, DOMPurify, KaTeX with its fonts, and the project's screenshots all
inlined), or printed to PDF with stepped diagrams expanded one figure per step.
The exported file hides everything that needs the local service.

Desktop fit: the page scales up to 1.6x on very wide windows, diagrams keep a
minimum width and scroll sideways in narrow windows, and the reading position
is held when the window size changes.
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