Skip to content

feat: 升级next-sdk - #226

Merged
zzcr merged 4 commits into
devfrom
wyp/sdk-0722
Jul 22, 2026
Merged

feat: 升级next-sdk#226
zzcr merged 4 commits into
devfrom
wyp/sdk-0722

Conversation

@wuyiping0628

@wuyiping0628 wuyiping0628 commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

  • Improvements
    • Updated model-driven tool registration to use the document context (instead of navigator) across navigation, localization, menu, permission, role, and user management flows for improved browser compatibility.
    • Refreshed runtime dependencies (including SDK/polyfill version updates) for alignment with newer releases.
  • Bug Fixes
    • Preserved user-facing error behavior in locale, menu, and role operations, keeping consistent notifications and UI/state refresh after failures.

@github-actions github-actions Bot added the enhancement New feature or request label Jul 22, 2026
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5f048d59-f776-46c1-9025-b3c1666d2639

📥 Commits

Reviewing files that changed from the base of the PR and between 47ebb24 and a480d40.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • template/tinyvue/package.json
  • template/tinyvue/src/App.vue
💤 Files with no reviewable changes (1)
  • template/tinyvue/src/App.vue

Walkthrough

Updates TinyVue runtime dependencies, removes the next-remoter stylesheet and package, and changes model tool registration from navigator.modelContext to document.modelContext across application and feature components. Existing handlers remain functionally unchanged.

Changes

TinyVue model context integration

Layer / File(s) Summary
Runtime package versions and remoter removal
template/tinyvue/package.json, template/tinyvue/src/App.vue
Updates WebMCP and SDK versions, removes @opentiny/next-remoter, and removes its stylesheet import.
Application tool registration
template/tinyvue/src/App.vue
Registers navigate_url and system-overview through document.modelContext.
Feature tool registration and handlers
template/tinyvue/src/views/locale/..., template/tinyvue/src/views/menu/..., template/tinyvue/src/views/permission/..., template/tinyvue/src/views/role/..., template/tinyvue/src/views/userManager/...
Switches feature tool registrations to document.modelContext while preserving existing error handling, loading, refresh, and execution behavior.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Poem

A rabbit hops through tools tonight,
document.modelContext sets them right.
The SDK springs to versions new,
While menus keep their familiar view.
The remoter stylesheet fades away—
And all the tools still know what to say.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: upgrading next-sdk.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch wyp/sdk-0722

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
template/tinyvue/src/App.vue (1)

28-28: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Handle rejected registerTool calls consistently.

Every changed registration is fire-and-forget. WebMCP registration can reject when permissions or validation fail, so wrap each call in await/try-catch or explicitly handle the promise to avoid unhandled rejections and missing tools. (developer.chrome.com)

  • template/tinyvue/src/App.vue#L28-L28: handle navigate_url registration failure.
  • template/tinyvue/src/App.vue#L46-L46: handle system-overview registration failure.
  • template/tinyvue/src/views/locale/components/add-locale.vue#L138-L138: handle add-i18n-entry registration failure.
  • template/tinyvue/src/views/menu/info/components/info-tab.vue#L243-L243: handle add-menu registration failure.
  • template/tinyvue/src/views/permission/info/components/info-tab.vue#L201-L201: handle add-permission registration failure.
  • template/tinyvue/src/views/role/info/components/info-tab.vue#L208-L208: handle add-role registration failure.
  • template/tinyvue/src/views/role/info/components/info-tab.vue#L233-L233: handle bind-menu-for-role registration failure.
  • template/tinyvue/src/views/userManager/info/components/info-tab.vue#L360-L360: handle add-user registration failure.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@template/tinyvue/src/App.vue` at line 28, Handle rejected registerTool
promises for navigate_url and system-overview in template/tinyvue/src/App.vue
(lines 28-28 and 46-46), and for add-i18n-entry in
template/tinyvue/src/views/locale/components/add-locale.vue (line 138), add-menu
in template/tinyvue/src/views/menu/info/components/info-tab.vue (line 243),
add-permission in
template/tinyvue/src/views/permission/info/components/info-tab.vue (line 201),
add-role and bind-menu-for-role in
template/tinyvue/src/views/role/info/components/info-tab.vue (lines 208-208 and
233-233), and add-user in
template/tinyvue/src/views/userManager/info/components/info-tab.vue (line 360).
Await each registration within appropriate error handling or explicitly handle
its promise so failures do not become unhandled rejections and registration
failures are surfaced consistently.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@template/tinyvue/src/App.vue`:
- Line 28: Handle rejected registerTool promises for navigate_url and
system-overview in template/tinyvue/src/App.vue (lines 28-28 and 46-46), and for
add-i18n-entry in template/tinyvue/src/views/locale/components/add-locale.vue
(line 138), add-menu in
template/tinyvue/src/views/menu/info/components/info-tab.vue (line 243),
add-permission in
template/tinyvue/src/views/permission/info/components/info-tab.vue (line 201),
add-role and bind-menu-for-role in
template/tinyvue/src/views/role/info/components/info-tab.vue (lines 208-208 and
233-233), and add-user in
template/tinyvue/src/views/userManager/info/components/info-tab.vue (line 360).
Await each registration within appropriate error handling or explicitly handle
its promise so failures do not become unhandled rejections and registration
failures are surfaced consistently.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8bf2f72f-0aeb-4917-b314-a1738c2bcd72

📥 Commits

Reviewing files that changed from the base of the PR and between dbc6da8 and 47ebb24.

📒 Files selected for processing (7)
  • template/tinyvue/package.json
  • template/tinyvue/src/App.vue
  • template/tinyvue/src/views/locale/components/add-locale.vue
  • template/tinyvue/src/views/menu/info/components/info-tab.vue
  • template/tinyvue/src/views/permission/info/components/info-tab.vue
  • template/tinyvue/src/views/role/info/components/info-tab.vue
  • template/tinyvue/src/views/userManager/info/components/info-tab.vue

@zzcr
zzcr merged commit 090c520 into dev Jul 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants