Skip to content

feat(weapp): upgrade toolchain and add web preview - #11

Merged
daguanren21 merged 3 commits into
mainfrom
feature/weapp-web-preview
Sep 11, 2026
Merged

daguanren21 merged 3 commits into
mainfrom
feature/weapp-web-preview

Conversation

@daguanren21

Copy link
Copy Markdown
Owner

Problem / Goal

Upgrade the WeChat mini-program toolchain without pinning patch versions, keep native-safe Wevu prop descriptors, restyle Weapp Agent UI status variants with class modifiers, and add a private browser preview for compiled mini-program artifacts.

Reproduction / Baseline

Pinned wevu@7.0.4 / weapp-vite@7.0.4 / weapp-tailwindcss@^5.5.1, plus a local wevu patch. Component WXSS used [data-status] / [data-kind] selectors that fail WeChat component style verification. No in-repo Web host for compiled Wevu JS/JSON/WXML/WXSS.

Root cause / Design

  • Toolchain ranges stay on 7.x / 5.x caret ranges; lockfile records the current compatible versions.
  • The wevu setup-return-function/setupState mismatch is reported upstream instead of patched locally: [Bug]: setup 返回的函数没有写入 setupState,proxy / bindModel 读不到 weapp-vite/weapp-vite#986
  • Weapp Agent UI status styling uses class modifiers (is-running, is-failed, is-completed, …). data-* remains for tests/ARIA.
  • WXML attribute values are precomputed in script (no ternary / ?. / ?? in generated attributes).
  • Private @varo/weapp-web plus @varo/playground-weapp-preview host compiled Wevu artifacts in glass-easel. This is not a WeChat client emulator.

Control

Single sequential change on feature/weapp-web-preview. Failed typecheck/lint/build blocks commit and PR.

Change

  • Unpin wevu, weapp-vite, and weapp-tailwindcss; remove patchedDependencies.
  • Restyle Weapp Agent UI status variants with class modifiers and typed aria-current.
  • Add private @varo/weapp-web runtime/plugin and @varo/playground-weapp-preview.
  • Document the browser preview path; lockfile records SDK versions (no patches/).
  • Patch changeset for @varo-ui/weapp and @varo-ui/cli (fixed public group).

Non-goals

  • No public npm release of @varo/weapp-web.
  • No WeChat login/payment emulation.
  • No force-pin of toolchain patch versions.
  • No merge, release, or deploy in this PR.

Verification

Acceptance Surface Evidence Result
Playground Weapp production build and component-path/WXSS verifier pass pnpm --filter @varo/playground-weapp build Verified mini-program component paths and compiled styles pass
Agent UI + WXML-safe delivery contracts pass pnpm --filter @varo/playground-weapp test -- src/agent-advanced.test.ts src/agent-rag.test.ts src/agent-workspace.test.ts e2e/dialog.spec.ts 11 files / 55 tests pass
Compiled Agent UI component WXSS has no attribute selectors devtools/build/mp-weixin/components/agent-ui/*.wxss class modifiers is-completed / is-running / is-failed pass
Commit hooks pass husky pre-commit typecheck/eslint/stylelint commit afc0429 pass

Risks

  • Compatibility: consumers still need Wevu 7 / weapp-vite 7; patch bump, not major. Upstream setupState bug remains until weapp-vite/wevu ships a fix.
  • Security/privacy: preview is a local sandbox; unsupported wx APIs fail instead of fabricating success. Tencent Map demo key is preview-only.
  • Performance/resources: glass-easel DOM host is for compatibility preview, not device performance.
  • Platform/runtime: WeChat-specific capabilities still require DevTools/device validation.

Rollback

Revert this PR. No data migration. Lockfile and changeset restore the previous toolchain ranges.

Related

Upgrade wevu, weapp-vite, and weapp-tailwindcss without pinning patch
versions, restyle Weapp Agent UI status variants with class modifiers,
and add a private Web compatibility preview for compiled mini-program
artifacts.
@changeset-bot

changeset-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6505694

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 167 files, which is 67 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

Check out review usage here.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: fe52598c-593f-4835-9b1a-d24fbe891f3c

📥 Commits

Reviewing files that changed from the base of the PR and between fefd8c7 and 6505694.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (167)
  • .changeset/clear-weapp-preview.md
  • .changeset/spotty-geckos-flow.md
  • apps/docs/.vitepress/config.ts
  • apps/docs/.vitepress/theme/agent-docs.css
  • apps/docs/.vitepress/theme/index.ts
  • apps/docs/ai/index.md
  • apps/docs/ai/rag-pipeline.md
  • apps/docs/components/map.md
  • apps/docs/components/robot-chat.md
  • apps/docs/en/ai/index.md
  • apps/docs/en/ai/rag-pipeline.md
  • apps/docs/en/components/map.md
  • apps/docs/en/components/robot-chat.md
  • apps/docs/en/guide/installation.md
  • apps/docs/guide/installation.md
  • apps/docs/src/agent-component-catalog.ts
  • apps/docs/src/components/AgentComponentDemo.test.ts
  • apps/docs/src/components/AgentComponentDemo.vue
  • apps/docs/src/components/AgentComponentsDemo.test.ts
  • apps/docs/src/components/AgentComponentsDemo.vue
  • apps/docs/src/components/MapDemo.test.ts
  • apps/docs/src/components/MapDemo.vue
  • apps/docs/src/components/RobotChatDemo.test.ts
  • apps/docs/src/components/RobotChatDemo.vue
  • apps/docs/src/components/agent-ui/AgentRagPipeline.vue
  • apps/docs/src/components/agent-ui/advanced.ts
  • apps/docs/src/components/agent-ui/agent-advanced.css
  • apps/docs/src/components/agent-ui/agent-ui.css
  • apps/docs/src/components/agent-ui/index.ts
  • apps/docs/src/components/agent-ui/rag-icons.ts
  • apps/docs/src/components/agent-ui/rag-pipeline.ts
  • apps/docs/src/components/tencent-map.ts
  • apps/docs/src/composables/useRagPipelineDemo.ts
  • apps/playground-h5/src/components/agent-ui/AgentRagPipeline.vue
  • apps/playground-h5/src/components/agent-ui/advanced.ts
  • apps/playground-h5/src/components/agent-ui/agent-advanced.css
  • apps/playground-h5/src/components/agent-ui/agent-ui.css
  • apps/playground-h5/src/components/agent-ui/index.ts
  • apps/playground-weapp-preview/index.html
  • apps/playground-weapp-preview/package.json
  • apps/playground-weapp-preview/runtime.html
  • apps/playground-weapp-preview/scripts/smoke-preview.mjs
  • apps/playground-weapp-preview/src/App.vue
  • apps/playground-weapp-preview/src/components/PreviewFrame.vue
  • apps/playground-weapp-preview/src/components/PreviewToolbar.vue
  • apps/playground-weapp-preview/src/env.d.ts
  • apps/playground-weapp-preview/src/main.ts
  • apps/playground-weapp-preview/src/protocol.ts
  • apps/playground-weapp-preview/src/runtime/entry.ts
  • apps/playground-weapp-preview/src/runtime/index.ts
  • apps/playground-weapp-preview/src/runtime/runtime.css
  • apps/playground-weapp-preview/src/styles.css
  • apps/playground-weapp-preview/tsconfig.json
  • apps/playground-weapp-preview/vite.config.ts
  • apps/playground-weapp/package.json
  • apps/playground-weapp/src/app.vue
  • apps/playground-weapp/src/components/agent-ui/AgentActivity.vue
  • apps/playground-weapp/src/components/agent-ui/AgentArtifact.vue
  • apps/playground-weapp/src/components/agent-ui/AgentCitations.vue
  • apps/playground-weapp/src/components/agent-ui/AgentCommandSearch.vue
  • apps/playground-weapp/src/components/agent-ui/AgentComposerScope.vue
  • apps/playground-weapp/src/components/agent-ui/AgentContextCard.vue
  • apps/playground-weapp/src/components/agent-ui/AgentFineTune.vue
  • apps/playground-weapp/src/components/agent-ui/AgentFlowchart.vue
  • apps/playground-weapp/src/components/agent-ui/AgentInsightCard.vue
  • apps/playground-weapp/src/components/agent-ui/AgentMarkdownNode.vue
  • apps/playground-weapp/src/components/agent-ui/AgentRetrievalProgress.vue
  • apps/playground-weapp/src/components/agent-ui/AgentSelectionActions.vue
  • apps/playground-weapp/src/components/agent-ui/AgentSidebar.vue
  • apps/playground-weapp/src/components/agent-ui/AgentSourceReceipt.vue
  • apps/playground-weapp/src/components/agent-ui/AgentTaskList.vue
  • apps/playground-weapp/src/components/agent-ui/AgentTaskRunner.vue
  • apps/playground-weapp/src/components/agent-ui/AgentThreadVersions.vue
  • apps/playground-weapp/src/components/agent-ui/AgentToolResult.vue
  • apps/playground-weapp/src/components/agent-ui/agent-icons.ts
  • apps/playground-weapp/src/components/ui/v-input.vue
  • apps/playground-weapp/src/components/ui/v-textarea.vue
  • apps/playground-weapp/src/pages/web-preview-agent/index.vue
  • apps/playground-weapp/src/pages/web-preview-map/index.vue
  • apps/playground-weapp/src/pages/web-preview-rag/index.vue
  • apps/playground-weapp/src/pages/web-preview-robot-chat/index.vue
  • apps/playground-weapp/src/pages/web-preview/PreviewContextConsumer.vue
  • apps/playground-weapp/src/pages/web-preview/PreviewContextProvider.vue
  • apps/playground-weapp/src/pages/web-preview/index.vue
  • apps/playground-weapp/src/pages/web-preview/preview-context.ts
  • apps/realworld-weapp/package.json
  • apps/realworld-weapp/pnpm-workspace.yaml
  • package.json
  • packages/cli/registry/components/agent-ui/AgentActivity.vue
  • packages/cli/registry/components/agent-ui/AgentApproval.vue
  • packages/cli/registry/components/agent-ui/AgentArtifact.vue
  • packages/cli/registry/components/agent-ui/AgentComposerScope.vue
  • packages/cli/registry/components/agent-ui/AgentFileDiff.vue
  • packages/cli/registry/components/agent-ui/AgentFlowchart.vue
  • packages/cli/registry/components/agent-ui/AgentInsightCard.vue
  • packages/cli/registry/components/agent-ui/AgentRetrievalProgress.vue
  • packages/cli/registry/components/agent-ui/AgentSidebar.vue
  • packages/cli/registry/components/agent-ui/AgentSourceReceipt.vue
  • packages/cli/registry/components/agent-ui/AgentTaskList.vue
  • packages/cli/registry/components/agent-ui/AgentTaskRunner.vue
  • packages/cli/registry/components/agent-ui/AgentThreadVersions.vue
  • packages/cli/registry/components/agent-ui/AgentToolResult.vue
  • packages/cli/registry/components/agent-ui/agent-file-diff.css
  • packages/cli/registry/components/agent-ui/agent-icons.ts
  • packages/cli/registry/components/agent-ui/h5/agent-ui.css
  • packages/cli/registry/components/agent-ui/h5/index.ts
  • packages/theme/src/weapp-vite.ts
  • packages/theme/tests/weapp-vite.test.ts
  • packages/ui-weapp/README.md
  • packages/ui-weapp/package.json
  • packages/weapp-web/package.json
  • packages/weapp-web/src/index.ts
  • packages/weapp-web/src/plugin/index.ts
  • packages/weapp-web/src/plugin/native-artifacts.ts
  • packages/weapp-web/src/plugin/options.ts
  • packages/weapp-web/src/plugin/source-scanners.ts
  • packages/weapp-web/src/runtime/artifacts.ts
  • packages/weapp-web/src/runtime/backend.ts
  • packages/weapp-web/src/runtime/harness.ts
  • packages/weapp-web/src/runtime/index.ts
  • packages/weapp-web/src/runtime/module-loader.ts
  • packages/weapp-web/src/runtime/mount.ts
  • packages/weapp-web/src/runtime/native-elements.css
  • packages/weapp-web/src/runtime/native-elements.ts
  • packages/weapp-web/src/runtime/native-host.ts
  • packages/weapp-web/src/runtime/native-templates.ts
  • packages/weapp-web/src/runtime/session.ts
  • packages/weapp-web/src/runtime/tencent-map.ts
  • packages/weapp-web/src/runtime/wx-host.ts
  • packages/weapp-web/src/virtual.d.ts
  • packages/weapp-web/tests/module-loader.test.ts
  • packages/weapp-web/tests/native-artifacts-plugin.test.ts
  • packages/weapp-web/tests/plugin-options.test.ts
  • packages/weapp-web/tests/source-scanners.test.ts
  • packages/weapp-web/tests/tencent-map.test.ts
  • packages/weapp-web/tsconfig.json
  • registry/component-tiers.v0.1.json
  • registry/components/agent-ui/AgentActivity.vue
  • registry/components/agent-ui/AgentArtifact.vue
  • registry/components/agent-ui/AgentCitations.vue
  • registry/components/agent-ui/AgentCommandSearch.vue
  • registry/components/agent-ui/AgentComposerScope.vue
  • registry/components/agent-ui/AgentContextCard.vue
  • registry/components/agent-ui/AgentFineTune.vue
  • registry/components/agent-ui/AgentFlowchart.vue
  • registry/components/agent-ui/AgentInsightCard.vue
  • registry/components/agent-ui/AgentMarkdownNode.vue
  • registry/components/agent-ui/AgentRetrievalProgress.vue
  • registry/components/agent-ui/AgentSelectionActions.vue
  • registry/components/agent-ui/AgentSidebar.vue
  • registry/components/agent-ui/AgentSourceReceipt.vue
  • registry/components/agent-ui/AgentTaskList.vue
  • registry/components/agent-ui/AgentTaskRunner.vue
  • registry/components/agent-ui/AgentThreadVersions.vue
  • registry/components/agent-ui/AgentToolResult.vue
  • registry/components/agent-ui/advanced.ts
  • registry/components/agent-ui/agent-advanced.css
  • registry/components/agent-ui/agent-icons.ts
  • registry/components/agent-ui/h5/AgentRagPipeline.vue
  • registry/components/agent-ui/h5/agent-ui.css
  • registry/components/agent-ui/h5/index.ts
  • registry/components/input/v-input.vue
  • registry/components/textarea/v-textarea.vue
  • stylelint.config.js
  • tsconfig.base.json
  • turbo.json
  • vitest.config.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Drop the consumed wevu-seven-components intent after the 2.0.0 release
and record the remaining Wevu toolchain, Agent UI class-modifier, and
Web preview work as a patch changeset.
weapp-vite 7.1 wraps app.scss as a JavaScript default export. Skip that
sidecar during transform and append page theme variables to compiled
app.wxss so realworld production builds stay parseable.
@daguanren21
daguanren21 merged commit 0e83edf into main Sep 11, 2026
2 checks passed
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