Repository navigation
perf(schema-org): reduce entry normalization - #815
Conversation
|
Warning Review limit reached
Next review available in: 7 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe schema-org unhead plugin is refactored to centralize tag detection via a new ChangesSchema-org plugin refactor
Script type coercion fix
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
📦 Bundle Size
All bundles (12)
⚡ Performance (directional)🟢 2 faster
All benchmarks (9)
Baseline: main @ fb6dce2 · 2026-06-30 · gzipped is the headline size metric · perf is directional (shared-runner, gated) |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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.
Inline comments:
In `@packages/schema-org/src/plugin.ts`:
- Around line 103-107: Reset the closure-scoped resolvedMeta on each
'entries:resolve' cycle in plugin.ts so removed metadata does not leak into
later resolveGraph() runs. Update the 'entries:resolve' handler alongside the
existing graph reset to reinitialize resolvedMeta each cycle, and keep the merge
logic in resolveGraph() using the fresh per-cycle state for title, description,
canonical URL, image, and templateParams.schemaOrg.
- Line 66: The tag position assignment in plugin.ts is incorrectly overriding an
explicit tag.tagPosition value because of operator precedence. Update the logic
around the tagPosition handling so TagConfig preserves an existing
tag.tagPosition value and only falls back to config.tagPosition when it is
unset, using the relevant setup in the plugin() path.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ffc7937c-22c0-4c73-b572-b9a29da85211
📒 Files selected for processing (2)
packages/schema-org/src/plugin.tspackages/unhead/src/server/sort.ts
🔗 Linked issue
None.
❓ Type of change
📚 Description
Schema.org no longer forces every cached head entry to normalize again during
entries:resolve. Cached tags are reused unless the entry owns schema.org nodes, and script sorting avoids coercing missingtypevalues into strings.Summary by CodeRabbit