Repository navigation
No tool can position or hide a placed symbol's field text — reset_schematic_field_positions only restores the library default #490
Description
Summary
Nothing in the server can position or hide a placed symbol's field text. reset_schematic_field_positions only puts Reference and Value back where the library anchors them, which is the opposite operation. So a field that lands badly cannot be fixed from the tooling at all.
What is missing
Checked against every tool on the installed release: the only tool that touches a field's position is reset_schematic_field_positions, and it restores the library default. Nothing sets a position, and nothing sets visibility.
edit_schematic_component's fields argument sets values — {"key": "value"} string pairs (#158). It has no bearing on where the text sits or whether it is shown.
Why it matters
The case that keeps arising is a rotated symbol. A gate placed at 90° carries its Value at the library's anchor rotated with it, and on a dense sheet that lands the text across the symbol's own pin numbers. KiCad users fix this in one drag; through the tooling there is no fix.
The workarounds are all worse schematics:
- place an empty Value on the symbol and draw the text elsewhere as free
add_schematic_text— which is what one project transcribing a set of drawings ended up doing across every IC on a sheet, losing the value in the file and in the BOM view; - or accept overlapping text.
Neither is a rendering nicety when the deliverable is the drawing.
This is also the schematic side of a gap that has been closed on the board side: #202 (bulk_move_schematic_components leaving Reference and Value text at the old coordinates) was accepted and fixed, so field text positions are already understood as something the server is responsible for getting right — just not something a caller can ask for.
The machinery already exists
crates/konnect-core/src/tools/mod.rs defines
pub(crate) fn positioned_property(
name: &str, value: &str, x: f64, y: f64, rotation: f64,
hide: bool, justify: FieldJustify,
) -> Propertyand placement already uses it: a power symbol's Reference is written hidden today, and #101's work carries Reference and Value through the placement transform so they follow a rotated body. Position, visibility and justification are all already expressible by the writer. What is absent is any way for a caller to reach them after placement.
Proposed
A field_placements argument on edit_schematic_component, keyed by field name, each entry setting any of x, y, rotation and hide; an omitted part left as the file has it, so moving a field cannot silently unhide it.
Two details that matter for the shape:
- Coordinates are absolute schematic millimetres, because that is how KiCad stores them. That makes them per-placement, so a component placed as several units needs the unit named — writing one coordinate to every unit would stack a quad gate's four Values on a point. (Related: move_schematic_component cannot reposition a single unit of a multi-unit symbol #467 asks for per-unit addressing on
move_schematic_component, which is the same need one level up.) hidebelongs as a direct child of the property on a placed symbol; the(effects (hide yes))form is the lib_symbols one. KiCad 10.0.6's own writer round-trips the property-level token unchanged.
A separate argument rather than widening fields: moving the Value text is not changing what it says, and overloading one argument's value type would make the schema lie about what it accepts.
I have implemented this and opened it as a pull request, including a post-write comparison against the committed file — worth having, because two ways of corrupting a field survived the first round of tests and were caught only by that check.
Environment
Konnect v0.11.1 · KiCad 10.0.6 · macOS (Apple Silicon) · driven over stdio.
Activity
mixelpixx commentedon Sep 11, 2026
Implemented and verified by #489.
Acceptance accounting:
edit_schematic_componentgainsfield_placements(per field:x,y,rotation,hide) andunit; an omitted member leaves that aspect as the file has it, so moving a field cannot silently unhide it.unitis refused rather than stacked on every unit.(hide yes)in both forms KiCad writes; a mismatch refuses withstale_target.commit_command(byte-identical file proven); an oversizedunitis refused, not wrapped.Merged head: 35a18bc
Merge commit: MERGE
Post-merge verification on current main passed: fmt, clippy
-D warnings, workspace--lib --tests(1758 passed), workspace--doc;fix-doc-counts --checkunchanged.Three non-blocking edges found in review are filed as #521. The issue was correctly closed by the terminal PR.