You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(ui): cover dynamic block names for several references - #2965
Adds the missing regression test for the multi-selection Properties palette's dynamic-block name.
6ecabc34 (#2403) made several selected references to one dynamic block show that block's name instead of the anonymous *U… block each reference points at. No test covered it. The new test reads the shared Door fixture, changes two references so each points at an anonymous block, selects both, and checks the palette shows Door, with no *VARIES* and no *U….
Why
Without the test, the behaviour can regress silently: the pre-fix code showed Name: *VARIES* because the two anonymous block names differ. The test fails on that old behaviour and passes with the fix.
Verification
cargo test -p cadcraft-ui-egui --lib several_dynamic_block_references_show_the_block_name — pass; with the old name resolution temporarily restored it fails with Name: *VARIES*.
cargo test -p cadcraft-ui-egui --lib — 261 passed, 1 ignored.
cargo test --workspace --lib --bins --tests -- --skip mtext::tests::strips_formatting --skip complex::tests::thai_marks_stack_in_an_installed_font — exit 0, no failures.
cargo test --workspace --doc — pass.
cargo xtask ci on this base stops at mtext::tests::strips_formatting (issue #2952, fixed by open PR #2954), which is unrelated to this test-only change. Its fmt and clippy steps pass. The full workspace run above skips only that test and the pre-existing flaky complex::tests::thai_marks_stack_in_an_installed_font, which passes alone.
Scope
Test-only. No production code or behaviour changes. Adds cadcraft-io as a dev-dependency to read the existing shared Door fixture; no CI changes and no parity-doc edits.
Checklist
Narrow change: one regression test and its fixture dependency.
The test fails without the fix and passes with it.
Formatting, clippy, affected tests and project gates run locally.
No CI workflow changes.
No roadmap/gaps/parity docs edited.
Summary by CodeRabbit
Tests
Added regression coverage to verify that selecting multiple instances of the same dynamic Door block shows the shared Door name in the Properties palette.
The multi-selection Properties palette showed *VARIES* for references to one dynamic block, because each reference points at its own anonymous *U block. The fix in storytold#2403 (6ecabc3) resolves each reference's dynamic name; this adds the missing regression test. It reads the shared Door fixture, changes both references so they point at anonymous blocks, selects them, and checks that the palette shows the block name and no *VARIES*.
Reviewing files that changed from the base of the PR and between afde0da and 12b594e.
Files ignored due to path filters: 1
Cargo.lock is excluded by !**/*.lock
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The change adds a regression test for the Properties palette when two selected dynamic Door references point to separate anonymous blocks. The test loads the shared Door fixture and checks that the palette displays Door.
Changes: Dynamic Door Properties test
Layer / File(s)
Summary
Build and verify the dynamic Door selection crates/ui-egui/Cargo.toml, crates/ui-egui/src/palettes.rs
The test loads the Door fixture, creates and selects two dynamic references, and checks that the Properties palette displays Door rather than *VARIES* or an anonymous block name.
The change adds a regression test without changing production behavior. No merge-blocking issue is established.
Pre-merge checks: 5
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly and concisely describes the added regression test for dynamic block names with multiple references.
Docstring Coverage
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)
Finishing Touches
Generate unit tests (beta)
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.
Reviewing files that changed from the base of the PR and between a3d9348 and afde0da.
Files ignored due to path filters: 1
Cargo.lock is excluded by !**/*.lock
Files selected for processing: 2
crates/ui-egui/Cargo.toml
crates/ui-egui/src/palettes.rs
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
freemans32
added a commit
to freemans32/cadcraft
that referenced
this pull request
Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Adds the missing regression test for the multi-selection Properties palette's dynamic-block name.
6ecabc34(#2403) made several selected references to one dynamic block show that block's name instead of the anonymous*U…block each reference points at. No test covered it. The new test reads the shared Door fixture, changes two references so each points at an anonymous block, selects both, and checks the palette showsDoor, with no*VARIES*and no*U….Why
Without the test, the behaviour can regress silently: the pre-fix code showed
Name: *VARIES*because the two anonymous block names differ. The test fails on that old behaviour and passes with the fix.Verification
cargo test -p cadcraft-ui-egui --lib several_dynamic_block_references_show_the_block_name— pass; with the old name resolution temporarily restored it fails withName: *VARIES*.cargo test -p cadcraft-ui-egui --lib— 261 passed, 1 ignored.cargo clippy -p cadcraft-ui-egui --all-targets --keep-going -- -D warnings— pass.cargo fmt --all -- --check— pass.cargo xtask layers— pass.cargo xtask assets— pass (28 assets attributed).cargo xtask i18n— pass (report only).cargo xtask wasm— pass (only pre-existing dead-code warnings on wasm).cargo test --workspace --lib --bins --tests -- --skip mtext::tests::strips_formatting --skip complex::tests::thai_marks_stack_in_an_installed_font— exit 0, no failures.cargo test --workspace --doc— pass.cargo xtask cion this base stops atmtext::tests::strips_formatting(issue #2952, fixed by open PR #2954), which is unrelated to this test-only change. Its fmt and clippy steps pass. The full workspace run above skips only that test and the pre-existing flakycomplex::tests::thai_marks_stack_in_an_installed_font, which passes alone.Scope
Test-only. No production code or behaviour changes. Adds
cadcraft-ioas a dev-dependency to read the existing shared Door fixture; no CI changes and no parity-doc edits.Checklist
Summary by CodeRabbit
Doorname in the Properties palette.