-
Notifications
You must be signed in to change notification settings - Fork 115
fix: startTransition dead loop #364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Caution Review failedThe pull request is closed. Walkthrough此次 PR 修改了 useNotification 钩子中任务队列的处理逻辑。新增了 oriTaskQueue 和 tgtTaskQueue 两个缓存变量,通过判断缓存内容与当前任务队列的差异,决定是否更新 state,从而防止因状态更新导致的无限循环问题。改动仅涉及内部逻辑,不影响外部接口或导出实体。 Changes
Sequence Diagram(s)sequenceDiagram
participant E as useNotification Effect
participant O as oriTaskQueue Cache
participant S as taskQueue State
participant T as tgtTaskQueue Cache
E->>S: 获取当前 taskQueue 数据
E->>O: 比较当前任务与缓存 (oriTaskQueue)
alt 需要更新
O-->>E: 确认差异
E->>T: 计算过滤后的 tgtTaskQueue
E->>S: 更新 taskQueue 状态
else 不需要更新
E-->>S: 保持现有状态
end
Assessment against linked issues
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #364 +/- ##
=======================================
Coverage 99.73% 99.74%
=======================================
Files 7 7
Lines 759 773 +14
Branches 123 125 +2
=======================================
+ Hits 757 771 +14
Misses 2 2 ☔ View full report in Codecov by Sentry. |
fix ant-design/ant-design#52590
Summary by CodeRabbit
Bug 修复
重构