Skip to content

Conversation

@riopop
Copy link
Contributor

@riopop riopop commented Aug 19, 2025

add SuspenseWrappers to Runtime

  • Add SuspenseWrappers to Runtime for dynamic Suspense wrappers
  • Enhance withSuspense to compose multiple wrappers

@riopop riopop marked this pull request as ready for review August 19, 2025 11:10
@riopop riopop changed the base branch from master to release/next August 19, 2025 11:14
@ClarkXia ClarkXia requested a review from Copilot August 19, 2025 11:39

This comment was marked as outdated.

@ClarkXia
Copy link
Collaborator

这两个 case 具体的场景是什么,特别是强制修改 APP_CONFIG 的逻辑,正常情况下 应该都是在入口做处理

@riopop riopop force-pushed the feat/suspense-wrapper branch from 4d1b951 to b35bcbe Compare August 20, 2025 06:05
@riopop riopop changed the title add SuspenseWrappers to Runtime & inject global APP_CONFIG via ICE_GLOBAL_APP_CONFIG add SuspenseWrappers to Runtime Aug 20, 2025
@riopop
Copy link
Contributor Author

riopop commented Aug 20, 2025

这两个 case 具体的场景是什么,特别是强制修改 APP_CONFIG 的逻辑,正常情况下 应该都是在入口做处理

已修改,仅保留 addSuspenseWrapper API。一般用于暴露给 ice runtime 插件消费,更细粒度的感知和控制 Suspense 模块,便于开发插件,通用的处理异常边界/采集 Suspense 性能数据等。

@ClarkXia ClarkXia requested a review from Copilot August 20, 2025 06:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds dynamic Suspense wrapper support to the runtime, allowing applications to register Suspense wrappers that can be composed around Suspense-enabled components.

  • Add SuspenseWrappers configuration to the Runtime and AppContext types
  • Enhance withSuspense HOC to compose multiple Suspense wrappers around components
  • Provide new addSuspenseWrapper API for registering wrappers

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/runtime/src/types.ts Add SuspenseWrapper types and configuration interfaces
packages/runtime/src/runtime.tsx Implement SuspenseWrapper storage and registration API
packages/runtime/src/Suspense.tsx Enhance withSuspense to compose registered wrappers
.changeset/ten-paws-sort.md Add changeset for patch release

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ClarkXia ClarkXia merged commit 4ff2996 into alibaba:release/next Aug 22, 2025
3 checks passed
ClarkXia added a commit that referenced this pull request Aug 27, 2025
* feat: add SuspenseWrappers to Runtime (#7131)

* feat: add SuspenseWrappers to Runtime

* chore(runtime): format code

* fix(runtime): Apply suggestions from code review

Co-authored-by: Copilot <[email protected]>

* fix(runtime): remove redundant composeSuspenseWrappers function

---------

Co-authored-by: Copilot <[email protected]>

* chore: update versions (#7133)

* chore: update versions

* Remove 3.6.6 entry from CHANGELOG

Removed version 3.6.6 entry from CHANGELOG.

* Update package.json

* Update CHANGELOG.md

* Downgrade version from 1.1.7 to 1.1.6

* Remove changelog entry for version 1.2.7

Removed version 1.2.7 entry from changelog.

* Update package.json

* Update CHANGELOG.md

* Update package.json

* Update package.json

* Update package.json

* Update pnpm-lock.yaml

---------

Co-authored-by: Mixiu <[email protected]>
Co-authored-by: Copilot <[email protected]>
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.

3 participants