fix(teleport): handle pending updates before deferred mount#14642
fix(teleport): handle pending updates before deferred mount#14642edison1105 wants to merge 3 commits intomainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughTeleport now uses scheduler-backed tracking for deferred/suspense-pending mounts and updates via a WeakMap of pending mount/update jobs keyed by Changes
Sequence Diagram(s)sequenceDiagram
participant App as "App / Component"
participant Suspense as "Suspense"
participant Teleport as "TeleportImpl"
participant Scheduler as "Scheduler (postFlush)"
participant Target as "Teleport Target (DOM)"
rect rgba(0,128,0,0.5)
App->>Suspense: render async branch (may include Teleport)
Suspense->>Teleport: patch vnode (mount/update)
end
rect rgba(0,0,255,0.5)
Teleport->>Teleport: check isTeleportDeferred(props) OR parentSuspense.pendingBranch
alt defer needed
Teleport->>Scheduler: enqueue mountJob / updateJob (track in WeakMap)
else immediate
Teleport->>Target: mount/patch children
end
end
rect rgba(128,0,128,0.5)
Scheduler->>Teleport: run queued job (post-flush)
Teleport->>Teleport: verify pending state matches job
alt still valid
Teleport->>Target: mount/patch children
else disposed/superseded
Teleport->>Scheduler: dispose job (no DOM changes)
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
Size ReportBundles
Usages
|
close #14640
Summary by CodeRabbit