fix(canon): normalize optional boolean template props#2731
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (10)
📒 Files selected for processing (4)
📝 WalkthroughWalkthroughUpdates template prop typing so explicit ChangesOptional boolean prop normalization fix
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
vize
@vizejs/fresco
@vizejs/musea-mcp-server
oxlint-plugin-vize
@vizejs/rspack-plugin
@vizejs/unplugin
@vizejs/vite-plugin
@vizejs/vite-plugin-musea
@vizejs/musea-nuxt
@vizejs/nuxt
commit: |
PR BenchmarkBase:
Raw run timesCompile SFC
Lint
Format
Type check (1T)
Type check (max)
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@crates/vize_canon/src/virtual_ts/props.rs`:
- Around line 362-368: The Boolean-prop handling in props.rs only wraps the
type-only defineProps path, so runtime defineProps({ ... }) still leaves
BooleanConstructor props optional and can trigger template TS2322 errors. Update
the logic around template_base_props_type_ref/template_props_type_ref so the
runtime prop-shape path (__RuntimePropShape<_T>) applies the same
Boolean-required fix as the __DefineProps path, using the existing
define_props_type_args/defaulted_prop_names flow to locate the branch.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 2c57cf90-30b1-4201-beca-c438be2a5fee
📒 Files selected for processing (2)
crates/vize_canon/src/batch/type_checker/tests/recent_issues.rscrates/vize_canon/src/virtual_ts/props.rs
📜 Review details
⏰ Context from checks skipped due to timeout. (30)
- GitHub Check: dialect-guard
- GitHub Check: tool-benchmark
- GitHub Check: criterion-ab
- GitHub Check: cargo-semver-checks (vize_fresco)
- GitHub Check: cargo-semver-checks (vize_croquis)
- GitHub Check: security-audit
- GitHub Check: cargo-semver-checks (vize_armature)
- GitHub Check: cargo-semver-checks (vize_musea)
- GitHub Check: cargo-semver-checks (vize_carton)
- GitHub Check: cargo-semver-checks (vize_relief)
- GitHub Check: cargo-semver-checks (vize_atelier_vapor)
- GitHub Check: node-engine-compat (22)
- GitHub Check: cargo-semver-checks (vize_atelier_dom)
- GitHub Check: vue-parity
- GitHub Check: cargo-semver-checks (vize_atelier_core)
- GitHub Check: coverage
- GitHub Check: cargo-semver-checks (vize_atelier_sfc)
- GitHub Check: editor-extensions
- GitHub Check: cargo-semver-checks (vize_atelier_ssr)
- GitHub Check: test-scripts
- GitHub Check: node-engine-compat (24)
- GitHub Check: check-vize-apps
- GitHub Check: test-js-packages
- GitHub Check: build-js-packages
- GitHub Check: clippy-and-test
- GitHub Check: pr-benchmark
- GitHub Check: check-js
- GitHub Check: fmt-rust
- GitHub Check: Publish preview packages
- GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (1)
crates/**
⚙️ CodeRabbit configuration file
crates/**: Focus on parser/compiler correctness, source locations, UTF-8/UTF-16 offset handling, and panic-free LSP behavior. Flag changes that only work for small fixtures but break real Vue/Nuxt projects.
Files:
crates/vize_canon/src/batch/type_checker/tests/recent_issues.rscrates/vize_canon/src/virtual_ts/props.rs
🔇 Additional comments (1)
crates/vize_canon/src/batch/type_checker/tests/recent_issues.rs (1)
290-341: LGTM!
Detailed Test ReportCommit: Area Summary
Test InventoryTotal tracked cases: 8622 across 1212 files.
Files
Comment truncated at 64000 characters. Open the workflow run for the full job log. |
f7a02eb to
d1f2d27
Compare
PR BenchmarkBase:
Raw run timesCompile SFC
Lint
Format
Type check (1T)
Type check (max)
|
Detailed Test ReportCommit: Area Summary
Test InventoryTotal tracked cases: 8622 across 1212 files.
Files
Comment truncated at 64000 characters. Open the workflow run for the full job log. |
Tool BenchmarkMeasured: 2026-07-08T18:15:32.244Z
Fairness notes:
Commands: gh workflow run tool-benchmark.yml --ref <branch> -f file_count=3000 -f check_file_count=500 -f vite_file_count=1000 -f nuxt_file_count=250 -f large_blocks=300 -f runs=3 -f warmups=1 -f commit_results=true
node bench/generate.mjs 3000
node bench/compare-tools.mjs --input bench/__in__ --vize-bin target/release/vize --runs 3 --warmups 1 --check-file-count 500 --vite-file-count 1000 --nuxt-file-count 250 --large-blocks 300 --runner-label "blacksmith-32vcpu-ubuntu-2404" --out tool-benchmark-summary.md --json tool-benchmark-results.json --doc performance-blacksmith.mdVariant details and raw run timesSFC compile
Large SFC compile
Large SFC type check
Lint
Format
Type check
Vite build (end-to-end)
Nuxt SPA build (end-to-end)
|
Summary
Tests
Closes #2719
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by CodeRabbit
withDefaults(defineProps(...))output formatting.