Skip to content

perf: share one dependency analysis request across components - #3442

Merged
danielroe merged 1 commit into
mainfrom
perf/shared-analysis
Nov 13, 2026
Merged

danielroe merged 1 commit into
mainfrom
perf/shared-analysis

Conversation

@danielroe

@danielroe danielroe commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

πŸ”— Linked issue

🧭 Context

currently we fire off multiple dependency analysis requests when components mount in parallel; this moves that so subsequent requests coalesce around the first one, to avoid a bunch of functions spinning up

@vercel

vercel Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
npmx.dev Ready Ready Preview Nov 13, 2026 12:11am UTC
2 Skipped Deployments
Project Deployment Actions Updated
docs.npmx.dev Ignored Ignored Nov 13, 2026 12:11am UTC
npmx-lunaria Ignored Ignored Nov 13, 2026 12:11am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change β†’

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Bug Fixes
    • Prevented duplicate requests when multiple components load the same dependency analysis.

The dependency analysis composable now defers duplicate fetches. A test verifies that three components using the same analysis load after one request.

Changes: Dependency analysis

Layer / File(s) Summary
Deferred fetch and shared-consumer test
app/composables/useDependencyAnalysis.ts, test/nuxt/composables/use-dependency-analysis.spec.ts
The composable sets dedupe: 'defer'. The test mounts three consumers and checks that they load after exactly one endpoint request.

Suggested reviewers: serhalp

Merge Risk: Minimal Β· up to 724bd

This change makes components that mount in parallel share one dependency analysis request, which reduces redundant network calls. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title 'perf: share one dependency analysis request across components' matches the main change: the raw summary and objectives say useDependencyAnalysis now uses useFetch deduplication mode 'defer'…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description is related to the changeset. It states that multiple dependency analysis requests fire when components mount in parallel, and that the change makes subsequent requests coalesce around …
Full details: Title check

Explanation

The title 'perf: share one dependency analysis request across components' matches the main change: the raw summary and objectives say useDependencyAnalysis now uses useFetch deduplication mode 'defer', so parallel component mounts coalesce onto one request. The title is concise, specific and uses a conventional commit prefix.

Full details: Description check

Explanation

The description is related to the changeset. It states that multiple dependency analysis requests fire when components mount in parallel, and that the change makes subsequent requests coalesce around the first one. This matches the summary, which sets the useFetch deduplication mode to 'defer' in useDependencyAnalysis and adds a test for a single shared request. The linked issue section is an unfilled template placeholder, but the check only requires the description to relate to the changeset.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix Β· Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 030933d and 724bd1b.

Files selected for processing: 2

  • app/composables/useDependencyAnalysis.ts
  • test/nuxt/composables/use-dependency-analysis.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.

@codecov

codecov Bot commented Nov 13, 2026

Copy link
Copy Markdown

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… All tests successful. No failed tests found.

πŸ“’ Thoughts on this report? Let us know!

@danielroe
danielroe enabled auto-merge November 13, 2026 00:21
@danielroe
danielroe added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit 7d6dfc8 Nov 13, 2026
29 checks passed
@danielroe
danielroe deleted the perf/shared-analysis branch November 13, 2026 07:50
@github-actions github-actions Bot mentioned this pull request Nov 13, 2026

This branch was successfully deployed

1 active deployment
Preview – npmx.dev β€” 724bd1b7 Deployed Nov 13, 2026 by vercel[bot]
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.

2 participants