feat(electronics): UX pass — global nets, Circuit tab, searchable palette, blank reset#235
Merged
Merged
Conversation
Same-named labels and one-pin power symbols (VCC/GND/+5V...) now merge into one net across the whole sheet without an explicit wire — the standard "global label / power port" behaviour. Drop a VCC symbol anywhere and it's on the VCC net; label two wires "PHASE_A" and they join. This keeps power rails sane on a dense board instead of hand-wiring a rail through every pin (exactly where the ESC shorted). In generate_netlist, after wire/tap connectivity, union all points that share a net name: label names plus the value of any one-pin power-type symbol. Power-port names also name the resulting net. Tests: power_ports_merge_by_value, same_name_labels_merge; 30 vcad-ecad-schematic tests pass, clippy clean. WASM rebuilt. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Electronics was the only major workspace not reachable from the top tab row — you entered it through a "PCB" button buried under Create, then it sprouted its own separate bottom toolbar. Promote it to a first-class "Circuit" tab (between Assembly and Simulate) and move the PCB-board entry there. First step toward consolidating the electronics tools into one consistent, discoverable place. - ToolbarTab += "circuit"; indigo tab color / theme / description - getAllTabs() lists Circuit (Circuitry icon) - the PCB-board tool moves from Create -> Circuit tsc + core build clean; verified live — the Circuit tab renders and shows the PCB Board tool. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The component palette was a row of unlabeled icons — you couldn't tell the MCU from the regulator without hovering each one. Replace it with a vertical labeled list (icon + part name) behind a search box that filters by name / id / prefix / value, so finding a part is type-and-click. Builds on the reactive-library + a11y fixes. tsc + app build clean; verified live — the search box and labeled parts render in the Components panel. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
"Start blank / empty canvas" called addPrimitive("cube") — it dropped a
cube onto whatever was already open and never cleared an autosaved doc,
so returning sessions accumulated clutter (which bit me repeatedly while
building the ESC). Reset to a fresh empty document instead, matching the
"empty canvas" label.
tsc clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The wire-snap highlight showed *where* you'd connect but not *what* — and the ESC's transistor C/E pins are close enough that you grab the wrong one and short the rails. Surface the snapped pin's identity (ref.pin, e.g. "Q1.C") and the net it's already on right at the cursor, so a wrong pin or an unintended short is visible before you click. snapToGridOrPin now returns the component ref + pin number; the snap indicator renders them plus getNetForPin(). tsc + app build clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Collapse the crossing-wires assertion and wrap the make_power signature so `cargo fmt --check` passes in CI. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Electronics UX improvements that came directly out of building an ESC by clicking. Four self-contained commits:
1. Global power-port + same-name-label nets
featSame-named labels and one-pin power symbols (VCC/GND/+5V…) now merge into one net across the sheet without a wire — the standard "global label / power port" behaviour. Drop a VCC symbol anywhere and it's on the VCC net; label two wires
PHASE_Aand they join. This is the biggest win: it kills the long, error-prone power rails that shorted the ESC. (generate_netlist; testspower_ports_merge_by_value,same_name_labels_merge; 30 tests pass; WASM rebuilt.)2. Circuit tab in the top toolbar
featElectronics was the only major workspace not in the top tab row — you reached it via a "PCB" button buried under Create. Promote it to a first-class Circuit tab (between Assembly and Simulate) and move the PCB-board entry there.
3. Searchable, labeled component palette
featThe palette was a row of unlabeled icons — you couldn't tell the MCU from the regulator without hovering. Now a labeled list (icon + name) behind a search box that filters by name/id/prefix/value.
4. "Start blank" resets to an empty document
fixIt was calling
addPrimitive("cube")— dropping a cube onto whatever was open and never clearing an autosaved doc, so returning sessions piled up clutter. Now it resets to a fresh empty document, matching the "empty canvas" label.Verification
vcad-ecad-schematic: 30 tests pass, clippy clean; WASM rebuilt.tsc --noEmit+ core/app builds clean across all four.Stacked on #234 → #233 → #232.
🤖 Generated with Claude Code