use C_Small/R_Small#720
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix prepared fixes for both issues found in the latest run.
- ✅ Fixed: US resistor symbol not updated to small variant
- Updated
stdlib/generics/Resistor.zenso theuse_us_symbolbranch now selectsR_Small_USinstead ofR_USfor symbol-size consistency.
- Updated
- ✅ Fixed: Test fixtures reference stale
Device:Rtarget symbol key- Updated the resistor promotion fixtures in
crates/pcb/src/import/generate.rsto useDevice:R_Small/R_Small_0_1so geometry lookup matches the new promoted target lib id.
- Updated the resistor promotion fixtures in
Or push these changes by commenting:
@cursor push e8ce129b05
Preview (e8ce129b05)
diff --git a/crates/pcb/src/import/generate.rs b/crates/pcb/src/import/generate.rs
--- a/crates/pcb/src/import/generate.rs
+++ b/crates/pcb/src/import/generate.rs
@@ -2861,9 +2861,9 @@
.to_string(),
),
(
- KiCadLibId::from("Device:R".to_string()),
- r#"(symbol "Device:R"
- (symbol "R_0_1"
+ KiCadLibId::from("Device:R_Small".to_string()),
+ r#"(symbol "Device:R_Small"
+ (symbol "R_Small_0_1"
(rectangle (start -1 -2) (end 3 4))
)
)"#
@@ -2933,9 +2933,9 @@
.to_string(),
),
(
- KiCadLibId::from("Device:R".to_string()),
- r#"(symbol "Device:R"
- (symbol "R_0_1"
+ KiCadLibId::from("Device:R_Small".to_string()),
+ r#"(symbol "Device:R_Small"
+ (symbol "R_Small_0_1"
(rectangle (start -1 -2) (end 3 4))
)
)"#
@@ -2974,9 +2974,9 @@
.to_string(),
),
(
- KiCadLibId::from("Device:R".to_string()),
- r#"(symbol "Device:R"
- (symbol "R_0_1"
+ KiCadLibId::from("Device:R_Small".to_string()),
+ r#"(symbol "Device:R_Small"
+ (symbol "R_Small_0_1"
(rectangle (start -1 -2) (end 3 4))
)
)"#
diff --git a/stdlib/generics/Resistor.zen b/stdlib/generics/Resistor.zen
--- a/stdlib/generics/Resistor.zen
+++ b/stdlib/generics/Resistor.zen
@@ -43,7 +43,7 @@
def _symbol(mount: Mount, package: Package, use_us_symbol: bool):
if use_us_symbol:
- name = "R_US"
+ name = "R_Small_US"
else:
name = "R_Small"You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit d037922. Configure here.
| name = "R_US" | ||
| else: | ||
| name = "R" | ||
| name = "R_Small" |
There was a problem hiding this comment.
US resistor symbol not updated to small variant
Medium Severity
The use_us_symbol branch still uses "R_US" instead of the small variant "R_Small_US" (which exists in KiCad's Device library). The non-US path was updated from "R" to "R_Small", but the US path was missed. This means users with use_us_symbol=True get a full-size symbol while everyone else gets a small one, creating an inconsistency.
Reviewed by Cursor Bugbot for commit d037922. Configure here.
| match self { | ||
| Self::GenericResistor => Some(KiCadLibId::from("Device:R".to_string())), | ||
| Self::GenericCapacitor => Some(KiCadLibId::from("Device:C".to_string())), | ||
| Self::GenericResistor => Some(KiCadLibId::from("Device:R_Small".to_string())), |
There was a problem hiding this comment.
Test fixtures reference stale Device:R target symbol key
High Severity
promoted_target_lib_id now returns Device:R_Small, but the test fixtures in generate.rs still provide Device:R as the embedded target symbol geometry. The geometry lookup for Device:R_Small won't find a match, causing it to fall back to source bounds. This changes the bbox alignment calculation, producing different coordinates than the expected assertions at lines 2875 and 2947.
Reviewed by Cursor Bugbot for commit d037922. Configure here.



Note
Low Risk
Low risk: this only changes which KiCad symbol names are emitted for generic resistors/capacitors, with minor chance of snapshot/EDA symbol mapping differences.
Overview
Updates the stdlib generic
Resistor/Capacitorcomponents and schematic import promotion logic to use KiCadDevice:R_SmallandDevice:C_Smallsymbols instead ofR/C.Also includes a small test fixture string cleanup in
crates/pcb/tests/simple.rs(no behavior change).Reviewed by Cursor Bugbot for commit d037922. Bugbot is set up for automated code reviews on this repo. Configure here.