Plugin, component resolver, injection accessors - #1
Conversation
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (13)
🚧 Files skipped from review as they are similar to previous changes (8)
📝 WalkthroughWalkthroughThe Vue package adds ChangesQuery Builder API updates
Estimated code review effort: 4 (Complex) | ~60 minutes Mergeability Score: ⚪ Minimal · up to No actionable merge-blocking risk remains; the PR is merge-ready after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant App
participant QueryBuilderPlugin
participant VueGlobalComponents
participant QueryBuilderResolver
App->>QueryBuilderPlugin: install with optional prefix
QueryBuilderPlugin->>VueGlobalComponents: register prefixed components
QueryBuilderResolver->>QueryBuilderPlugin: resolve component name
QueryBuilderPlugin-->>QueryBuilderResolver: return component mapping
sequenceDiagram
participant QueryBuilder
participant Rule
participant RuleComponents
participant ReplacementControl
QueryBuilder->>Rule: provide schema and actions
Rule->>RuleComponents: provide rule and path context
RuleComponents->>ReplacementControl: expose reactive accessors
ReplacementControl-->>RuleComponents: read rule state and actions
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (1)
packages/vue-querybuilder/src/composables/accessors.test.ts (1)
26-76: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMove test helpers out of
src.
fieldNames,Probe, andrenderWithProbeare test helpers inpackages/vue-querybuilder/src/composables/accessors.test.ts. Move them topackages/vue-querybuilder/test/and import them into this test file.As per coding guidelines, “Test helpers belong in
packages/vue-querybuilder/test/, notsrc/.”🤖 Prompt for 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. In `@packages/vue-querybuilder/src/composables/accessors.test.ts` around lines 26 - 76, Move the test helpers fieldNames, Probe, and renderWithProbe from accessors.test.ts into a reusable helper module under packages/vue-querybuilder/test/, then import them into the test. Preserve their existing behavior and dependencies, including Probe’s injected accessors and renderWithProbe’s QueryBuilder setup.Source: Coding guidelines
🤖 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 `@CHANGELOG.md`:
- Around line 30-34: Update the changelog sentence describing RuleComponents,
RuleGroupHeader, RuleGroupBody, and RuleSubQuery to remove the extra “from” in
“read everything they render from through injection,” while preserving the
surrounding breaking-change guidance.
In `@docs/differences-from-react-querybuilder.md`:
- Around line 211-213: Correct the sentence in the section describing
RuleComponents, RuleGroupHeader, RuleGroupBody, and RuleSubQuery by removing the
extraneous “from” so it states that they read everything they render through
provide/inject.
In `@packages/vue-querybuilder/scripts/check-dist-specifiers.ts`:
- Around line 74-78: Update the export-target validation loop in
check-dist-specifiers.ts to resolve each target and require the resolved path to
remain within distDir before checking existence. Record a failure for targets
outside distDir or missing there, while preserving the existing export condition
context in the failure message.
In `@packages/vue-querybuilder/src/internal/parts.test.ts`:
- Around line 14-15: Move the mountBare test helper from the internal source
area into packages/vue-querybuilder/test/, then import and reuse it in
parts.test.ts. Keep its existing rendering behavior unchanged and remove the
local definition from the test file.
In `@packages/vue-querybuilder/src/plugin.test.ts`:
- Around line 13-16: Remove the mountWithPlugin helper from src/plugin.test.ts
and inline its sole call at the test site, or relocate the helper under the
package’s test directory if reuse is needed. Keep the existing render setup and
plugin options behavior unchanged.
In `@README.md`:
- Around line 70-75: Update the README Vite configuration example to import
defineConfig from vite and vue from `@vitejs/plugin-vue` alongside the existing
imports, so the shown plugins array uses resolved identifiers.
---
Nitpick comments:
In `@packages/vue-querybuilder/src/composables/accessors.test.ts`:
- Around line 26-76: Move the test helpers fieldNames, Probe, and
renderWithProbe from accessors.test.ts into a reusable helper module under
packages/vue-querybuilder/test/, then import them into the test. Preserve their
existing behavior and dependencies, including Probe’s injected accessors and
renderWithProbe’s QueryBuilder setup.
🪄 Autofix
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 Plus
Run ID: 2bac406b-7855-43f6-a8fe-59368ab0d1ee
📒 Files selected for processing (38)
AGENTS.mdCHANGELOG.mdREADME.mddocs/customization.mddocs/differences-from-react-querybuilder.mdexamples/demo/src/App.vueexamples/demo/src/main.tspackages/vue-querybuilder/package.jsonpackages/vue-querybuilder/scripts/check-dist-runtime.tspackages/vue-querybuilder/scripts/check-dist-specifiers.tspackages/vue-querybuilder/src/components/ActionElement.vuepackages/vue-querybuilder/src/components/NotToggle.vuepackages/vue-querybuilder/src/components/QueryBuilder.vuepackages/vue-querybuilder/src/components/Rule.vuepackages/vue-querybuilder/src/components/RuleGroup.vuepackages/vue-querybuilder/src/components/ShiftActions.vuepackages/vue-querybuilder/src/components/ValueEditor.vuepackages/vue-querybuilder/src/components/defaultControlElements.tspackages/vue-querybuilder/src/components/index.tspackages/vue-querybuilder/src/components/slots.test.tspackages/vue-querybuilder/src/composables/accessors.test.tspackages/vue-querybuilder/src/composables/accessors.tspackages/vue-querybuilder/src/composables/index.tspackages/vue-querybuilder/src/index.tspackages/vue-querybuilder/src/internal/QueryBuilderLabel.test.tspackages/vue-querybuilder/src/internal/QueryBuilderLabel.tspackages/vue-querybuilder/src/internal/RuleComponents.vuepackages/vue-querybuilder/src/internal/RuleGroupBody.vuepackages/vue-querybuilder/src/internal/RuleGroupHeader.vuepackages/vue-querybuilder/src/internal/RuleSubQuery.test.tspackages/vue-querybuilder/src/internal/RuleSubQuery.vuepackages/vue-querybuilder/src/internal/parts.test.tspackages/vue-querybuilder/src/internal/parts.tspackages/vue-querybuilder/src/internal/slotToComponent.tspackages/vue-querybuilder/src/plugin.test.tspackages/vue-querybuilder/src/plugin.tspackages/vue-querybuilder/src/resolver.tspackages/vue-querybuilder/vite.config.ts
💤 Files with no reviewable changes (1)
- packages/vue-querybuilder/src/components/index.ts
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai did your last review on this PR include commit 6714f5f? |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="react-querybuilder/vue-querybuilder"
pr_number="1"
target_sha="6714f5f9685fbaddd46cac5007f45644351773bf"
echo "=== Pull request ==="
gh api "repos/$repo/pulls/$pr_number" \
--jq '{head_sha: .head.sha, base_sha: .base.sha, updated_at: .updated_at}'
echo "=== Reviews ==="
gh api --paginate "repos/$repo/pulls/$pr_number/reviews?per_page=100" \
--jq '.[] | {id, user: .user.login, state, commit_id, submitted_at, body}'
echo "=== Pull request commits ==="
gh api --paginate "repos/$repo/pulls/$pr_number/commits?per_page=100" \
--jq '.[] | {sha, parents: [.parents[].sha], message: .commit.message}'
echo "=== Target commit ==="
gh api "repos/$repo/commits/$target_sha" \
--jq '{sha, parents: [.parents[].sha], message: .commit.message, date: .commit.committer.date}'Length of output: 9825
Commit You are interacting with an AI system. |
|
@coderabbitai please do a review that includes commit 6714f5f. |
|
|
Summary by CodeRabbit
QueryBuilderPluginfor global component registration with customizable prefixes.unplugin-vue-componentsresolver.Labelexports toQueryBuilderLabel.