Skip to content

[codex] 新增微信小程序开发者 Mini App - #67

Closed
AdhereZ wants to merge 6 commits into
MiniMax-AI:mainfrom
AdhereZ:codex/wechat-miniprogram-preview
Closed

AdhereZ wants to merge 6 commits into
MiniMax-AI:mainfrom
AdhereZ:codex/wechat-miniprogram-preview

Conversation

@AdhereZ

@AdhereZ AdhereZ commented Oct 23, 2026 •

Copy link
Copy Markdown

改动概述 / Summary

新增独立可安装的 plugins/adherez/wechat-miniprogram-preview/(0.5.0-rc.1),并在根目录中英文作品列表登记。This package previews existing native WeChat Mini Programs and Mini Games inside the same MiniMax Code Mini App, rather than generating a replacement HTML application.

  • 小程序:WXML/WXSS/JS/TS 编译、预构建 npm/CommonJS/ESM 依赖图、glass-easel 组件层、有限 wx API。
  • 页面栈:前进/返回保留 Page、组件、原生输入草稿、滚动和动画状态;支持 redirect、tab 页复用、reLaunch 和栈上限。
  • 小游戏:独立 Canvas2D/WebGL runtime、本地素材、DPR/方向、生命周期和聊天侧控制。
  • 单刷新按钮的手机预览;固定胶囊、正确的导航颜色默认值、刘海;移除蜂窝网络信号图标,保留时间/Wi-Fi/电池。
  • 文件监听与重建、不可变资源、预览租约、Storage revision/CAS、显式恢复和导出。刷新不是 HMR。
  • 同时提交运行时 bundle、上游许可证、构建源码、锁文件、定向测试及专属 Agent Skill,安装无需 npm install/build。

Public-package preparation

  • Added English and Chinese READMEs with installation, tested environment, limitations, and explicit Data & access disclosures; added MIT LICENSE.
  • Kept the runtime implementation from the locally exercised package; relocated demo READMEs out of the runtime payload and removed two whitespace issues.
  • Updated the ZIP packager to include both READMEs and LICENSE.
  • Excluded internal development/acceptance ledgers, actual session IDs, personal paths, screenshots, user projects, installed state, caches and node_modules. Bundled demos/assets are synthetic.
  • No WeChat DevTools or WorkBuddy executable/SDK bundle is redistributed. Open-source dependency notices remain in both vendor directories. The subsequent branding update includes the WeChat DevTools application icon with a separate rights notice; see the merge-blocking asset review below.

Validation

  • npm run check: passed (repository validator plus 69 tests, zero errors).
  • pnpm install --frozen-lockfile --ignore-scripts and pnpm run build: passed; regenerated vendor bundles were byte-identical to the supplied bundles.
  • 271 focused Node tests passed on this commit across compilation, rendering, page stacks, HTTP/MCP/SSE, shell lifecycle, path validation, Storage/CAS, recovery and migration. No package-wide wildcard test run.
  • node scripts/package.mjs ...: passed; isolated staged imports, Mini Program compilation, Canvas2D/WebGL demo compilation and basic program jsdom startup passed. LICENSE and both READMEs included; no source/test/dependency folders in the install ZIP.
  • git diff --check: passed. Public-content scan found no user-specific paths/session IDs, private keys or token literals.

Validator warnings

The new package has six ENTRY_STDOUT warnings, all from the source fixtures under miniapp/node/demo*/ (game entry files, Mini Program app entry and three page entries). They are read/compiled as project data and executed inside the sandboxed browser preview. Their console messages are intentionally captured by the preview log bridge; they are never imported/executed as Host Node entry code. The actual Node entry uses context.logger and does not write to Host stdout. Keeping these logs demonstrates runtime diagnostics. Existing warnings on other contributors' packages are unchanged and out of scope.

Tested environment and remaining evidence

  • Development environment: MiniMax Code 3.1.4 on macOS/Apple Silicon, Node.js 22.
  • The local development package has been installed/started in the real desktop Host and exercised with Mini Program and Canvas2D/WebGL previews. Recent page-stack/chrome/notch behavior also has isolated Chromium evidence.
  • The final cellular-icon removal was installed without an additional visual acceptance pass, as requested during development. This PR's exact public-package install flow was not re-run in the desktop Host; source/test/package checks are not claimed as a new full Host acceptance run.
  • Windows/Linux desktop hosts, large game engines and real WeChat devices have not been verified. Login/payment/cloud/network APIs, Worker/WASM, native transitions, full EventChannel/custom tab bars and upload/release are not supported.

Data and risk boundaries

Node reads only explicit project/source/resource paths and its own package; it does not modify projects or spawn processes. Durable state is stored only under opaque context.dataDir. No Host credentials/history/database paths are read. The page declares no agentAccess and initiates no Agent turns. The surrounding chat can use the managed MCP endpoint.

Node has no outbound network traffic. Project-authored HTTPS image URLs can contact arbitrary image hosts; this is disclosed, not described as a fully offline or hostile-code-safe sandbox. wx.request is unsupported and the iframe uses connect-src 'none'. Application logs may contain project text. Takeover/discard/close remain explicitly confirmed actions; saved Storage does not preserve in-memory page stacks across restarts.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Branding update (9449c0b)

  • 显示名、页面标题、空态名称及仓库列表改为「微信小程序开发者」(English: WeChat Mini Program Developer),插件 ID 继续为 wechat-miniprogram-preview,不改变现有安装和数据身份。
  • 简化描述为「用于微信小程序与小游戏的本地开发预览,支持页面交互、自动更新、运行日志和错误排查。」
  • 按贡献者要求,将应用图标换为本机 WeChat DevTools Nightly 2.02.2607162 的应用图标,转换为 256×256 PNG。
  • Asset rights review required before merge/distribution: the icon is Tencent brand material, excluded from MIT. Redistribution permission has not been established. docs/assets.md, both READMEs and LICENSE disclose provenance, the rights boundary and no affiliation/endorsement. Attribution does not grant permission. Please confirm applicable permission or substitute a properly licensed icon before merging; keep this PR Draft.
  • This follow-up passed npm run check (69 repository tests; same six demo-console warnings), six focused HTTP/shell tests, and staging/package checks. It was not reinstalled into the contributor's live desktop profile.

@AdhereZ AdhereZ changed the title [codex] 新增微信小程序与小游戏本地预览 Mini App [codex] 新增微信小程序开发者 Mini App Oct 23, 2026
@AdhereZ
AdhereZ marked this pull request as ready for review October 23, 2026 10:18
Docs-Impact: update plugin metadata version and author.
@AdhereZ AdhereZ closed this Oct 23, 2026
@AdhereZ
AdhereZ deleted the codex/wechat-miniprogram-preview branch October 23, 2026 10:52
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