Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions packages/app/src/components/InlineOnboarding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Waveform } from "@phosphor-icons/react/dist/ssr/Waveform";
import { Star } from "@phosphor-icons/react/dist/ssr/Star";
import type { Icon } from "@phosphor-icons/react";
import { cn } from "@/lib/utils";
import { useDocumentStore, useUiStore, useChatStore, parseVcadFile } from "@vcad/core";
import { useDocumentStore, useChatStore, parseVcadFile } from "@vcad/core";
import { useAuth, isAuthEnabled, AuthModal } from "@vcad/auth";
import { useOnboardingStore } from "@/stores/onboarding-store";
import { examples, exampleToVcadFile } from "@/data/examples";
Expand Down Expand Up @@ -51,9 +51,6 @@ export function InlineOnboarding({ visible }: InlineOnboardingProps) {
const fileInputRef = useRef<HTMLInputElement>(null);

const loadDocument = useDocumentStore((s) => s.loadDocument);
const addPrimitive = useDocumentStore((s) => s.addPrimitive);
const select = useUiStore((s) => s.select);
const setTransformMode = useUiStore((s) => s.setTransformMode);
const setChatOpen = useChatStore((s) => s.setOpen);
const incrementProjectsCreated = useOnboardingStore(
(s) => s.incrementProjectsCreated,
Expand Down Expand Up @@ -95,10 +92,8 @@ export function InlineOnboarding({ visible }: InlineOnboardingProps) {
}

function handleStartBlank() {
// "empty canvas" — start with a truly blank scene (no stray primitive).
incrementProjectsCreated();
const partId = addPrimitive("cube");
select(partId);
setTransformMode("translate");
hide();
}

Expand Down
4 changes: 4 additions & 0 deletions packages/app/src/components/electronics/SchematicCanvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,10 @@ export function SchematicCanvas() {

const onComponentClick = useCallback(
(e: React.MouseEvent, idx: number, ref: string) => {
// Wire tool: let the click fall through to the canvas handler so it snaps
// to this component's pin — clicking a pin should start/finish a wire, not
// select the part. (Without this, stopPropagation swallows the wire click.)
if (schTool === "wire") return;
e.stopPropagation();
if (schTool === "delete") {
removeSchematicComponent(idx);
Expand Down