-
Couldn't load subscription status.
- Fork 11
Steve/v3-data-attrs #4813
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
Steve/v3-data-attrs #4813
Conversation
Walkthrough此PR修改了运行时上下文初始化、缓存清理机制和数据解析逻辑。用懒加载的isStale函数替换布尔值标志,并在增量路由渲染时集成缓存清理。 Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 涉及三个相互关联的文件,包括API签名变化(resolveByProvider)、懒加载逻辑引入和缓存管理流程整合。变化跨越多个层级但遵循一致的模式,需要理解缓存清理和数据解析的交互。 Pre-merge checks and finishing touches❌ Failed checks (3 warnings)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Cache: Disabled due to data retention organization setting Knowledge base: Disabled due to data retention organization setting 📒 Files selected for processing (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (3)
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. Comment |
There was a problem hiding this 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 refactors the stale check mechanism in data resolution to use a function instead of a static boolean value, and adds auth information to the runtime context.
- Refactored stale check from a boolean to a lazy-evaluated function for more accurate staleness detection
- Added
clearResolveCache()call in the legacy render flow - Integrated auth data into the runtime context's
sysobject
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/runtime/src/internal/data/resolveData.ts | Changed stale from boolean to isStale function for lazy evaluation; fixed comment typo |
| packages/runtime/src/internal/Renderer.ts | Added clearResolveCache() call before rendering and imported the function |
| packages/runtime/src/createRoot.ts | Added sys object with auth data to runtime context initialization |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v3 #4813 +/- ##
=======================================
Coverage 95.20% 95.20%
=======================================
Files 212 212
Lines 9319 9320 +1
Branches 1793 1793
=======================================
+ Hits 8872 8873 +1
Misses 328 328
Partials 119 119
🚀 New features to boost your workflow:
|
next-core
|
||||||||||||||||||||||||||||
| Project |
next-core
|
| Branch Review |
steve/v3-data-attrs
|
| Run status |
|
| Run duration | 00m 24s |
| Commit |
|
| Committer | Shenwei Wang |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
17
|
| View all changes introduced in this branch ↗︎ | |
依赖检查
组件之间的依赖声明,是微服务组件架构下的重要信息,请确保其正确性。
请勾选以下两组选项其中之一:
或者:
提交信息检查
Git 提交信息将决定包的版本发布及自动生成的 CHANGELOG,请检查工作内容与提交信息是否相符,并在以下每组选项中都依次确认。
破坏性变更:
feat作为提交类型。BREAKING CHANGE: 你的变更说明。新特性:
feat作为提交类型。问题修复:
fix作为提交类型。杂项工作:
即所有对下游使用者无任何影响、且没有必要显示在 CHANGELOG 中的改动,例如修改注释、测试用例、开发文档等:
chore,docs,test等作为提交类型。Summary by CodeRabbit
发布说明
功能增强
性能改进