Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
feat: version assembly instructions + surface them in change-notice diffs (#1286)
Brad Barbina8fe78952f99
diff --git a/.claude/skills/make-interfaces-feel-better/SKILL.md b/.claude/skills/make-interfaces-feel-better/SKILL.mdindex cd19691da5..2a2495559d 100644--- a/.claude/skills/make-interfaces-feel-better/SKILL.md+++ b/.claude/skills/make-interfaces-feel-better/SKILL.md@@ -106,7 +106,7 @@ Always present changes as a markdown table with **Before** and **After** columns#### Concentric border radius| Before | After || --- | --- |-| `rounded-xl` on card + `rounded-xl` on inner button (`p-2`) | `rounded-2xl` on card (`12 + 8`), `rounded-lg` on inner button |+| `rounded-xl` on card + `rounded-xl` on inner button (`p-2`) | `rounded-lg` on card (`12 + 8`), `rounded-lg` on inner button || `border-radius: 16px` on both nested surfaces | Outer `24px`, inner `16px` with `8px` padding |#### Tabular numbersdiff --git a/.claude/skills/make-interfaces-feel-better/surfaces.md b/.claude/skills/make-interfaces-feel-better/surfaces.mdindex 180de509a4..d3a2580e8e 100644--- a/.claude/skills/make-interfaces-feel-better/surfaces.md+++ b/.claude/skills/make-interfaces-feel-better/surfaces.md@@ -38,7 +38,7 @@ This rule is most useful when nested surfaces are close together. If padding is```tsx// Good — outer radius accounts for padding-<div className="rounded-2xl p-2"> {/* 16px radius, 8px padding */}+<div className="rounded-lg p-2"> {/* 16px radius, 8px padding */}<div className="rounded-lg"> {/* 8px radius = 16 - 8 ✓ */}...</div>diff --git a/apps/erp/app/components/Layout/Navigation/DetailsTopbar.tsx b/apps/erp/app/components/Layout/Navigation/DetailsTopbar.tsxindex 0a00152a67..561ed940e4 100644--- a/apps/erp/app/components/Layout/Navigation/DetailsTopbar.tsx+++ b/apps/erp/app/components/Layout/Navigation/DetailsTopbar.tsx@@ -50,7 +50,7 @@ const DetailTopbar = ({);return (- <div className="inline-flex h-9 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground shadow-[inset_0_1px_2px_rgba(0,0,0,0.15)] border-b border-border">+ <div className="inline-flex h-9 items-center justify-center rounded-[0.5rem] bg-muted p-1 text-muted-foreground shadow-[inset_0_1px_2px_rgba(0,0,0,0.15)] border-b border-border">{links.map((route) => {const isActive = route.isActive? route.isActive(location.pathname)diff --git a/apps/erp/app/components/Layout/Topbar/Search.tsx b/apps/erp/app/components/Layout/Topbar/Search.tsxindex eb81f24ff0..93235a536b 100644--- a/apps/erp/app/components/Layout/Topbar/Search.tsx+++ b/apps/erp/app/components/Layout/Topbar/Search.tsx@@ -187,7 +187,7 @@ export const SearchModal = () => {}}><ModalContent- className="rounded-xl p-0 h-[520px] max-w-2xl overflow-hidden dark:shadow-button"+ className="rounded-lg p-0 h-[520px] max-w-2xl overflow-hidden dark:shadow-button"withCloseButton={false}><Command className="h-full flex flex-col">diff --git a/apps/erp/app/components/Message.tsx b/apps/erp/app/components/Message.tsxindex 998c85475c..02bed56b35 100644--- a/apps/erp/app/components/Message.tsx+++ b/apps/erp/app/components/Message.tsx@@ -28,7 +28,7 @@ export const MessageContent = ({<divclassName={cn("flex flex-col gap-2 overflow-hidden rounded-lg px-4 py-3 text-foreground text-sm bg-card",- "group-[.is-user]:!bg-muted group-[.is-user]:!text-foreground group-[.is-user]:!px-4 group-[.is-user]:!py-2 group-[.is-user]:max-w-fit group-[.is-user]:rounded-2xl group-[.is-user]:rounded-br-none",+ "group-[.is-user]:!bg-muted group-[.is-user]:!text-foreground group-[.is-user]:!px-4 group-[.is-user]:!py-2 group-[.is-user]:max-w-fit group-[.is-user]:rounded-lg group-[.is-user]:rounded-br-none","group-[.is-assistant]:!bg-transparent group-[.is-assistant]:!shadow-none group-[.is-assistant]:!border-none group-[.is-assistant]:!px-0 group-[.is-assistant]:!py-0 group-[.is-assistant]:!rounded-none group-[.is-assistant]:!text-muted-foreground",className)}diff --git a/apps/erp/app/components/SearchLandingPage.tsx b/apps/erp/app/components/SearchLandingPage.tsxindex ca99a57bdc..5dff694538 100644--- a/apps/erp/app/components/SearchLandingPage.tsx+++ b/apps/erp/app/components/SearchLandingPage.tsx@@ -44,7 +44,7 @@ export function SearchLandingPage({)}><div className="flex flex-col items-center gap-4">- <div className="relative flex items-center justify-center size-14 rounded-2xl bg-background border border-border text-foreground shadow-sm before:absolute before:inset-0 before:rounded-2xl before:bg-linear-to-b before:from-foreground/5 before:to-transparent before:pointer-events-none">+ <div className="relative flex items-center justify-center size-14 rounded-lg bg-background border border-border text-foreground shadow-sm before:absolute before:inset-0 before:rounded-lg before:bg-linear-to-b before:from-foreground/5 before:to-transparent before:pointer-events-none"><Icon className="size-6" /></div><div className="flex flex-col items-center gap-1.5 text-center">diff --git a/apps/erp/app/components/TrainingPanel.tsx b/apps/erp/app/components/TrainingPanel.tsxindex ea32ad67d4..7856009be8 100644--- a/apps/erp/app/components/TrainingPanel.tsx+++ b/apps/erp/app/components/TrainingPanel.tsx@@ -30,7 +30,7 @@ export default function TrainingPanel({animate={{ opacity: 1, y: 0, scale: 1, filter: "blur(0px)" }}exit={{ opacity: 0, y: 10, scale: 0.95, filter: "blur(4px)" }}transition={{ duration: 0.3, ease: "easeOut" }}- className="fixed bottom-4 right-4 w-[380px] rounded-xl border bg-background shadow-lg z-40 overflow-hidden"+ className="fixed bottom-4 right-4 w-[380px] rounded-lg border bg-background shadow-lg z-40 overflow-hidden"><div className="relative aspect-video w-full bg-muted"><iframediff --git a/apps/erp/app/modules/agent/ui/AgentPanel.tsx b/apps/erp/app/modules/agent/ui/AgentPanel.tsxindex 825512d630..dc358fe0c0 100644--- a/apps/erp/app/modules/agent/ui/AgentPanel.tsx+++ b/apps/erp/app/modules/agent/ui/AgentPanel.tsx@@ -65,7 +65,7 @@ export function AgentPanel() {return (<div- className={`fixed right-4 z-40 flex flex-col w-100 max-w-[calc(100vw-2rem)] rounded-xl border bg-background shadow-lg overflow-hidden animate-in slide-in-from-top-4 fade-in duration-200 ${+ className={`fixed right-4 z-40 flex flex-col w-100 max-w-[calc(100vw-2rem)] rounded-lg border bg-background shadow-lg overflow-hidden animate-in slide-in-from-top-4 fade-in duration-200 ${expanded ? "top-14 bottom-4" : "top-14 h-[45vh]"}`}>diff --git a/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountHistory.tsx b/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountHistory.tsxindex 56aec7999d..f0fffe87da 100644--- a/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountHistory.tsx+++ b/apps/erp/app/modules/inventory/ui/InventoryCount/InventoryCountHistory.tsx@@ -162,7 +162,7 @@ const InventoryCountHistory = ({</VStack></HStack>- <div className="ml-11 rounded-xl border border-border divide-y divide-border">+ <div className="ml-11 rounded-lg border border-border divide-y divide-border">{version.movements.map((m) => (<divkey={m.id}diff --git a/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferWizard.tsx b/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferWizard.tsxindex da209d4a1e..832361e1b6 100644--- a/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferWizard.tsx+++ b/apps/erp/app/modules/inventory/ui/StockTransfers/StockTransferWizard.tsx@@ -1266,7 +1266,7 @@ const StockTransferWizardWidget = ({ locationId }: { locationId: string }) => {return (<div className="fixed bottom-6 right-6 z-[9999]"><div- className={`bg-card border-2 border-border rounded-2xl shadow-2xl transition-all duration-300 ease-in-out ${+ className={`bg-card border-2 border-border rounded-lg shadow-2xl transition-all duration-300 ease-in-out ${isExpanded ? "w-96 h-[32rem]" : "w-80 h-auto"}`}>diff --git a/apps/erp/app/modules/invoicing/ui/Payment/AvailableCreditsTable.tsx b/apps/erp/app/modules/invoicing/ui/Payment/AvailableCreditsTable.tsxindex ade763a494..033c5c1095 100644--- a/apps/erp/app/modules/invoicing/ui/Payment/AvailableCreditsTable.tsx+++ b/apps/erp/app/modules/invoicing/ui/Payment/AvailableCreditsTable.tsx@@ -210,7 +210,7 @@ const AvailableCreditsTable = ({</CardHeader><CardContent>{openInvoices.length === 0 ? (- <div className="rounded-xl border border-dashed border-border py-10 px-6 text-center">+ <div className="rounded-lg border border-dashed border-border py-10 px-6 text-center"><p className="text-sm font-medium text-foreground"><Trans>No open invoices</Trans></p>diff --git a/apps/erp/app/modules/invoicing/ui/Payment/PaymentApplyTable.tsx b/apps/erp/app/modules/invoicing/ui/Payment/PaymentApplyTable.tsxindex b65533c9e3..b7c849b18d 100644--- a/apps/erp/app/modules/invoicing/ui/Payment/PaymentApplyTable.tsx+++ b/apps/erp/app/modules/invoicing/ui/Payment/PaymentApplyTable.tsx@@ -317,7 +317,7 @@ const PaymentApplyTable = ({</CardHeader><CardContent>{openInvoices.length === 0 ? (- <div className="rounded-xl border border-dashed border-border py-10 px-6 text-center">+ <div className="rounded-lg border border-dashed border-border py-10 px-6 text-center"><p className="text-sm font-medium text-foreground"><Trans>No open invoices</Trans></p>diff --git a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceSummary.tsx b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceSummary.tsxindex 1585e7ff7d..fd5ed9902d 100644--- a/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceSummary.tsx+++ b/apps/erp/app/modules/invoicing/ui/PurchaseInvoice/PurchaseInvoiceSummary.tsx@@ -145,7 +145,7 @@ const LineItems = ({</Link></Button></HStack>- <span className="text-muted-foreground text-base truncate">+ <span className="text-muted-foreground text-sm truncate">{isGlAccount? (accounts.find((a) => a.id === line.accountId)?.name ?? "Indirect Expense")@@ -440,7 +440,7 @@ const PurchaseInvoiceSummary = ({supplierId={routeData?.purchaseInvoice.supplierId ?? null}/>{routeData?.purchaseInvoice?.dateDue && (- <span className="text-muted-foreground text-sm">+ <span className="text-xs text-muted-foreground tracking-tight">Due {formatDate(routeData?.purchaseInvoice.dateDue)}</span>)}@@ -458,7 +458,7 @@ const PurchaseInvoiceSummary = ({/><VStack spacing={2} className="mt-8">- <HStack className="justify-between text-base text-muted-foreground w-full">+ <HStack className="justify-between text-sm text-muted-foreground w-full"><span>Subtotal:</span><VStack spacing={0} className="items-end"><span>{formatter.format(subtotal)}</span>@@ -470,7 +470,7 @@ const PurchaseInvoiceSummary = ({</VStack></HStack>- <HStack className="justify-between text-base text-muted-foreground w-full">+ <HStack className="justify-between text-sm text-muted-foreground w-full"><span>Tax:</span><VStack spacing={0} className="items-end"><span>{formatter.format(tax)}</span>@@ -482,7 +482,7 @@ const PurchaseInvoiceSummary = ({</VStack></HStack>- <HStack className="justify-between text-base text-muted-foreground w-full">+ <HStack className="justify-between text-sm text-muted-foreground w-full">{shippingCost > 0 ? (<><VStack spacing={0}>@@ -513,7 +513,7 @@ const PurchaseInvoiceSummary = ({<Buttonvariant="link"size="sm"- className="text-muted-foreground"+ className="text-primary"onClick={onEditShippingCost}><Trans>Add Shipping</Trans>@@ -521,7 +521,7 @@ const PurchaseInvoiceSummary = ({) : null}</HStack>- <HStack className="justify-between text-xl font-bold w-full">+ <HStack className="justify-between text-xl font-semibold w-full"><span>Total:</span><VStack spacing={0} className="items-end"><span>{formatter.format(total)}</span>diff --git a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceSummary.tsx b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceSummary.tsxindex 2f586ec725..34033be753 100644--- a/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceSummary.tsx+++ b/apps/erp/app/modules/invoicing/ui/SalesInvoice/SalesInvoiceSummary.tsx@@ -150,7 +150,7 @@ const LineItems = ({</Link></Button></HStack>- <span className="text-muted-foreground text-base truncate">+ <span className="text-muted-foreground text-sm truncate">{line.description}</span></VStack>@@ -439,7 +439,7 @@ const SalesInvoiceSummary = ({customerId={routeData?.salesInvoice.customerId ?? null}/>{routeData?.salesInvoice?.dateDue && (- <span className="text-muted-foreground text-sm">+ <span className="text-xs text-muted-foreground tracking-tight">Due {formatDate(routeData?.salesInvoice.dateDue)}</span>)}@@ -457,7 +457,7 @@ const SalesInvoiceSummary = ({/><VStack spacing={2} className="mt-8">- <HStack className="justify-between text-base text-muted-foreground w-full">+ <HStack className="justify-between text-sm text-muted-foreground w-full"><span>Subtotal:</span><VStack spacing={0} className="items-end"><span>{formatter.format(subtotal)}</span>@@ -469,7 +469,7 @@ const SalesInvoiceSummary = ({</VStack></HStack>- <HStack className="justify-between text-base text-muted-foreground w-full">+ <HStack className="justify-between text-sm text-muted-foreground w-full"><span>Tax:</span><VStack spacing={0} className="items-end"><span>{formatter.format(tax)}</span>@@ -481,7 +481,7 @@ const SalesInvoiceSummary = ({</VStack></HStack>- <HStack className="justify-between text-base text-muted-foreground w-full">+ <HStack className="justify-between text-sm text-muted-foreground w-full">{shippingCost > 0 ? (<><VStack spacing={0}>@@ -512,7 +512,7 @@ const SalesInvoiceSummary = ({<Buttonvariant="link"size="sm"- className="text-muted-foreground"+ className="text-primary"onClick={onEditShippingCost}><Trans>Add Shipping</Trans>@@ -520,7 +520,7 @@ const SalesInvoiceSummary = ({) : null}</HStack>- <HStack className="justify-between text-xl font-bold w-full">+ <HStack className="justify-between text-xl font-semibold w-full"><span>Total:</span><VStack spacing={0} className="items-end"><span>{formatter.format(total)}</span>diff --git a/apps/erp/app/modules/items/items.service.test.ts b/apps/erp/app/modules/items/items.service.test.tsindex 1ba8af782a..d22b7c6da7 100644--- a/apps/erp/app/modules/items/items.service.test.ts+++ b/apps/erp/app/modules/items/items.service.test.ts@@ -202,6 +202,32 @@ describe("diffMethod — operations", () => {});expect(operations[0].status).toBe("unchanged");});++ it("records process type, assembly instruction, and inspection plan changes", () => {+ const { operations } = diffMethod({+ ...EMPTY,+ baseOperations: [+ baseOperation({+ operationType: "Process",+ assemblyInstructionId: "ai_1",+ inspectionDocumentId: "doc_1"+ })+ ],+ targetOperations: [+ stagedOperation({+ operationType: "Assembly",+ assemblyInstructionId: "ai_2",+ inspectionDocumentId: "doc_2"+ })+ ]+ });+ expect(operations[0].status).toBe("modified");+ expect(operations[0].changedFields).toEqual({+ operationType: { before: "Process", after: "Assembly" },+ assemblyInstructionId: { before: "ai_1", after: "ai_2" },+ inspectionDocumentId: { before: "doc_1", after: "doc_2" }+ });+ });});describe("diffMethod — operation children", () => {diff --git a/apps/erp/app/modules/items/items.service.ts b/apps/erp/app/modules/items/items.service.tsindex eb431b5502..921c3a1de2 100644--- a/apps/erp/app/modules/items/items.service.ts+++ b/apps/erp/app/modules/items/items.service.ts@@ -7565,7 +7565,9 @@ const OPERATION_REF_FIELDS = ["processId","workCenterId","procedureId",- "operationSupplierProcessId"+ "operationSupplierProcessId",+ "assemblyInstructionId",+ "inspectionDocumentId"] as const;const OPERATION_REF_FIELD_SET = new Set<string>(OPERATION_REF_FIELDS);@@ -7579,7 +7581,9 @@ async function stampOperationRefNames(processId: new Set(),workCenterId: new Set(),procedureId: new Set(),- operationSupplierProcessId: new Set()+ operationSupplierProcessId: new Set(),+ assemblyInstructionId: new Set(),+ inspectionDocumentId: new Set()};const addFrom = (row: Row | null) => {if (!row) return;@@ -7601,7 +7605,7 @@ async function stampOperationRefNames(const names = new Map<string, string>(); // id → display name (any ref type)const load = async (- table: "process" | "workCenter" | "procedure",+ table: "process" | "workCenter" | "procedure" | "assemblyInstruction",ids: Set<string>) => {const unique = [...ids];@@ -7637,8 +7641,23 @@ async function stampOperationRefNames(await Promise.all([load("process", collected.processId),load("workCenter", collected.workCenterId),- load("procedure", collected.procedureId)+ load("procedure", collected.procedureId),+ load("assemblyInstruction", collected.assemblyInstructionId)]);++ // Inspection documents have no "name" column — label them by drawing/file name.+ const inspectionDocumentIds = [...collected.inspectionDocumentId];+ if (inspectionDocumentIds.length > 0) {+ const docs = await client+ .from("inspectionDocument")+ .select("id, drawingNumber, fileName")+ .in("id", inspectionDocumentIds)+ .eq("companyId", companyId);+ for (const d of docs.data ?? []) {+ if (d.id) names.set(d.id, d.drawingNumber || d.fileName || d.id);+ }+ }+for (const [spId, processId] of supplierProcessToProcess) {const name = names.get(processId);if (name) names.set(spId, name);diff --git a/apps/erp/app/modules/items/ui/ChangeNotice/ChangeNoticeDiffViewer.tsx b/apps/erp/app/modules/items/ui/ChangeNotice/ChangeNoticeDiffViewer.tsxindex 2575a904f3..84f2add370 100644--- a/apps/erp/app/modules/items/ui/ChangeNotice/ChangeNoticeDiffViewer.tsx+++ b/apps/erp/app/modules/items/ui/ChangeNotice/ChangeNoticeDiffViewer.tsx@@ -50,6 +50,9 @@ const FIELD_LABELS: Record<string, string> = {workCenterId: "Work center",procedureId: "Procedure",operationSupplierProcessId: "Supplier process",+ assemblyInstructionId: "Assembly instruction",+ inspectionDocumentId: "Inspection plan",+ operationType: "Operation type",operationLeadTime: "Lead time",operationUnitCost: "Unit cost",operationMinimumCost: "Minimum cost",@@ -95,8 +98,6 @@ const NOISE_FIELDS = new Set<string>(["stagedOperationId","makeMethodId","operationId",- // Internal linkage id with no user-facing name — never show its raw UUID.- "assemblyInstructionId","itemType","itemReadableId","toolReadableId",diff --git a/apps/erp/app/modules/production/AGENTS.md b/apps/erp/app/modules/production/AGENTS.mdindex 7c212581f0..ffd536d89a 100644--- a/apps/erp/app/modules/production/AGENTS.md+++ b/apps/erp/app/modules/production/AGENTS.md@@ -11,7 +11,7 @@ Work orders (jobs), scheduling, routings (operations), bill of materials, proced- **Production Event** — time tracking (Labor/Machine/Setup) against an operation.- **Production Quantity** — output recording (Production/Scrap/Rework) against an operation with optional `scrapReason`.- **Procedure** — versioned work instructions linked to operations via `processId`. Statuses: Draft/Active/Archived.-- **Assembly Instructions** — 3D animated work instructions, available to all users. (Previously gated to Carbon-internal emails via `requireAssembliesInternal` / `useFlags().isInternal`; that gate was removed to ship publicly.)+- **Assembly Instructions** — 3D animated work instructions, available to all users. (Previously gated to Carbon-internal emails via `requireAssembliesInternal` / `useFlags().isInternal`; that gate was removed to ship publicly.) **Versioned** (Draft/Published/Archived) as **row-per-version**, not an in-place counter: sibling versions are grouped by a self-referential `assemblyInstruction.rootInstructionId` (NULL = "I am the root"; group root = `rootInstructionId ?? id`, siblings = `id = root OR rootInstructionId = root`). `copyAssemblyInstructionAsVersion` spins a new editable **Draft** as a perfect copy (`version = max+1`, deep-copies steps with `parentStepId` remapped + each step's materials/slides/tools). `activateAssemblyInstructionVersion` makes a version active: publishes it, **archives the prior Published sibling**, and repoints `jobOperation.assemblyInstructionId` from other group versions to it — but only for active operations (status ≠ Done/Canceled) on active jobs (`!isJobLocked`). Only Draft is editable; the header exposes a "Versions" switcher + Make Active / New Version. `updateAssemblyInstructionStatus` no longer bumps `version`. The **list** (`getAssemblyInstructions`) reads the `assemblyInstructions` **view** (not the base table): it collapses each group to its latest version (`WHERE version = MAX(version)` per `rootInstructionId ?? id`) and rolls every sibling into a `versions` jsonb array, mirroring the `procedures` view — the table shows a `Version N` subtitle on the name plus a "Versions" hover card. Migration `20260730153412_assembly-instructions-view.sql`.- **Maintenance Dispatch** — reactive/scheduled repair for work centers with comments, events, items, and linked work centers.- **Scheduling** — infinite-capacity backward scheduling via `schedule` edge function. MUST use `triggerJobSchedule` to reschedule, never direct date writes.@@ -78,6 +78,7 @@ pnpm --filter @carbon/erp test- `getProductionPlanning` — MRP-driven production planning (RPC `get_production_planning`)- `upsertMaintenanceDispatch` / `upsertMaintenanceSchedule` — maintenance management- `getAssemblyInstruction(s)` / `upsertAssemblyInstructionStep` / `getAssemblyInstructionStepMaterials` — assembly instruction authoring; the step upsert derives `instructionText` from the tiptap `description` (viewer/MES consume the plain text)+- `getAssemblyInstructionVersions` / `copyAssemblyInstructionAsVersion` / `activateAssemblyInstructionVersion` — versioning (see the Assembly Instructions concept above). Routes: `x+/assembly+/$id.version.new.tsx` (copy → new Draft) and `x+/assembly+/$id.activate.tsx` (make active). Change-notice diffs of a `methodOperation` now surface its `assemblyInstructionId` (resolved to the instruction name), `inspectionDocumentId` (drawing/file name), and `operationType` via `stampOperationRefNames` + `ChangeNoticeDiffViewer` (items module)- `updateAssemblyStepMotion` — partial `motion`/`camera` patch for one step, used by the 3D path/camera editor's autosave (never touches `title`/typed fields); `camera: null` clears the pose (return to auto-framing). Deleting an instruction also drops the model's cached plan via `deleteAssemblyInstruction` → `invalidateAssemblyPlanCache`- `generateAssemblyStepsFromPlan` — plan.json → draft steps via `buildAssemblyStepGroups` (`@carbon/viewer`): sequence order, consecutive identical components merged, subassembly `groups` one step (titled by the unit `name`), `mergedInto` components riding their host's step; planner-flagged components (blockedBy / failed verification) store motion "none" + `warnings: { flagged, blockedBy }` (the viewer fades them in — no fabricated paths); a **floater fold** using the plan's `contacts` graph merges a placed-but-detached part with the immediately-following step that attaches to it (collision precedence forces the part in first, so it would otherwise render as a lone floating island for one step) — the pair installs as one rigid step along the detached part's motion; skipped on older plans lacking `contacts`; `mode: "regenerate"` replaces existing steps, refused while any step is `planConfidence: "manual"` or status `Done`. Persists a human `title` on every step via `describeStep` (`@carbon/viewer`) — real editable data, not just a render-time fallback. Seeds each step's materials from the component→BOM mappings (best-effort): auto-runs `autoMatchAssemblyComponents` once when the model has no mappings yet, and returns `unmappedComponentCount` (distinct geometry groups with no BOM item) which the generate route surfaces as a "use Match BOM" nudge- `syncAssemblyStepMaterialsFromMappings` — adds mapped BOM items (`assemblyComponentMapping`) to steps' materials from their `componentNodeIds` (quantity = instance count in the step); additive + best-effort, never updates or removes rows; scopable by `stepIds` / `geometryHashes` / `onlyComponentNodeIds`. Called from the step-components autosave route (newly added nodes only), the mapping-create route (that hash only), and the "Match BOM" route (full backfill)diff --git a/apps/erp/app/modules/production/production.models.ts b/apps/erp/app/modules/production/production.models.tsindex 14e8eab81b..ba8c3c81ce 100644--- a/apps/erp/app/modules/production/production.models.ts+++ b/apps/erp/app/modules/production/production.models.ts@@ -1265,6 +1265,11 @@ export const assemblyInstructionStatusValidator = z.object({status: z.enum(assemblyInstructionStatuses)});+// Spin a new editable Draft version as a perfect copy of an existing instruction.+export const assemblyInstructionVersionValidator = z.object({+ copyFromId: z.string().min(1, { message: "Source instruction is required" })+});+/*** Optional tiptap-doc transform: same coercion as the shared* operationStepValidator description, but optional because "Add Step" postsdiff --git a/apps/erp/app/modules/production/production.service.ts b/apps/erp/app/modules/production/production.service.tsindex 499d2da5ea..6fcac9ddc5 100644--- a/apps/erp/app/modules/production/production.service.ts+++ b/apps/erp/app/modules/production/production.service.ts@@ -21,6 +21,7 @@ import {import { parseDate } from "@internationalized/date";import type { FileObject, StorageError } from "@supabase/storage-js";import type { PostgrestError, SupabaseClient } from "@supabase/supabase-js";+import { nanoid } from "nanoid";import type { z } from "zod";import type { StorageItem } from "~/types";import type { GenericQueryFilters } from "~/utils/query";@@ -73,6 +74,7 @@ import {fastenerSchema,getAssemblyModelState,isJobOrderStatusHidden,+ JOB_LOCKED_STATUSES,JOB_SUPPLY_STATUS_PRIORITY,motionSchema,PO_STATUS_PRIORITY,@@ -4137,7 +4139,11 @@ export async function getAssemblyInstructions(}) {let query = client- .from("assemblyInstruction")+ // "assemblyInstructions" (plural) is the version-collapsing view: one row+ // per version group (root = rootInstructionId ?? id), latest version shown,+ // all siblings rolled into a "versions" jsonb array. See the+ // 20260730153412_assembly-instructions-view migration.+ .from("assemblyInstructions").select("*, modelUpload(id, name, componentCount, processingStatus)", {count: "exact"})@@ -4273,24 +4279,16 @@ export async function updateAssemblyInstructionStatus(updatedBy: string;}) {- // Each publish bumps the version ("Edit N" in the header)- let version: number | undefined;- if (data.status === "Published") {- const current = await client- .from("assemblyInstruction")- .select("version")- .eq("id", id)- .single();- version = (current.data?.version ?? 0) + 1;- }-+ // Version is assigned when a new version is copied (see+ // copyAssemblyInstructionAsVersion), not bumped on publish. Activating a+ // version goes through activateAssemblyInstructionVersion; this remains for+ // any direct status write.return client.from("assemblyInstruction").update({status: data.status,publishedAt:data.status === "Published" ? new Date().toISOString() : undefined,- ...(version !== undefined ? { version } : {}),updatedBy: data.updatedBy,updatedAt: new Date().toISOString()})@@ -4299,6 +4297,254 @@ export async function updateAssemblyInstructionStatus(.single();}+/**+ * Sibling versions of an instruction, for the header's version switcher. All+ * versions of one instruction share a group root: NULL rootInstructionId means+ * "I am the root", so the group root is `rootInstructionId ?? id` and siblings+ * are the rows whose id = root OR whose rootInstructionId = root.+ */+export async function getAssemblyInstructionVersions(+ client: SupabaseClient<Database>,+ instruction: {+ id: string;+ rootInstructionId?: string | null;+ companyId: string;+ }+) {+ const root = instruction.rootInstructionId ?? instruction.id;+ return client+ .from("assemblyInstruction")+ .select("id, name, version, status, rootInstructionId")+ .eq("companyId", instruction.companyId)+ .or(`id.eq.${root},rootInstructionId.eq.${root}`)+ .order("version", { ascending: false });+}++/**+ * Create a new editable Draft version as a perfect copy of an existing+ * instruction: a fresh assemblyInstruction row (new id, version = max+1,+ * status Draft) plus deep copies of every step (parentStepId remapped through+ * the self-referential tree) and each step's live child rows (materials,+ * slides, tools). Non-atomic multi-insert — a partial copy leaves a deletable+ * Draft, matching the procedure/make-method copy precedents.+ */+export async function copyAssemblyInstructionAsVersion(+ client: SupabaseClient<Database>,+ args: { copyFromId: string; companyId: string; userId: string }+) {+ const { copyFromId, companyId, userId } = args;++ const source = await client+ .from("assemblyInstruction")+ .select("*")+ .eq("id", copyFromId)+ .eq("companyId", companyId)+ .single();+ if (source.error) return source;++ const root = source.data.rootInstructionId ?? source.data.id;++ // Highest version across the group determines the next version number.+ const siblings = await client+ .from("assemblyInstruction")+ .select("version")+ .eq("companyId", companyId)+ .or(`id.eq.${root},rootInstructionId.eq.${root}`)+ .order("version", { ascending: false })+ .limit(1);+ const nextVersion =+ (siblings.data?.[0]?.version ?? source.data.version ?? 0) + 1;++ const insert = await client+ .from("assemblyInstruction")+ .insert({+ name: source.data.name,+ modelUploadId: source.data.modelUploadId,+ itemId: source.data.itemId,+ assemblyPlanJobId: source.data.assemblyPlanJobId,+ settings: source.data.settings,+ tags: source.data.tags,+ status: "Draft",+ version: nextVersion,+ rootInstructionId: root,+ companyId,+ createdBy: userId+ })+ .select("id")+ .single();+ if (insert.error) return insert;+ const newInstructionId = insert.data.id;++ // Copy steps, pre-generating ids so parentStepId can be remapped in one pass.+ const sourceSteps = await client+ .from("assemblyInstructionStep")+ .select("*")+ .eq("assemblyInstructionId", copyFromId)+ .order("sortOrder", { ascending: true });+ if (sourceSteps.error) return sourceSteps;++ const stepIdMap = new Map<string, string>();+ for (const step of sourceSteps.data ?? []) {+ stepIdMap.set(step.id, nanoid());+ }++ if ((sourceSteps.data?.length ?? 0) > 0) {+ const stepRows = sourceSteps.data.map((step) => {+ // Strip identity/audit columns; keep every authored field verbatim.+ // biome-ignore lint/correctness/noUnusedVariables: destructure omits identity/audit columns before re-insert+ const { id, createdAt, updatedAt, updatedBy, ...rest } = step;+ return {+ ...rest,+ id: stepIdMap.get(step.id)!,+ assemblyInstructionId: newInstructionId,+ parentStepId: step.parentStepId+ ? (stepIdMap.get(step.parentStepId) ?? null)+ : null,+ companyId,+ createdBy: userId+ };+ });+ const insertSteps = await client+ .from("assemblyInstructionStep")+ .insert(stepRows);+ if (insertSteps.error) return insertSteps;+ }++ // Copy each step's live child rows, remapping stepId.+ const sourceStepIds = [...stepIdMap.keys()];+ if (sourceStepIds.length > 0) {+ const copyChildTable = async (+ table:+ | "assemblyInstructionStepMaterial"+ | "assemblyInstructionStepSlide"+ | "assemblyInstructionStepTool"+ ) => {+ const rows = await client+ .from(table)+ .select("*")+ .in("stepId", sourceStepIds);+ if (rows.error) return rows;+ if (!rows.data?.length) return rows;+ const inserts = rows.data.map((row: any) => {+ // biome-ignore lint/correctness/noUnusedVariables: destructure omits identity/audit columns before re-insert+ const { id, createdAt, updatedAt, updatedBy, ...rest } = row;+ return {+ ...rest,+ stepId: stepIdMap.get(row.stepId)!,+ companyId,+ createdBy: userId+ };+ });+ return client.from(table).insert(inserts);+ };++ for (const table of [+ "assemblyInstructionStepMaterial",+ "assemblyInstructionStepSlide",+ "assemblyInstructionStepTool"+ ] as const) {+ const copied = await copyChildTable(table);+ if (copied.error) return copied;+ }+ }++ return insert;+}++/**+ * Make a version the active (Published) one: archive whichever sibling is+ * currently Published, publish the target, and repoint in-flight work to it —+ * but only active job operations (status not Done/Canceled) on active jobs+ * (status not Completed/Closed/Cancelled). Method operations are intentionally+ * left untouched.+ */+export async function activateAssemblyInstructionVersion(+ client: SupabaseClient<Database>,+ args: { id: string; companyId: string; userId: string }+) {+ const { id, companyId, userId } = args;++ const target = await client+ .from("assemblyInstruction")+ .select("id, rootInstructionId")+ .eq("id", id)+ .eq("companyId", companyId)+ .single();+ if (target.error) return target;++ const root = target.data.rootInstructionId ?? target.data.id;++ const group = await client+ .from("assemblyInstruction")+ .select("id, status")+ .eq("companyId", companyId)+ .or(`id.eq.${root},rootInstructionId.eq.${root}`);+ if (group.error) return group;++ const now = new Date().toISOString();++ // Archive the currently-active sibling(s).+ const previouslyActive = (group.data ?? []).filter(+ (v) => v.id !== id && v.status === "Published"+ );+ if (previouslyActive.length > 0) {+ const archive = await client+ .from("assemblyInstruction")+ .update({ status: "Archived", updatedBy: userId, updatedAt: now })+ .in(+ "id",+ previouslyActive.map((v) => v.id)+ );+ if (archive.error) return archive;+ }++ // Publish the target.+ const publish = await client+ .from("assemblyInstruction")+ .update({+ status: "Published",+ publishedAt: now,+ updatedBy: userId,+ updatedAt: now+ })+ .eq("id", id)+ .select("id")+ .single();+ if (publish.error) return publish;++ // Repoint in-flight work: active job operations on active jobs that point at+ // any other version in this group → the newly-active version.+ const otherVersionIds = (group.data ?? [])+ .map((v) => v.id)+ .filter((vId) => vId !== id);+ if (otherVersionIds.length > 0) {+ // Drive the lookup off jobOperation (bounded by this small sibling-version+ // set) rather than first materializing every unlocked job id — that list+ // can exceed the 1000-row cap and silently drop operations, leaving them+ // pointed at the now-archived version. An inner join on job applies the+ // locked-job filter server-side while keeping the row set bounded.+ const staleOps = await client+ .from("jobOperation")+ .select("id, job!inner(status)")+ .eq("companyId", companyId)+ .in("assemblyInstructionId", otherVersionIds)+ .not("status", "in", "(Done,Canceled)")+ .not("job.status", "in", `(${JOB_LOCKED_STATUSES.join(",")})`);+ if (staleOps.error) return staleOps;++ const staleOpIds = (staleOps.data ?? []).map((o) => o.id);+ if (staleOpIds.length > 0) {+ const repoint = await client+ .from("jobOperation")+ .update({ assemblyInstructionId: id })+ .in("id", staleOpIds);+ if (repoint.error) return repoint;+ }+ }++ return publish;+}+export async function deleteAssemblyInstruction(client: SupabaseClient<Database>,id: stringdiff --git a/apps/erp/app/modules/production/types.ts b/apps/erp/app/modules/production/types.tsindex 6314297e2f..9022e731fc 100644--- a/apps/erp/app/modules/production/types.ts+++ b/apps/erp/app/modules/production/types.ts@@ -8,6 +8,7 @@ import type {getAssemblyInstructionSteps,getAssemblyInstructionStepTools,getAssemblyInstructions,+ getAssemblyInstructionVersions,getAssemblyUnits,getBalloons,getFailureMode,@@ -204,6 +205,10 @@ export type AssemblyInstructionListItem = NonNullable<Awaited<ReturnType<typeof getAssemblyInstructions>>["data"]>[number];+export type AssemblyInstructionVersion = NonNullable<+ Awaited<ReturnType<typeof getAssemblyInstructionVersions>>["data"]+>[number];+export type AssemblyInstructionStepRow = NonNullable<Awaited<ReturnType<typeof getAssemblyInstructionSteps>>["data"]>[number];diff --git a/apps/erp/app/modules/production/ui/Assemblies/AssemblyInstructionHeader.tsx b/apps/erp/app/modules/production/ui/Assemblies/AssemblyInstructionHeader.tsxindex 94d0b98055..5e6f876c93 100644--- a/apps/erp/app/modules/production/ui/Assemblies/AssemblyInstructionHeader.tsx+++ b/apps/erp/app/modules/production/ui/Assemblies/AssemblyInstructionHeader.tsx@@ -5,6 +5,9 @@ import {DropdownMenuContent,DropdownMenuIcon,DropdownMenuItem,+ DropdownMenuRadioGroup,+ DropdownMenuRadioItem,+ DropdownMenuSeparator,DropdownMenuTrigger,HStack,IconButton,@@ -14,14 +17,18 @@ import {import { useState } from "react";import {LuBlocks,+ LuChevronDown,+ LuCirclePlus,LuEllipsisVertical,+ LuGitPullRequestArrow,LuPanelLeft,LuPanelRight,LuRefreshCw,LuTrash} from "react-icons/lu";-import { Link, useFetcher, useParams } from "react-router";+import { Link, useFetcher, useNavigate, useParams } from "react-router";import { usePanels } from "~/components/Layout";+import { Confirm } from "~/components/Modals";import ConfirmDelete from "~/components/Modals/ConfirmDelete";import {useDateFormatter,@@ -33,8 +40,10 @@ import { getLinkToItemDetails } from "~/modules/items/ui/Item/ItemForm";import type { MethodItemType } from "~/modules/shared";import { useItems } from "~/stores";import { path } from "~/utils/path";-import type { assemblyInstructionStatuses } from "../../production.models";-import type { AssemblyInstruction } from "../../types";+import type {+ AssemblyInstruction,+ AssemblyInstructionVersion+} from "../../types";import AssemblyInstructionStatus from "./AssemblyInstructionStatus";const itemTypesWithDetails = ["Part", "Material", "Tool", "Consumable"];@@ -45,23 +54,29 @@ const AssemblyInstructionHeader = () => {const routeData = useRouteData<{instruction: AssemblyInstruction;+ versions: AssemblyInstructionVersion[];}>(path.to.assemblyInstruction(id));const instruction = routeData?.instruction;+ const versions = routeData?.versions ?? [];+ const navigate = useNavigate();const permissions = usePermissions();const user = useUser();const { formatRelativeTime } = useDateFormatter();const { toggleExplorer, toggleProperties } = usePanels();const deleteDisclosure = useDisclosure();+ const activateDisclosure = useDisclosure();const nameFetcher = useFetcher<{}>();- const statusFetcher = useFetcher<{}>();+ const newVersionFetcher = useFetcher<{}>();const invalidateFetcher = useFetcher<{ success: boolean }>();const [name, setName] = useState(instruction?.name ?? "");const isDraft = instruction?.status === "Draft";const canUpdate = permissions.can("update", "production");+ const canCreate = permissions.can("create", "production");+ const isCreatingVersion = newVersionFetcher.state !== "idle";const [items] = useItems();const item = instruction?.itemId@@ -80,14 +95,13 @@ const AssemblyInstructionHeader = () => {});};- const onStatusChange = (- status: (typeof assemblyInstructionStatuses)[number]- ) => {+ const onNewVersion = () => {+ if (!instruction) return;const formData = new FormData();- formData.append("status", status);- statusFetcher.submit(formData, {+ formData.append("copyFromId", instruction.id);+ newVersionFetcher.submit(formData, {method: "post",- action: path.to.assemblyInstructionStatus(id)+ action: path.to.assemblyInstructionVersionNew(id)});};@@ -167,7 +181,7 @@ const AssemblyInstructionHeader = () => {</DropdownMenu>{instruction && (<Badge variant="outline" className="shrink-0 tabular-nums">- Edit {instruction.version}+ Version {instruction.version}</Badge>)}{instruction && (@@ -179,35 +193,71 @@ const AssemblyInstructionHeader = () => {)}</HStack><div className="flex flex-shrink-0 gap-2 items-center justify-end">- {instruction?.status === "Draft" && (- <Button- isDisabled={!canUpdate}- isLoading={statusFetcher.state !== "idle"}- onClick={() => onStatusChange("Published")}- >- Publish- </Button>- )}- {instruction?.status === "Published" && (- <Button- variant="secondary"- isDisabled={!canUpdate}- isLoading={statusFetcher.state !== "idle"}- onClick={() => onStatusChange("Archived")}- >- Archive- </Button>- )}- {instruction?.status === "Archived" && (- <Button- variant="secondary"- isDisabled={!canUpdate}- isLoading={statusFetcher.state !== "idle"}- onClick={() => onStatusChange("Draft")}- >- Restore to Draft- </Button>+ {instruction && (+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ variant="secondary"+ leftIcon={<LuGitPullRequestArrow />}+ rightIcon={<LuChevronDown />}+ >+ Versions+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end">+ {canCreate && (+ <>+ <DropdownMenuItem+ disabled={isCreatingVersion}+ onClick={onNewVersion}+ >+ <DropdownMenuIcon icon={<LuCirclePlus />} />+ New Version+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ </>+ )}+ <DropdownMenuRadioGroup+ value={id}+ onValueChange={(value) =>+ navigate(path.to.assemblyInstruction(value))+ }+ >+ {versions.map((version) => (+ <DropdownMenuRadioItem+ key={version.id}+ value={version.id}+ className="flex items-center justify-between gap-2"+ >+ <Badge variant="outline" className="tabular-nums">+ V{version.version}+ </Badge>+ <span>{version.name}</span>+ <AssemblyInstructionStatus status={version.status} />+ </DropdownMenuRadioItem>+ ))}+ </DropdownMenuRadioGroup>+ </DropdownMenuContent>+ </DropdownMenu>)}+ {instruction?.status === "Published"+ ? canCreate && (+ <Button+ isDisabled={isCreatingVersion}+ isLoading={isCreatingVersion}+ onClick={onNewVersion}+ >+ New Version+ </Button>+ )+ : instruction && (+ <Button+ isDisabled={!canUpdate}+ onClick={activateDisclosure.onOpen}+ >+ Make Active+ </Button>+ )}<IconButtonaria-label="Toggle Properties"icon={<LuPanelRight />}@@ -229,6 +279,17 @@ const AssemblyInstructionHeader = () => {}}/>)}+ {activateDisclosure.isOpen && instruction && (+ <Confirm+ isOpen+ title="Make Active"+ text={`Make version ${instruction.version} active? This publishes it, archives the currently active version, and repoints in-flight job operations to it.`}+ confirmText="Make Active"+ action={path.to.assemblyInstructionActivate(id)}+ onCancel={activateDisclosure.onClose}+ onSubmit={activateDisclosure.onClose}+ />+ )}</div>);};diff --git a/apps/erp/app/modules/production/ui/Assemblies/AssemblyInstructionsTable.tsx b/apps/erp/app/modules/production/ui/Assemblies/AssemblyInstructionsTable.tsxindex 4b48a9590b..a991c694ba 100644--- a/apps/erp/app/modules/production/ui/Assemblies/AssemblyInstructionsTable.tsx+++ b/apps/erp/app/modules/production/ui/Assemblies/AssemblyInstructionsTable.tsx@@ -1,4 +1,8 @@import {+ Badge,+ HoverCard,+ HoverCardContent,+ HoverCardTrigger,MenuIcon,MenuItem,Status,@@ -14,6 +18,8 @@ import {LuBox,LuCalendar,LuCircleCheck,+ LuEllipsisVertical,+ LuGitPullRequest,LuPencil,LuSquareStack,LuTrash@@ -67,9 +73,14 @@ const AssemblyInstructionsTable = memo(accessorKey: "name",header: "Name",cell: ({ row }) => (- <Hyperlink to={path.to.assemblyInstruction(row.original.id)}>- {row.original.name}- </Hyperlink>+ <div className="flex flex-col gap-0">+ <Hyperlink to={path.to.assemblyInstruction(row.original.id!)}>+ {row.original.name}+ </Hyperlink>+ <span className="text-sm text-muted-foreground">+ Version {row.original.version}+ </span>+ </div>),meta: {icon: <LuBlocks />@@ -151,6 +162,56 @@ const AssemblyInstructionsTable = memo(meta: {icon: <LuCalendar />}+ },+ {+ id: "versions",+ header: "Versions",+ cell: ({ row }) => {+ const versions = (row.original?.versions ?? []) as Array<{+ id: string;+ version: number;+ status: "Draft" | "Published" | "Archived";+ }>;++ return (+ <HoverCard>+ <HoverCardTrigger>+ <Badge variant="secondary" className="cursor-pointer">+ {versions.length} Version+ {versions.length === 1 ? "" : "s"}+ <LuEllipsisVertical className="w-3 h-3 ml-2" />+ </Badge>+ </HoverCardTrigger>+ <HoverCardContent>+ <div className="flex flex-col w-full gap-4 text-sm">+ {versions+ .sort((a, b) => a.version - b.version)+ .map((version) => (+ <div+ key={version.id}+ className="flex items-center justify-between gap-2"+ >+ <Hyperlink+ to={path.to.assemblyInstruction(version.id)}+ className="flex items-center justify-start gap-1"+ >+ Version {version.version}+ </Hyperlink>+ <div className="flex items-center justify-end">+ <AssemblyInstructionStatus+ status={version.status}+ />+ </div>+ </div>+ ))}+ </div>+ </HoverCardContent>+ </HoverCard>+ );+ },+ meta: {+ icon: <LuGitPullRequest />+ }}],[items]@@ -163,7 +224,7 @@ const AssemblyInstructionsTable = memo(<MenuItemdisabled={!permissions.can("update", "production")}onClick={() => {- navigate(path.to.assemblyInstruction(row.id));+ navigate(path.to.assemblyInstruction(row.id!));}}><MenuIcon icon={<LuPencil />} />@@ -207,7 +268,7 @@ const AssemblyInstructionsTable = memo(/>{deleteDisclosure.isOpen && selectedInstruction && (<ConfirmDelete- action={path.to.deleteAssemblyInstruction(selectedInstruction.id)}+ action={path.to.deleteAssemblyInstruction(selectedInstruction.id!)}isOpenonCancel={() => {setSelectedInstruction(null);diff --git a/apps/erp/app/modules/production/ui/Assemblies/ModelConvertProgress.tsx b/apps/erp/app/modules/production/ui/Assemblies/ModelConvertProgress.tsxindex 4ef8d26b72..c714e82643 100644--- a/apps/erp/app/modules/production/ui/Assemblies/ModelConvertProgress.tsx+++ b/apps/erp/app/modules/production/ui/Assemblies/ModelConvertProgress.tsx@@ -82,7 +82,7 @@ export function ModelConvertProgress({return (<div className="flex h-full w-full items-center justify-center p-6">- <div className="flex w-[340px] flex-col gap-4 rounded-xl border border-border bg-card p-6 shadow-lg">+ <div className="flex w-[340px] flex-col gap-4 rounded-lg border border-border bg-card p-6 shadow-lg"><BarProgress progress={fraction} max={1} activeClassName="bg-primary" /><div className="flex flex-col gap-2.5">{STEPS.map((step, i) => {diff --git a/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx b/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsxindex 910ac704c0..39e1c5a83b 100644--- a/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx+++ b/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx@@ -4227,7 +4227,7 @@ function OperationChat({ jobOperationId }: { jobOperationId: string }) {)}<divclassName={cn(- "rounded-2xl p-3 w-full flex flex-col gap-1",+ "rounded-lg p-3 w-full flex flex-col gap-1",isUser ? "bg-blue-500 text-white" : "bg-muted")}>diff --git a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderSummary.tsx b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderSummary.tsxindex 8f2ee06ae1..2b979006aa 100644--- a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderSummary.tsx+++ b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderSummary.tsx@@ -146,7 +146,7 @@ const LineItems = ({</Link></Button></HStack>- <span className="text-muted-foreground text-base truncate">+ <span className="text-muted-foreground text-sm truncate">{isGlAccount? (accounts.find((a) => a.id === line.accountId)?.name ?? "Indirect Expense")@@ -485,7 +485,7 @@ const PurchaseOrderSummary = ({supplierId={routeData?.purchaseOrder.supplierId ?? null}/>{routeData?.purchaseOrder?.orderDate && (- <span className="text-muted-foreground text-sm">+ <span className="text-xs text-muted-foreground tracking-tight">Ordered {formatDate(routeData?.purchaseOrder.orderDate)}</span>)}@@ -503,7 +503,7 @@ const PurchaseOrderSummary = ({/><VStack spacing={2} className="mt-8">- <HStack className="justify-between text-base text-muted-foreground w-full">+ <HStack className="justify-between text-sm text-muted-foreground w-full"><span>Subtotal:</span><VStack spacing={0} className="items-end"><span>{formatter.format(subtotal)}</span>@@ -514,7 +514,7 @@ const PurchaseOrderSummary = ({)}</VStack></HStack>- <HStack className="justify-between text-base text-muted-foreground w-full">+ <HStack className="justify-between text-sm text-muted-foreground w-full"><span>Tax:</span><VStack spacing={0} className="items-end"><span>{formatter.format(tax)}</span>@@ -526,7 +526,7 @@ const PurchaseOrderSummary = ({</VStack></HStack>- <HStack className="justify-between text-base text-muted-foreground w-full">+ <HStack className="justify-between text-sm text-muted-foreground w-full">{shippingCost > 0 ? (<><VStack spacing={0}>@@ -557,7 +557,7 @@ const PurchaseOrderSummary = ({<Buttonvariant="link"size="sm"- className="text-muted-foreground"+ className="text-primary"onClick={onEditShippingCost}><Trans>Add Shipping</Trans>@@ -565,7 +565,7 @@ const PurchaseOrderSummary = ({) : null}</HStack>- <HStack className="justify-between text-xl font-bold w-full">+ <HStack className="justify-between text-xl font-semibold w-full"><span>Total:</span><VStack spacing={0} className="items-end"><span>{formatter.format(total)}</span>diff --git a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteSummary.tsx b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteSummary.tsxindex 4ffa3db08a..3b33033dd1 100644--- a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteSummary.tsx+++ b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteSummary.tsx@@ -156,7 +156,7 @@ const LineItems = ({</motion.div></HStack></div>- <span className="text-muted-foreground text-base truncate">+ <span className="text-muted-foreground text-sm truncate">{isGlAccount? (accounts.find((a) => a.id === line.accountId)?.name ??"G/L Account")@@ -335,7 +335,7 @@ const SupplierQuoteSummary = () => {<div className="flex flex-col gap-1 items-end"><SupplierAvatar supplierId={routeData?.quote.supplierId ?? null} />{routeData?.quote?.expirationDate && (- <span className="text-muted-foreground text-sm">+ <span className="text-xs text-muted-foreground tracking-tight">Expires {formatDate(routeData?.quote.expirationDate)}</span>)}diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteSummary.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteSummary.tsxindex 0ecd5dfc8c..194e3d7900 100644--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteSummary.tsx+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteSummary.tsx@@ -219,7 +219,7 @@ const LineItems = ({</motion.div></HStack></div>- <span className="text-muted-foreground text-base truncate">+ <span className="text-muted-foreground text-sm truncate">{line.description}</span></div>@@ -860,7 +860,7 @@ const QuoteSummary = ({<div className="flex flex-col gap-1 items-end"><CustomerAvatar customerId={routeData?.quote.customerId ?? null} />{routeData?.quote?.expirationDate && (- <span className="text-muted-foreground text-sm">+ <span className="text-xs text-muted-foreground tracking-tight">Expires {formatDate(routeData?.quote.expirationDate)}</span>)}@@ -877,7 +877,7 @@ const QuoteSummary = ({/><VStack spacing={2} className="mt-8">- <HStack className="justify-between text-base text-muted-foreground w-full">+ <HStack className="justify-between text-sm text-muted-foreground w-full"><span>Subtotal:</span><MotionNumbervalue={subtotal + totalDiscount}@@ -889,7 +889,7 @@ const QuoteSummary = ({/></HStack>{totalDiscount > 0 && (- <HStack className="justify-between text-base text-muted-foreground w-full">+ <HStack className="justify-between text-sm text-muted-foreground w-full"><span>Discount:</span><span className="text-muted-foreground">-@@ -904,7 +904,7 @@ const QuoteSummary = ({</span></HStack>)}- <HStack className="justify-between text-base text-muted-foreground w-full">+ <HStack className="justify-between text-sm text-muted-foreground w-full"><span>Tax:</span><MotionNumbervalue={tax}@@ -915,7 +915,7 @@ const QuoteSummary = ({locales={locale}/></HStack>- <HStack className="justify-between text-base text-muted-foreground w-full">+ <HStack className="justify-between text-sm text-muted-foreground w-full">{convertedShippingCost > 0 ? (<><VStack spacing={0}>@@ -942,14 +942,14 @@ const QuoteSummary = ({<Buttonvariant="link"size="sm"- className="text-muted-foreground"+ className="text-primary"onClick={onEditShippingCost}><Trans>Add Shipping</Trans></Button>) : null}</HStack>- <HStack className="justify-between text-xl font-bold w-full">+ <HStack className="justify-between text-xl font-semibold w-full"><span>Total:</span><MotionNumbervalue={total}diff --git a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderSummary.tsx b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderSummary.tsxindex 700ebaf81e..cce2c8cc8f 100644--- a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderSummary.tsx+++ b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrderSummary.tsx@@ -194,13 +194,13 @@ const SalesOrderSummary = ({customerId={routeData?.salesOrder.customerId ?? null}/>{routeData?.salesOrder?.orderDate && (- <span className="text-muted-foreground text-sm">+ <span className="text-xs text-muted-foreground tracking-tight"><Trans>Ordered</Trans>{" "}{formatDate(routeData?.salesOrder.orderDate)}</span>)}{routeData?.quote?.digitalQuoteAcceptedBy && (- <span className="text-muted-foreground text-sm flex flex-row items-center gap-x-1">+ <span className="text-xs text-muted-foreground tracking-tight flex flex-row items-center gap-x-1"><Trans>via Digital Quote</Trans><Tooltip><TooltipTrigger>@@ -230,7 +230,7 @@ const SalesOrderSummary = ({/><VStack spacing={2} className="mt-8">- <HStack className="justify-between text-base text-muted-foreground w-full">+ <HStack className="justify-between text-sm text-muted-foreground w-full"><span><Trans>Subtotal:</Trans></span>@@ -243,7 +243,7 @@ const SalesOrderSummary = ({locales={locale}/></HStack>- <HStack className="justify-between text-base text-muted-foreground w-full">+ <HStack className="justify-between text-sm text-muted-foreground w-full"><span><Trans>Tax:</Trans></span>@@ -256,7 +256,7 @@ const SalesOrderSummary = ({locales={locale}/></HStack>- <HStack className="justify-between text-base text-muted-foreground w-full">+ <HStack className="justify-between text-sm text-muted-foreground w-full">{convertedShippingCost > 0 ? (<><VStack spacing={0}>@@ -285,14 +285,14 @@ const SalesOrderSummary = ({<Buttonvariant="link"size="sm"- className="text-muted-foreground"+ className="text-primary"onClick={onEditShippingCost}><Trans>Add Shipping</Trans></Button>) : null}</HStack>- <HStack className="justify-between text-xl font-bold w-full">+ <HStack className="justify-between text-xl font-semibold w-full"><span><Trans>Total:</Trans></span>@@ -306,7 +306,7 @@ const SalesOrderSummary = ({/></HStack><div className="h-px bg-border my-2 w-full" />- <HStack className="justify-between text-base text-muted-foreground w-full">+ <HStack className="justify-between text-sm text-muted-foreground w-full"><span><Trans>Invoiced Amount:</Trans></span>@@ -319,7 +319,7 @@ const SalesOrderSummary = ({locales={locale}/></HStack>- <HStack className="justify-between text-base text-muted-foreground w-full">+ <HStack className="justify-between text-sm text-muted-foreground w-full"><span><Trans>Paid Amount:</Trans></span>@@ -439,7 +439,7 @@ function LineItems({</Link></Button></HStack>- <span className="text-muted-foreground text-base truncate">+ <span className="text-muted-foreground text-sm truncate">{line.description}</span></VStack>diff --git a/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json b/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.jsonindex d3330602d0..d92e0464e9 100644--- a/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json+++ b/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json@@ -1,6 +1,6 @@{- "generated": "2026-07-30T18:22:37.513Z",- "totalTools": 1402,+ "generated": "2026-07-31T03:26:04.196Z",+ "totalTools": 1405,"modules": 15,"tools": [{@@ -22258,6 +22258,89 @@]}},+ {+ "name": "production_getAssemblyInstructionVersions",+ "module": "production",+ "classification": "READ",+ "description": "get assembly instruction versions",+ "paramCount": 2,+ "serviceParams": [+ "client",+ "instruction"+ ],+ "injectAuth": [+ "companyId"+ ],+ "schema": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string"+ },+ "rootInstructionId": {+ "type": [+ "string",+ "null"+ ]+ }+ },+ "required": [+ "id"+ ]+ }+ },+ {+ "name": "production_copyAssemblyInstructionAsVersion",+ "module": "production",+ "classification": "WRITE",+ "description": "copy assembly instruction as version",+ "paramCount": 1,+ "serviceParams": [+ "client",+ "args"+ ],+ "injectAuth": [+ "companyId",+ "createdBy",+ "updatedBy"+ ],+ "schema": {+ "type": "object",+ "properties": {+ "copyFromId": {+ "type": "string"+ }+ },+ "required": [+ "copyFromId"+ ]+ }+ },+ {+ "name": "production_activateAssemblyInstructionVersion",+ "module": "production",+ "classification": "WRITE",+ "description": "activate assembly instruction version",+ "paramCount": 1,+ "serviceParams": [+ "client",+ "args"+ ],+ "injectAuth": [+ "companyId"+ ],+ "schema": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string"+ }+ },+ "required": [+ "id"+ ]+ }+ },{"name": "production_deleteAssemblyInstruction","module": "production",diff --git a/apps/erp/app/routes/onboarding+/industry.tsx b/apps/erp/app/routes/onboarding+/industry.tsxindex f44ba5ce3e..1f5011e9cc 100644--- a/apps/erp/app/routes/onboarding+/industry.tsx+++ b/apps/erp/app/routes/onboarding+/industry.tsx@@ -264,7 +264,7 @@ export default function OnboardingIndustry() {<input type="hidden" name="dataChoice" value="import" /><labelclassName={cn(- "flex cursor-pointer flex-col items-center justify-center gap-2 rounded-xl border-2 border-dashed p-6 text-center transition-colors",+ "flex cursor-pointer flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed p-6 text-center transition-colors","border-border hover:border-primary/50 hover:bg-accent/50")}>diff --git a/apps/erp/app/routes/onboarding+/plan.tsx b/apps/erp/app/routes/onboarding+/plan.tsxindex 56fcced925..aaeacfd77f 100644--- a/apps/erp/app/routes/onboarding+/plan.tsx+++ b/apps/erp/app/routes/onboarding+/plan.tsx@@ -149,7 +149,7 @@ export default function OnboardingPlan() {return (<><div className="flex flex-col max-w-2xl w-full min-h-screen md:min-h-0">- <div className="sticky top-0 bg-background z-10 mb-4 rounded-2xl">+ <div className="sticky top-0 bg-background z-10 mb-4 rounded-lg"><CardHeader><CardTitle><Trans>Select a plan</Trans>diff --git a/apps/erp/app/routes/select-company+/_index.tsx b/apps/erp/app/routes/select-company+/_index.tsxindex ce9c25fbd6..c1dfc5fbd8 100644--- a/apps/erp/app/routes/select-company+/_index.tsx+++ b/apps/erp/app/routes/select-company+/_index.tsx@@ -72,7 +72,7 @@ export default function SelectCompany() {}, [companies, companiesLabel]);return (- <div className="w-full max-w-[26rem] overflow-hidden rounded-2xl bg-card text-card-foreground shadow-2xl ring-1 ring-black/5 antialiased dark:ring-white/10">+ <div className="w-full max-w-[26rem] overflow-hidden rounded-lg bg-card text-card-foreground shadow-lg ring-1 ring-black/5 antialiased dark:ring-white/10"><div className="flex flex-col items-center gap-4 px-8 pb-6 pt-9"><imgsrc={CONTROLLED_ENVIRONMENT ? "/flag.png" : "/carbon-mark-light.svg"}@@ -135,7 +135,7 @@ export default function SelectCompany() {<buttontype="submit"disabled={isBusy}- className="group flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left hover:bg-accent focus-visible:bg-accent focus-visible:outline-none disabled:pointer-events-none disabled:opacity-60"+ className="group flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-left hover:bg-accent focus-visible:bg-accent focus-visible:outline-none disabled:pointer-events-none disabled:opacity-60"><Avatarsize="md"diff --git a/apps/erp/app/routes/x+/_index.tsx b/apps/erp/app/routes/x+/_index.tsxindex e4ce904f5b..c7b1d5c419 100644--- a/apps/erp/app/routes/x+/_index.tsx+++ b/apps/erp/app/routes/x+/_index.tsx@@ -28,7 +28,6 @@ import { LuRocket } from "react-icons/lu";import type { LoaderFunctionArgs } from "react-router";import { Link, redirect, useFetcher } from "react-router";import { Greeting } from "~/components/Greeting";-import { MeshGradientBackground } from "~/components/MeshGradientBackground";import { useModules, usePermissions, useUser } from "~/hooks";import { useHubDismissed } from "~/hooks/useHubDismissed";import type { Authenticated, NavItem } from "~/types";@@ -124,7 +123,6 @@ export default function AppIndexRoute() {return (<div className="relative w-full h-full overflow-hidden">- <MeshGradientBackground darkOnly /><div className="relative z-10 p-8 w-full h-full overflow-y-auto"><Greeting size="h3" /><Subheading>{formatter.format(date)}</Subheading>@@ -151,12 +149,12 @@ export default function AppIndexRoute() {action={path.to.getStartedEnroll}className="mb-6">- <div className="rounded-2xl ring-2 ring-transparent bg-gradient-to-bl from-card/70 from-50% to-background/70 backdrop-blur-md shadow-button-base p-6 flex items-start gap-4">- <div className="shrink-0 size-11 rounded-2xl bg-accent flex items-center justify-center text-primary">+ <div className="rounded-lg ring-2 ring-transparent bg-gradient-to-bl from-card/70 from-50% to-background/70 backdrop-blur-md shadow-button-base p-6 flex items-start gap-4">+ <div className="shrink-0 size-11 rounded-lg bg-accent flex items-center justify-center text-primary"><LuRocket className="text-xl" /></div><div className="flex-1 min-w-0">- <div className="text-xxs uppercase tracking-wide font-medium text-primary">+ <div className="text-xxs uppercase tracking-wide font-medium"><Trans>Get Started</Trans></div><div className="text-base font-semibold tracking-tight mt-0.5 text-balance">diff --git a/apps/erp/app/routes/x+/assembly+/$id.activate.tsx b/apps/erp/app/routes/x+/assembly+/$id.activate.tsxnew file mode 100644index 0000000000..7bfec93cf8--- /dev/null+++ b/apps/erp/app/routes/x+/assembly+/$id.activate.tsx@@ -0,0 +1,38 @@+import { assertIsPost, error, success } from "@carbon/auth";+import { requirePermissions } from "@carbon/auth/auth.server";+import { flash } from "@carbon/auth/session.server";+import type { ActionFunctionArgs } from "react-router";+import { redirect } from "react-router";+import { activateAssemblyInstructionVersion } from "~/modules/production";+import { path, requestReferrer } from "~/utils/path";++export async function action({ request, params }: ActionFunctionArgs) {+ assertIsPost(request);+ const { client, companyId, userId } = await requirePermissions(request, {+ update: "production"+ });++ const { id } = params;+ if (!id) throw new Error("Could not find id");++ const update = await activateAssemblyInstructionVersion(client, {+ id,+ companyId,+ userId+ });++ if (update.error) {+ throw redirect(+ requestReferrer(request) ?? path.to.assemblyInstruction(id),+ await flash(+ request,+ error(update.error, "Failed to make assembly instruction active")+ )+ );+ }++ throw redirect(+ requestReferrer(request) ?? path.to.assemblyInstruction(id),+ await flash(request, success("Made assembly instruction active"))+ );+}diff --git a/apps/erp/app/routes/x+/assembly+/$id.tsx b/apps/erp/app/routes/x+/assembly+/$id.tsxindex c1544f5181..b6870e5d77 100644--- a/apps/erp/app/routes/x+/assembly+/$id.tsx+++ b/apps/erp/app/routes/x+/assembly+/$id.tsx@@ -39,6 +39,7 @@ import {getAssemblyInstructionStepSlides,getAssemblyInstructionSteps,getAssemblyInstructionStepTools,+ getAssemblyInstructionVersions,getAssemblyPlanJson,getAssemblyUnits,getFlattenedBomMaterials,@@ -108,7 +109,8 @@ export async function loader({ request, params }: LoaderFunctionArgs) {componentMappings,units,bomMaterials,- assemblerAvailable+ assemblerAvailable,+ versions] = await Promise.all([getAssemblyInstructionStepMaterials(client, stepIds),getAssemblyInstructionStepSlides(client, stepIds),@@ -128,7 +130,8 @@ export async function loader({ request, params }: LoaderFunctionArgs) {instruction.data.itemId? getFlattenedBomMaterials(client, instruction.data.itemId, companyId): Promise.resolve([]),- isAssemblerServiceHealthy()+ isAssemblerServiceHealthy(),+ getAssemblyInstructionVersions(client, instruction.data)]);return {@@ -142,7 +145,8 @@ export async function loader({ request, params }: LoaderFunctionArgs) {planJob: planJob.data ?? null,componentMappings: componentMappings.data ?? [],bomMaterials,- assemblerAvailable+ assemblerAvailable,+ versions: versions.data ?? []};}diff --git a/apps/erp/app/routes/x+/assembly+/$id.version.new.tsx b/apps/erp/app/routes/x+/assembly+/$id.version.new.tsxnew file mode 100644index 0000000000..f8d9d2ce9e--- /dev/null+++ b/apps/erp/app/routes/x+/assembly+/$id.version.new.tsx@@ -0,0 +1,47 @@+import { assertIsPost, error } from "@carbon/auth";+import { requirePermissions } from "@carbon/auth/auth.server";+import { flash } from "@carbon/auth/session.server";+import { validationError, validator } from "@carbon/form";+import type { ActionFunctionArgs } from "react-router";+import { data, redirect } from "react-router";+import {+ assemblyInstructionVersionValidator,+ copyAssemblyInstructionAsVersion+} from "~/modules/production";+import { path } from "~/utils/path";++export async function action({ request, params }: ActionFunctionArgs) {+ assertIsPost(request);+ const { client, companyId, userId } = await requirePermissions(request, {+ create: "production"+ });++ const { id } = params;+ if (!id) throw new Error("Could not find id");++ const validation = await validator(+ assemblyInstructionVersionValidator+ ).validate(await request.formData());++ if (validation.error) {+ return validationError(validation.error);+ }++ const copy = await copyAssemblyInstructionAsVersion(client, {+ copyFromId: validation.data.copyFromId,+ companyId,+ userId+ });++ if (copy.error || !copy.data?.id) {+ return data(+ {},+ await flash(+ request,+ error(copy.error, "Failed to create new assembly instruction version")+ )+ );+ }++ throw redirect(path.to.assemblyInstruction(copy.data.id));+}diff --git a/apps/erp/app/routes/x+/get-started+/_layout.tsx b/apps/erp/app/routes/x+/get-started+/_layout.tsxindex 8200a0a993..6db4a232cd 100644--- a/apps/erp/app/routes/x+/get-started+/_layout.tsx+++ b/apps/erp/app/routes/x+/get-started+/_layout.tsx@@ -36,7 +36,6 @@ import {} from "react-router";import { GroupedContentSidebar } from "~/components/Layout";import { CollapsibleSidebarProvider } from "~/components/Layout/Navigation";-import { MeshGradientBackground } from "~/components/MeshGradientBackground";import { useSettings, useUser } from "~/hooks";import {setCustomerPreview,@@ -253,7 +252,6 @@ export default function GetStartedLayout() {<div className="grid grid-cols-[auto_1fr] grid-rows-[minmax(0,1fr)] w-full h-full overflow-hidden"><GroupedContentSidebar groups={groups} exactMatch /><div className="relative min-w-0 overflow-hidden">- <MeshGradientBackground darkOnly /><div ref={scrollRef} className="relative z-10 h-full overflow-y-auto">{isInternal ? (<PreviewBar previewing={previewingAsCustomer} />diff --git a/apps/erp/app/utils/path.ts b/apps/erp/app/utils/path.tsindex aac931a63d..5fd7b55164 100644--- a/apps/erp/app/utils/path.ts+++ b/apps/erp/app/utils/path.ts@@ -291,6 +291,8 @@ export const path = {generatePath(`${x}/settings/approval-rules/${id}`),approvalRules: `${x}/settings/approval-rules`,assemblyInstruction: (id: string) => generatePath(`${x}/assembly/${id}`),+ assemblyInstructionActivate: (id: string) =>+ generatePath(`${x}/assembly/${id}/activate`),assemblyInstructionStatus: (id: string) =>generatePath(`${x}/assembly/${id}/status`),assemblyInstructionStep: (id: string, stepId: string) =>@@ -306,6 +308,8 @@ export const path = {assemblyInstructionStepStatus: (id: string, stepId: string) =>generatePath(`${x}/assembly/${id}/steps/status/${stepId}`),assemblyInstructions: `${x}/production/assemblies`,+ assemblyInstructionVersionNew: (id: string) =>+ generatePath(`${x}/assembly/${id}/version/new`),assemblyJobsCancel: (id: string) =>generatePath(`${x}/assembly/${id}/jobs/cancel`),assemblyModelConvert: (id: string) =>diff --git a/apps/mes/app/components/JobOperation/components/Chat.tsx b/apps/mes/app/components/JobOperation/components/Chat.tsxindex 4f8bba03e7..435a902434 100644--- a/apps/mes/app/components/JobOperation/components/Chat.tsx+++ b/apps/mes/app/components/JobOperation/components/Chat.tsx@@ -186,7 +186,7 @@ export function OperationChat({)}<divclassName={cn(- "rounded-2xl p-3 w-full flex flex-col gap-1",+ "rounded-xl p-3 w-full flex flex-col gap-1",isUser ? "bg-blue-500 text-white" : "bg-muted")}>diff --git a/apps/mes/app/components/PinInOverlay.tsx b/apps/mes/app/components/PinInOverlay.tsxindex 953accc1ee..d8c5463ce3 100644--- a/apps/mes/app/components/PinInOverlay.tsx+++ b/apps/mes/app/components/PinInOverlay.tsx@@ -184,7 +184,7 @@ export function PinInOverlay({onClick={handleBackdropClick}><div- className="w-full max-w-sm mx-4 rounded-2xl border bg-card shadow-2xl overflow-hidden relative"+ className="w-full max-w-sm mx-4 rounded-lg border bg-card shadow-lg overflow-hidden relative"onClick={(e) => e.stopPropagation()}>{/* Close button — top right, outside the search bar */}diff --git a/packages/database/src/swagger-docs-schema.ts b/packages/database/src/swagger-docs-schema.tsindex f5f7fc25e0..05a653b871 100644--- a/packages/database/src/swagger-docs-schema.ts+++ b/packages/database/src/swagger-docs-schema.ts@@ -33105,6 +33105,9 @@ export default {{$ref: "#/parameters/rowFilter.assemblyInstruction.updatedAt"},+ {+ $ref: "#/parameters/rowFilter.assemblyInstruction.rootInstructionId"+ },{$ref: "#/parameters/select"},@@ -33212,6 +33215,9 @@ export default {{$ref: "#/parameters/rowFilter.assemblyInstruction.updatedAt"},+ {+ $ref: "#/parameters/rowFilter.assemblyInstruction.rootInstructionId"+ },{$ref: "#/parameters/preferReturn"}@@ -33273,6 +33279,9 @@ export default {{$ref: "#/parameters/rowFilter.assemblyInstruction.updatedAt"},+ {+ $ref: "#/parameters/rowFilter.assemblyInstruction.rootInstructionId"+ },{$ref: "#/parameters/body.assemblyInstruction"},@@ -59163,6 +59172,102 @@ export default {tags: ["ability"]}},+ "/assemblyInstructions": {+ get: {+ parameters: [+ {+ $ref: "#/parameters/rowFilter.assemblyInstructions.id"+ },+ {+ $ref: "#/parameters/rowFilter.assemblyInstructions.name"+ },+ {+ $ref: "#/parameters/rowFilter.assemblyInstructions.modelUploadId"+ },+ {+ $ref: "#/parameters/rowFilter.assemblyInstructions.itemId"+ },+ {+ $ref: "#/parameters/rowFilter.assemblyInstructions.assemblyPlanJobId"+ },+ {+ $ref: "#/parameters/rowFilter.assemblyInstructions.status"+ },+ {+ $ref: "#/parameters/rowFilter.assemblyInstructions.version"+ },+ {+ $ref: "#/parameters/rowFilter.assemblyInstructions.publishedAt"+ },+ {+ $ref: "#/parameters/rowFilter.assemblyInstructions.settings"+ },+ {+ $ref: "#/parameters/rowFilter.assemblyInstructions.rootInstructionId"+ },+ {+ $ref: "#/parameters/rowFilter.assemblyInstructions.companyId"+ },+ {+ $ref: "#/parameters/rowFilter.assemblyInstructions.customFields"+ },+ {+ $ref: "#/parameters/rowFilter.assemblyInstructions.tags"+ },+ {+ $ref: "#/parameters/rowFilter.assemblyInstructions.createdBy"+ },+ {+ $ref: "#/parameters/rowFilter.assemblyInstructions.createdAt"+ },+ {+ $ref: "#/parameters/rowFilter.assemblyInstructions.updatedBy"+ },+ {+ $ref: "#/parameters/rowFilter.assemblyInstructions.updatedAt"+ },+ {+ $ref: "#/parameters/rowFilter.assemblyInstructions.versions"+ },+ {+ $ref: "#/parameters/select"+ },+ {+ $ref: "#/parameters/order"+ },+ {+ $ref: "#/parameters/range"+ },+ {+ $ref: "#/parameters/rangeUnit"+ },+ {+ $ref: "#/parameters/offset"+ },+ {+ $ref: "#/parameters/limit"+ },+ {+ $ref: "#/parameters/preferCount"+ }+ ],+ responses: {+ "200": {+ description: "OK",+ schema: {+ items: {+ $ref: "#/definitions/assemblyInstructions"+ },+ type: "array"+ }+ },+ "206": {+ description: "Partial Content"+ }+ },+ tags: ["assemblyInstructions"]+ }+ },"/dimensionValues": {get: {parameters: [@@ -100085,7 +100190,7 @@ export default {properties: {id: {description:- "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `supplierLocation.id`.<fk table='supplierLocation' column='id'/>",+ "Note:\nThis is a Foreign Key to `supplierLocation.id`.<fk table='supplierLocation' column='id'/>",format: "text",type: "string"},@@ -100134,7 +100239,7 @@ export default {},supplierLocationId: {description:- "Note:\nThis is a Foreign Key to `supplierLocation.id`.<fk table='supplierLocation' column='id'/>",+ "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `supplierLocation.id`.<fk table='supplierLocation' column='id'/>",format: "text",type: "string"},@@ -110193,6 +110298,12 @@ export default {updatedAt: {format: "timestamp with time zone",type: "string"+ },+ rootInstructionId: {+ description:+ "Note:\nThis is a Foreign Key to `assemblyInstruction.id`.<fk table='assemblyInstruction' column='id'/>",+ format: "text",+ type: "string"}},type: "object"@@ -122322,6 +122433,99 @@ export default {},type: "object"},+ assemblyInstructions: {+ properties: {+ id: {+ description: "Note:\nThis is a Primary Key.<pk/>",+ format: "text",+ type: "string"+ },+ name: {+ format: "text",+ type: "string"+ },+ modelUploadId: {+ description:+ "Note:\nThis is a Foreign Key to `modelUpload.id`.<fk table='modelUpload' column='id'/>",+ format: "text",+ type: "string"+ },+ itemId: {+ description:+ "Note:\nThis is a Foreign Key to `item.id`.<fk table='item' column='id'/>",+ format: "text",+ type: "string"+ },+ assemblyPlanJobId: {+ description:+ "Note:\nThis is a Foreign Key to `assemblyPlanJob.id`.<fk table='assemblyPlanJob' column='id'/>",+ format: "text",+ type: "string"+ },+ status: {+ enum: ["Draft", "Published", "Archived"],+ format: 'public."assemblyInstructionStatus"',+ type: "string"+ },+ version: {+ format: "integer",+ type: "integer"+ },+ publishedAt: {+ format: "timestamp with time zone",+ type: "string"+ },+ settings: {+ format: "jsonb"+ },+ rootInstructionId: {+ description:+ "Note:\nThis is a Foreign Key to `assemblyInstruction.id`.<fk table='assemblyInstruction' column='id'/>",+ format: "text",+ type: "string"+ },+ companyId: {+ description:+ "Note:\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",+ format: "text",+ type: "string"+ },+ customFields: {+ format: "jsonb"+ },+ tags: {+ format: "text[]",+ items: {+ type: "string"+ },+ type: "array"+ },+ createdBy: {+ description:+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",+ format: "text",+ type: "string"+ },+ createdAt: {+ format: "timestamp with time zone",+ type: "string"+ },+ updatedBy: {+ description:+ "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",+ format: "text",+ type: "string"+ },+ updatedAt: {+ format: "timestamp with time zone",+ type: "string"+ },+ versions: {+ format: "jsonb"+ }+ },+ type: "object"+ },dimensionValues: {properties: {dimensionId: {@@ -152189,6 +152393,12 @@ export default {in: "query",type: "string"},+ "rowFilter.assemblyInstruction.rootInstructionId": {+ name: "rootInstructionId",+ required: false,+ in: "query",+ type: "string"+ },"body.purchaseOrderStatusHistory": {name: "purchaseOrderStatusHistory",description: "purchaseOrderStatusHistory",@@ -165661,6 +165871,123 @@ export default {in: "query",type: "string"},+ "body.assemblyInstructions": {+ name: "assemblyInstructions",+ description: "assemblyInstructions",+ required: false,+ in: "body",+ schema: {+ $ref: "#/definitions/assemblyInstructions"+ }+ },+ "rowFilter.assemblyInstructions.id": {+ name: "id",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.assemblyInstructions.name": {+ name: "name",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.assemblyInstructions.modelUploadId": {+ name: "modelUploadId",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.assemblyInstructions.itemId": {+ name: "itemId",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.assemblyInstructions.assemblyPlanJobId": {+ name: "assemblyPlanJobId",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.assemblyInstructions.status": {+ name: "status",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.assemblyInstructions.version": {+ name: "version",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.assemblyInstructions.publishedAt": {+ name: "publishedAt",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.assemblyInstructions.settings": {+ name: "settings",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.assemblyInstructions.rootInstructionId": {+ name: "rootInstructionId",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.assemblyInstructions.companyId": {+ name: "companyId",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.assemblyInstructions.customFields": {+ name: "customFields",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.assemblyInstructions.tags": {+ name: "tags",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.assemblyInstructions.createdBy": {+ name: "createdBy",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.assemblyInstructions.createdAt": {+ name: "createdAt",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.assemblyInstructions.updatedBy": {+ name: "updatedBy",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.assemblyInstructions.updatedAt": {+ name: "updatedAt",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.assemblyInstructions.versions": {+ name: "versions",+ required: false,+ in: "query",+ type: "string"+ },"body.dimensionValues": {name: "dimensionValues",description: "dimensionValues",diff --git a/packages/database/src/types.ts b/packages/database/src/types.tsindex 8afce629d0..37aee90f86 100644--- a/packages/database/src/types.ts+++ b/packages/database/src/types.ts@@ -2947,6 +2947,7 @@ export type Database = {modelUploadId: stringname: stringpublishedAt: string | null+ rootInstructionId: string | nullsettings: Json | nullstatus: Database["public"]["Enums"]["assemblyInstructionStatus"]tags: string[] | null@@ -2965,6 +2966,7 @@ export type Database = {modelUploadId: stringname: stringpublishedAt?: string | null+ rootInstructionId?: string | nullsettings?: Json | nullstatus?: Database["public"]["Enums"]["assemblyInstructionStatus"]tags?: string[] | null@@ -2983,6 +2985,7 @@ export type Database = {modelUploadId?: stringname?: stringpublishedAt?: string | null+ rootInstructionId?: string | nullsettings?: Json | nullstatus?: Database["public"]["Enums"]["assemblyInstructionStatus"]tags?: string[] | null@@ -3124,6 +3127,20 @@ export type Database = {referencedRelation: "salesRfqLines"referencedColumns: ["modelId"]},+ {+ foreignKeyName: "assemblyInstruction_rootInstructionId_fkey"+ columns: ["rootInstructionId"]+ isOneToOne: false+ referencedRelation: "assemblyInstruction"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_rootInstructionId_fkey"+ columns: ["rootInstructionId"]+ isOneToOne: false+ referencedRelation: "assemblyInstructions"+ referencedColumns: ["id"]+ },{foreignKeyName: "assemblyInstruction_updatedBy_fkey"columns: ["updatedBy"]@@ -3266,6 +3283,13 @@ export type Database = {referencedRelation: "assemblyInstruction"referencedColumns: ["id"]},+ {+ foreignKeyName: "assemblyInstructionStep_assemblyInstructionId_fkey"+ columns: ["assemblyInstructionId"]+ isOneToOne: false+ referencedRelation: "assemblyInstructions"+ referencedColumns: ["id"]+ },{foreignKeyName: "assemblyInstructionStep_companyId_fkey"columns: ["companyId"]@@ -22209,6 +22233,13 @@ export type Database = {referencedRelation: "assemblyInstruction"referencedColumns: ["id"]},+ {+ foreignKeyName: "jobOperation_assemblyInstructionId_fkey"+ columns: ["assemblyInstructionId"]+ isOneToOne: false+ referencedRelation: "assemblyInstructions"+ referencedColumns: ["id"]+ },{foreignKeyName: "jobOperation_assignee_fkey"columns: ["assignee"]@@ -28119,6 +28150,13 @@ export type Database = {referencedRelation: "assemblyInstruction"referencedColumns: ["id"]},+ {+ foreignKeyName: "methodOperation_assemblyInstructionId_fkey"+ columns: ["assemblyInstructionId"]+ isOneToOne: false+ referencedRelation: "assemblyInstructions"+ referencedColumns: ["id"]+ },{foreignKeyName: "methodOperation_companyId_fkey"columns: ["companyId"]@@ -42340,6 +42378,13 @@ export type Database = {referencedRelation: "assemblyInstruction"referencedColumns: ["id"]},+ {+ foreignKeyName: "quoteOperation_assemblyInstructionId_fkey"+ columns: ["assemblyInstructionId"]+ isOneToOne: false+ referencedRelation: "assemblyInstructions"+ referencedColumns: ["id"]+ },{foreignKeyName: "quoteOperation_companyId_fkey"columns: ["companyId"]@@ -58468,6 +58513,214 @@ export type Database = {},]}+ assemblyInstructions: {+ Row: {+ assemblyPlanJobId: string | null+ companyId: string | null+ createdAt: string | null+ createdBy: string | null+ customFields: Json | null+ id: string | null+ itemId: string | null+ modelUploadId: string | null+ name: string | null+ publishedAt: string | null+ rootInstructionId: string | null+ settings: Json | null+ status:+ | Database["public"]["Enums"]["assemblyInstructionStatus"]+ | null+ tags: string[] | null+ updatedAt: string | null+ updatedBy: string | null+ version: number | null+ versions: Json | null+ }+ Relationships: [+ {+ foreignKeyName: "assemblyInstruction_assemblyPlanJobId_fkey"+ columns: ["assemblyPlanJobId"]+ isOneToOne: false+ referencedRelation: "assemblyPlanJob"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_companyId_fkey"+ columns: ["companyId"]+ isOneToOne: false+ referencedRelation: "companies"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_companyId_fkey"+ columns: ["companyId"]+ isOneToOne: false+ referencedRelation: "company"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_companyId_fkey"+ columns: ["companyId"]+ isOneToOne: false+ referencedRelation: "customFieldTables"+ referencedColumns: ["companyId"]+ },+ {+ foreignKeyName: "assemblyInstruction_companyId_fkey"+ columns: ["companyId"]+ isOneToOne: false+ referencedRelation: "integrations"+ referencedColumns: ["companyId"]+ },+ {+ foreignKeyName: "assemblyInstruction_createdBy_fkey"+ columns: ["createdBy"]+ isOneToOne: false+ referencedRelation: "employees"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_createdBy_fkey"+ columns: ["createdBy"]+ isOneToOne: false+ referencedRelation: "employeesAcrossCompanies"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_createdBy_fkey"+ columns: ["createdBy"]+ isOneToOne: false+ referencedRelation: "employeeSummary"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_createdBy_fkey"+ columns: ["createdBy"]+ isOneToOne: false+ referencedRelation: "user"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_createdBy_fkey"+ columns: ["createdBy"]+ isOneToOne: false+ referencedRelation: "userDefaults"+ referencedColumns: ["userId"]+ },+ {+ foreignKeyName: "assemblyInstruction_itemId_fkey"+ columns: ["itemId"]+ isOneToOne: false+ referencedRelation: "consumables"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_itemId_fkey"+ columns: ["itemId"]+ isOneToOne: false+ referencedRelation: "item"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_itemId_fkey"+ columns: ["itemId"]+ isOneToOne: false+ referencedRelation: "materials"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_itemId_fkey"+ columns: ["itemId"]+ isOneToOne: false+ referencedRelation: "parts"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_itemId_fkey"+ columns: ["itemId"]+ isOneToOne: false+ referencedRelation: "services"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_itemId_fkey"+ columns: ["itemId"]+ isOneToOne: false+ referencedRelation: "tools"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_modelUploadId_fkey"+ columns: ["modelUploadId"]+ isOneToOne: false+ referencedRelation: "jobs"+ referencedColumns: ["modelId"]+ },+ {+ foreignKeyName: "assemblyInstruction_modelUploadId_fkey"+ columns: ["modelUploadId"]+ isOneToOne: false+ referencedRelation: "modelUpload"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_modelUploadId_fkey"+ columns: ["modelUploadId"]+ isOneToOne: false+ referencedRelation: "salesRfqLines"+ referencedColumns: ["modelId"]+ },+ {+ foreignKeyName: "assemblyInstruction_rootInstructionId_fkey"+ columns: ["rootInstructionId"]+ isOneToOne: false+ referencedRelation: "assemblyInstruction"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_rootInstructionId_fkey"+ columns: ["rootInstructionId"]+ isOneToOne: false+ referencedRelation: "assemblyInstructions"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "employees"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "employeesAcrossCompanies"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "employeeSummary"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "user"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "userDefaults"+ referencedColumns: ["userId"]+ },+ ]+ }changeOrders: {Row: {affectedItems: Json | null@@ -61842,6 +62095,13 @@ export type Database = {referencedRelation: "assemblyInstruction"referencedColumns: ["id"]},+ {+ foreignKeyName: "jobOperation_assemblyInstructionId_fkey"+ columns: ["assemblyInstructionId"]+ isOneToOne: false+ referencedRelation: "assemblyInstructions"+ referencedColumns: ["id"]+ },{foreignKeyName: "jobOperation_assignee_fkey"columns: ["assignee"]@@ -62142,6 +62402,13 @@ export type Database = {referencedRelation: "assemblyInstruction"referencedColumns: ["id"]},+ {+ foreignKeyName: "jobOperation_assemblyInstructionId_fkey"+ columns: ["assemblyInstructionId"]+ isOneToOne: false+ referencedRelation: "assemblyInstructions"+ referencedColumns: ["id"]+ },{foreignKeyName: "jobOperation_assignee_fkey"columns: ["assignee"]@@ -69544,14 +69811,14 @@ export type Database = {},{foreignKeyName: "address_countryCode_fkey"- columns: ["customerCountryCode"]+ columns: ["invoiceCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]},{foreignKeyName: "address_countryCode_fkey"- columns: ["invoiceCountryCode"]+ columns: ["customerCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]diff --git a/packages/database/supabase/functions/lib/types.ts b/packages/database/supabase/functions/lib/types.tsindex 8afce629d0..37aee90f86 100644--- a/packages/database/supabase/functions/lib/types.ts+++ b/packages/database/supabase/functions/lib/types.ts@@ -2947,6 +2947,7 @@ export type Database = {modelUploadId: stringname: stringpublishedAt: string | null+ rootInstructionId: string | nullsettings: Json | nullstatus: Database["public"]["Enums"]["assemblyInstructionStatus"]tags: string[] | null@@ -2965,6 +2966,7 @@ export type Database = {modelUploadId: stringname: stringpublishedAt?: string | null+ rootInstructionId?: string | nullsettings?: Json | nullstatus?: Database["public"]["Enums"]["assemblyInstructionStatus"]tags?: string[] | null@@ -2983,6 +2985,7 @@ export type Database = {modelUploadId?: stringname?: stringpublishedAt?: string | null+ rootInstructionId?: string | nullsettings?: Json | nullstatus?: Database["public"]["Enums"]["assemblyInstructionStatus"]tags?: string[] | null@@ -3124,6 +3127,20 @@ export type Database = {referencedRelation: "salesRfqLines"referencedColumns: ["modelId"]},+ {+ foreignKeyName: "assemblyInstruction_rootInstructionId_fkey"+ columns: ["rootInstructionId"]+ isOneToOne: false+ referencedRelation: "assemblyInstruction"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_rootInstructionId_fkey"+ columns: ["rootInstructionId"]+ isOneToOne: false+ referencedRelation: "assemblyInstructions"+ referencedColumns: ["id"]+ },{foreignKeyName: "assemblyInstruction_updatedBy_fkey"columns: ["updatedBy"]@@ -3266,6 +3283,13 @@ export type Database = {referencedRelation: "assemblyInstruction"referencedColumns: ["id"]},+ {+ foreignKeyName: "assemblyInstructionStep_assemblyInstructionId_fkey"+ columns: ["assemblyInstructionId"]+ isOneToOne: false+ referencedRelation: "assemblyInstructions"+ referencedColumns: ["id"]+ },{foreignKeyName: "assemblyInstructionStep_companyId_fkey"columns: ["companyId"]@@ -22209,6 +22233,13 @@ export type Database = {referencedRelation: "assemblyInstruction"referencedColumns: ["id"]},+ {+ foreignKeyName: "jobOperation_assemblyInstructionId_fkey"+ columns: ["assemblyInstructionId"]+ isOneToOne: false+ referencedRelation: "assemblyInstructions"+ referencedColumns: ["id"]+ },{foreignKeyName: "jobOperation_assignee_fkey"columns: ["assignee"]@@ -28119,6 +28150,13 @@ export type Database = {referencedRelation: "assemblyInstruction"referencedColumns: ["id"]},+ {+ foreignKeyName: "methodOperation_assemblyInstructionId_fkey"+ columns: ["assemblyInstructionId"]+ isOneToOne: false+ referencedRelation: "assemblyInstructions"+ referencedColumns: ["id"]+ },{foreignKeyName: "methodOperation_companyId_fkey"columns: ["companyId"]@@ -42340,6 +42378,13 @@ export type Database = {referencedRelation: "assemblyInstruction"referencedColumns: ["id"]},+ {+ foreignKeyName: "quoteOperation_assemblyInstructionId_fkey"+ columns: ["assemblyInstructionId"]+ isOneToOne: false+ referencedRelation: "assemblyInstructions"+ referencedColumns: ["id"]+ },{foreignKeyName: "quoteOperation_companyId_fkey"columns: ["companyId"]@@ -58468,6 +58513,214 @@ export type Database = {},]}+ assemblyInstructions: {+ Row: {+ assemblyPlanJobId: string | null+ companyId: string | null+ createdAt: string | null+ createdBy: string | null+ customFields: Json | null+ id: string | null+ itemId: string | null+ modelUploadId: string | null+ name: string | null+ publishedAt: string | null+ rootInstructionId: string | null+ settings: Json | null+ status:+ | Database["public"]["Enums"]["assemblyInstructionStatus"]+ | null+ tags: string[] | null+ updatedAt: string | null+ updatedBy: string | null+ version: number | null+ versions: Json | null+ }+ Relationships: [+ {+ foreignKeyName: "assemblyInstruction_assemblyPlanJobId_fkey"+ columns: ["assemblyPlanJobId"]+ isOneToOne: false+ referencedRelation: "assemblyPlanJob"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_companyId_fkey"+ columns: ["companyId"]+ isOneToOne: false+ referencedRelation: "companies"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_companyId_fkey"+ columns: ["companyId"]+ isOneToOne: false+ referencedRelation: "company"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_companyId_fkey"+ columns: ["companyId"]+ isOneToOne: false+ referencedRelation: "customFieldTables"+ referencedColumns: ["companyId"]+ },+ {+ foreignKeyName: "assemblyInstruction_companyId_fkey"+ columns: ["companyId"]+ isOneToOne: false+ referencedRelation: "integrations"+ referencedColumns: ["companyId"]+ },+ {+ foreignKeyName: "assemblyInstruction_createdBy_fkey"+ columns: ["createdBy"]+ isOneToOne: false+ referencedRelation: "employees"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_createdBy_fkey"+ columns: ["createdBy"]+ isOneToOne: false+ referencedRelation: "employeesAcrossCompanies"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_createdBy_fkey"+ columns: ["createdBy"]+ isOneToOne: false+ referencedRelation: "employeeSummary"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_createdBy_fkey"+ columns: ["createdBy"]+ isOneToOne: false+ referencedRelation: "user"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_createdBy_fkey"+ columns: ["createdBy"]+ isOneToOne: false+ referencedRelation: "userDefaults"+ referencedColumns: ["userId"]+ },+ {+ foreignKeyName: "assemblyInstruction_itemId_fkey"+ columns: ["itemId"]+ isOneToOne: false+ referencedRelation: "consumables"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_itemId_fkey"+ columns: ["itemId"]+ isOneToOne: false+ referencedRelation: "item"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_itemId_fkey"+ columns: ["itemId"]+ isOneToOne: false+ referencedRelation: "materials"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_itemId_fkey"+ columns: ["itemId"]+ isOneToOne: false+ referencedRelation: "parts"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_itemId_fkey"+ columns: ["itemId"]+ isOneToOne: false+ referencedRelation: "services"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_itemId_fkey"+ columns: ["itemId"]+ isOneToOne: false+ referencedRelation: "tools"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_modelUploadId_fkey"+ columns: ["modelUploadId"]+ isOneToOne: false+ referencedRelation: "jobs"+ referencedColumns: ["modelId"]+ },+ {+ foreignKeyName: "assemblyInstruction_modelUploadId_fkey"+ columns: ["modelUploadId"]+ isOneToOne: false+ referencedRelation: "modelUpload"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_modelUploadId_fkey"+ columns: ["modelUploadId"]+ isOneToOne: false+ referencedRelation: "salesRfqLines"+ referencedColumns: ["modelId"]+ },+ {+ foreignKeyName: "assemblyInstruction_rootInstructionId_fkey"+ columns: ["rootInstructionId"]+ isOneToOne: false+ referencedRelation: "assemblyInstruction"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_rootInstructionId_fkey"+ columns: ["rootInstructionId"]+ isOneToOne: false+ referencedRelation: "assemblyInstructions"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "employees"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "employeesAcrossCompanies"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "employeeSummary"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "user"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "assemblyInstruction_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "userDefaults"+ referencedColumns: ["userId"]+ },+ ]+ }changeOrders: {Row: {affectedItems: Json | null@@ -61842,6 +62095,13 @@ export type Database = {referencedRelation: "assemblyInstruction"referencedColumns: ["id"]},+ {+ foreignKeyName: "jobOperation_assemblyInstructionId_fkey"+ columns: ["assemblyInstructionId"]+ isOneToOne: false+ referencedRelation: "assemblyInstructions"+ referencedColumns: ["id"]+ },{foreignKeyName: "jobOperation_assignee_fkey"columns: ["assignee"]@@ -62142,6 +62402,13 @@ export type Database = {referencedRelation: "assemblyInstruction"referencedColumns: ["id"]},+ {+ foreignKeyName: "jobOperation_assemblyInstructionId_fkey"+ columns: ["assemblyInstructionId"]+ isOneToOne: false+ referencedRelation: "assemblyInstructions"+ referencedColumns: ["id"]+ },{foreignKeyName: "jobOperation_assignee_fkey"columns: ["assignee"]@@ -69544,14 +69811,14 @@ export type Database = {},{foreignKeyName: "address_countryCode_fkey"- columns: ["customerCountryCode"]+ columns: ["invoiceCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]},{foreignKeyName: "address_countryCode_fkey"- columns: ["invoiceCountryCode"]+ columns: ["customerCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]diff --git a/packages/database/supabase/migrations/20260730142617_assembly-instruction-versions.sql b/packages/database/supabase/migrations/20260730142617_assembly-instruction-versions.sqlnew file mode 100644index 0000000000..7f2de7a1e0--- /dev/null+++ b/packages/database/supabase/migrations/20260730142617_assembly-instruction-versions.sql@@ -0,0 +1,24 @@+-- Assembly instruction versioning: group sibling versions under an explicit+-- self-referential root pointer. NULL means "I am the root"; a version's group+-- root is COALESCE("rootInstructionId", "id"), and its siblings are the rows+-- whose id = root OR whose "rootInstructionId" = root. Existing instructions+-- stay NULL (each becomes a single-version group) -- no backfill required.++ALTER TABLE "assemblyInstruction"+ ADD COLUMN IF NOT EXISTS "rootInstructionId" TEXT;++DO $$+BEGIN+ IF NOT EXISTS (+ SELECT 1 FROM pg_constraint+ WHERE conname = 'assemblyInstruction_rootInstructionId_fkey'+ ) THEN+ ALTER TABLE "assemblyInstruction"+ ADD CONSTRAINT "assemblyInstruction_rootInstructionId_fkey"+ FOREIGN KEY ("rootInstructionId")+ REFERENCES "assemblyInstruction"("id") ON DELETE SET NULL;+ END IF;+END $$;++CREATE INDEX IF NOT EXISTS "assemblyInstruction_rootInstructionId_idx"+ ON "assemblyInstruction"("rootInstructionId");diff --git a/packages/database/supabase/migrations/20260730153412_assembly-instructions-view.sql b/packages/database/supabase/migrations/20260730153412_assembly-instructions-view.sqlnew file mode 100644index 0000000000..fd410df297--- /dev/null+++ b/packages/database/supabase/migrations/20260730153412_assembly-instructions-view.sql@@ -0,0 +1,49 @@+-- Collapse assembly instruction versions to one row per version group for the+-- list, mirroring the "procedures" view. A group is identified by its root+-- pointer COALESCE("rootInstructionId", "id"); the row surfaced is the highest+-- "version" in the group, and every sibling version is rolled into a "versions"+-- jsonb array ({id, version, status}) the table's hover card renders. Grouping+-- by ai1."id" is safe because it is the table's primary key (every selected+-- ai1 column is functionally dependent on it).++DROP VIEW IF EXISTS "assemblyInstructions";+CREATE OR REPLACE VIEW "assemblyInstructions" WITH(SECURITY_INVOKER=true) AS+ SELECT+ ai1."id",+ ai1."name",+ ai1."modelUploadId",+ ai1."itemId",+ ai1."assemblyPlanJobId",+ ai1."status",+ ai1."version",+ ai1."publishedAt",+ ai1."settings",+ ai1."rootInstructionId",+ ai1."companyId",+ ai1."customFields",+ ai1."tags",+ ai1."createdBy",+ ai1."createdAt",+ ai1."updatedBy",+ ai1."updatedAt",+ jsonb_agg(+ jsonb_build_object(+ 'id', ai2."id",+ 'version', ai2."version",+ 'status', ai2."status"+ )+ ORDER BY ai2."version"+ ) AS "versions"+ FROM "assemblyInstruction" ai1+ JOIN "assemblyInstruction" ai2+ ON COALESCE(ai2."rootInstructionId", ai2."id")+ = COALESCE(ai1."rootInstructionId", ai1."id")+ AND ai2."companyId" = ai1."companyId"+ WHERE ai1."version" = (+ SELECT MAX(ai3."version")+ FROM "assemblyInstruction" ai3+ WHERE COALESCE(ai3."rootInstructionId", ai3."id")+ = COALESCE(ai1."rootInstructionId", ai1."id")+ AND ai3."companyId" = ai1."companyId"+ )+ GROUP BY ai1."id";diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.poindex 3d04ded27a..ce80cfa591 100644--- a/packages/locale/locales/de/erp.po+++ b/packages/locale/locales/de/erp.po@@ -555,7 +555,7 @@ msgid "Accumulation Period:"msgstr "Akkumulationszeitraum:"msgid "Acknowledge & finish"-msgstr ""+msgstr "Bestätigen & beenden"msgid "Acquisition Cost"msgstr "Anschaffungskosten"@@ -5788,7 +5788,7 @@ msgid "Finish To"msgstr "Fertigstellen zu"msgid "Finish with material unpicked?"-msgstr ""+msgstr "Mit nicht gepicktem Material beenden?"msgid "Finished goods"msgstr "Oberflächen"@@ -7074,7 +7074,7 @@ msgid "Keep Open"msgstr "Offen halten"msgid "Keep picking"-msgstr ""+msgstr "Weiter kommissionieren"msgid "Key"msgstr "Schlüssel"@@ -11725,7 +11725,7 @@ msgid "Shop-floor configuration."msgstr "Konfiguration der Produktionshalle."msgid "short"-msgstr ""+msgstr "kurz"msgid "Short"msgstr "Mangel"@@ -13257,7 +13257,7 @@ msgid "These email addresses will be automatically CC'd on all quote emails sentmsgstr "Diese E-Mail-Adressen werden automatisch in CC auf alle Angebots-E-Mails kopiert, die an Kunden versendet werden."msgid "These items still have material to pick. Finishing now marks the list Partial."-msgstr ""+msgstr "Diese Artikel enthalten noch Material zum Kommissionieren. Das Beenden markiert die Liste als Teilweise."msgid "These jobs have operations assigned to this work center:"msgstr "Diese Aufträge haben Operationen, die diesem Arbeitszentrum zugewiesen sind:"diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.poindex 3407ea2626..87ee0a8862 100644--- a/packages/locale/locales/es/erp.po+++ b/packages/locale/locales/es/erp.po@@ -555,7 +555,7 @@ msgid "Accumulation Period:"msgstr "Período de Acumulación:"msgid "Acknowledge & finish"-msgstr ""+msgstr "Confirmar y finalizar"msgid "Acquisition Cost"msgstr "Costo de adquisición"@@ -5788,7 +5788,7 @@ msgid "Finish To"msgstr "Terminar En"msgid "Finish with material unpicked?"-msgstr ""+msgstr "¿Finalizar sin recoger el material?"msgid "Finished goods"msgstr "Acabados"@@ -7074,7 +7074,7 @@ msgid "Keep Open"msgstr "Mantener Abierto"msgid "Keep picking"-msgstr ""+msgstr "Continuar recogiendo"msgid "Key"msgstr "Clave"@@ -11725,7 +11725,7 @@ msgid "Shop-floor configuration."msgstr "Configuración de planta de producción."msgid "short"-msgstr ""+msgstr "corto"msgid "Short"msgstr "Faltante"@@ -13257,7 +13257,7 @@ msgid "These email addresses will be automatically CC'd on all quote emails sentmsgstr "Estas direcciones de correo electrónico se copiarán automáticamente en todos los correos electrónicos de presupuestos enviados a los clientes."msgid "These items still have material to pick. Finishing now marks the list Partial."-msgstr ""+msgstr "Estos elementos aún tienen material para recoger. Finalizar ahora marca la lista como Parcial."msgid "These jobs have operations assigned to this work center:"msgstr "Estos trabajos tienen operaciones asignadas a este centro de trabajo:"diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.poindex 69cb0e7e05..2cd34fbec0 100644--- a/packages/locale/locales/fr/erp.po+++ b/packages/locale/locales/fr/erp.po@@ -555,7 +555,7 @@ msgid "Accumulation Period:"msgstr "Période d'accumulation :"msgid "Acknowledge & finish"-msgstr ""+msgstr "Confirmer et terminer"msgid "Acquisition Cost"msgstr "Coût d'acquisition"@@ -5788,7 +5788,7 @@ msgid "Finish To"msgstr "Terminer vers"msgid "Finish with material unpicked?"-msgstr ""+msgstr "Terminer avec du matériel non prélevé ?"msgid "Finished goods"msgstr "Finitions"@@ -7074,7 +7074,7 @@ msgid "Keep Open"msgstr "Garder ouvert"msgid "Keep picking"-msgstr ""+msgstr "Continuer"msgid "Key"msgstr "Clé"@@ -11725,7 +11725,7 @@ msgid "Shop-floor configuration."msgstr "Configuration de l'atelier."msgid "short"-msgstr ""+msgstr "court"msgid "Short"msgstr "Manquant"@@ -13257,7 +13257,7 @@ msgid "These email addresses will be automatically CC'd on all quote emails sentmsgstr "Ces adresses e-mail seront automatiquement mises en copie sur tous les e-mails de devis envoyés aux clients."msgid "These items still have material to pick. Finishing now marks the list Partial."-msgstr ""+msgstr "Ces articles ont toujours du matériel à prélever. Terminer maintenant marque la liste comme Partielle."msgid "These jobs have operations assigned to this work center:"msgstr "Ces travaux ont des opérations assignées à ce centre de travail :"diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.poindex cdf79c73e8..c11bd748e8 100644--- a/packages/locale/locales/hi/erp.po+++ b/packages/locale/locales/hi/erp.po@@ -555,7 +555,7 @@ msgid "Accumulation Period:"msgstr "संचय अवधि:"msgid "Acknowledge & finish"-msgstr ""+msgstr "स्वीकार करें और समाप्त करें"msgid "Acquisition Cost"msgstr "अधिग्रहण लागत"@@ -5788,7 +5788,7 @@ msgid "Finish To"msgstr "समाप्त करने के लिए"msgid "Finish with material unpicked?"-msgstr ""+msgstr "सामग्री अनचुनी के साथ समाप्त करें?"msgid "Finished goods"msgstr "फिनिशें"@@ -7074,7 +7074,7 @@ msgid "Keep Open"msgstr "खुला रखें"msgid "Keep picking"-msgstr ""+msgstr "चुनते रहें"msgid "Key"msgstr "कुंजी"@@ -11725,7 +11725,7 @@ msgid "Shop-floor configuration."msgstr "शॉप-फ्लोर कॉन्फ़िगरेशन।"msgid "short"-msgstr ""+msgstr "अधूरा"msgid "Short"msgstr "कम"@@ -13257,7 +13257,7 @@ msgid "These email addresses will be automatically CC'd on all quote emails sentmsgstr "ये ईमेल पते सभी ग्राहकों को भेजे गए उद्धरण ईमेल पर स्वचालित रूप से CC किए जाएंगे।"msgid "These items still have material to pick. Finishing now marks the list Partial."-msgstr ""+msgstr "इन आइटमों में अभी भी सामग्री चुनने के लिए है। अभी समाप्त करने से सूची को आंशिक चिह्नित किया जाता है।"msgid "These jobs have operations assigned to this work center:"msgstr "इन कार्यों के पास इस कार्य केंद्र को सौंपे गए संचालन हैं:"diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.poindex 3c4f4579fa..47e37bccf0 100644--- a/packages/locale/locales/it/erp.po+++ b/packages/locale/locales/it/erp.po@@ -555,7 +555,7 @@ msgid "Accumulation Period:"msgstr "Periodo di Accumulo:"msgid "Acknowledge & finish"-msgstr ""+msgstr "Riconosci e completa"msgid "Acquisition Cost"msgstr "Costo di acquisizione"@@ -5788,7 +5788,7 @@ msgid "Finish To"msgstr "Finisci a"msgid "Finish with material unpicked?"-msgstr ""+msgstr "Terminare con materiale non prelevato?"msgid "Finished goods"msgstr "Finiture"@@ -7074,7 +7074,7 @@ msgid "Keep Open"msgstr "Mantieni Aperto"msgid "Keep picking"-msgstr ""+msgstr "Continua il prelievo"msgid "Key"msgstr "Chiave"@@ -11725,7 +11725,7 @@ msgid "Shop-floor configuration."msgstr "Configurazione del reparto di produzione."msgid "short"-msgstr ""+msgstr "breve"msgid "Short"msgstr "Carente"@@ -13257,7 +13257,7 @@ msgid "These email addresses will be automatically CC'd on all quote emails sentmsgstr "Questi indirizzi email verranno automaticamente messi in CC su tutte le email di preventivo inviate ai clienti."msgid "These items still have material to pick. Finishing now marks the list Partial."-msgstr ""+msgstr "Questi articoli hanno ancora materiale da prelevare. Il completamento ora contrassegna l'elenco come Parziale."msgid "These jobs have operations assigned to this work center:"msgstr "Questi lavori hanno operazioni assegnate a questo centro di lavoro:"diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.poindex d5186fe2ef..bdcc726a50 100644--- a/packages/locale/locales/ja/erp.po+++ b/packages/locale/locales/ja/erp.po@@ -555,7 +555,7 @@ msgid "Accumulation Period:"msgstr "蓄積期間:"msgid "Acknowledge & finish"-msgstr ""+msgstr "認めて完了"msgid "Acquisition Cost"msgstr "取得原価"@@ -5788,7 +5788,7 @@ msgid "Finish To"msgstr "完成先"msgid "Finish with material unpicked?"-msgstr ""+msgstr "ピッキングされていない材料のまま完了しますか?"msgid "Finished goods"msgstr "フィニッシュ"@@ -7074,7 +7074,7 @@ msgid "Keep Open"msgstr "開いたままにする"msgid "Keep picking"-msgstr ""+msgstr "ピッキングを続ける"msgid "Key"msgstr "キー"@@ -11725,7 +11725,7 @@ msgid "Shop-floor configuration."msgstr "生産現場の構成。"msgid "short"-msgstr ""+msgstr "短い"msgid "Short"msgstr "不足"@@ -13257,7 +13257,7 @@ msgid "These email addresses will be automatically CC'd on all quote emails sentmsgstr "これらのメールアドレスは、顧客に送信されるすべての見積メールに自動的にCC送信されます。"msgid "These items still have material to pick. Finishing now marks the list Partial."-msgstr ""+msgstr "これらのアイテムはまだピッキングすべき材料があります。今完了するとリストが部分的になります。"msgid "These jobs have operations assigned to this work center:"msgstr "これらのジョブにはこのワークセンターに割り当てられた操作があります:"diff --git a/packages/locale/locales/ko/erp.po b/packages/locale/locales/ko/erp.poindex 34e2523058..e628087b83 100644--- a/packages/locale/locales/ko/erp.po+++ b/packages/locale/locales/ko/erp.po@@ -555,7 +555,7 @@ msgid "Accumulation Period:"msgstr "누적 기간:"msgid "Acknowledge & finish"-msgstr ""+msgstr "확인 및 완료"msgid "Acquisition Cost"msgstr "취득원가"@@ -5788,7 +5788,7 @@ msgid "Finish To"msgstr "종료 시점"msgid "Finish with material unpicked?"-msgstr ""+msgstr "자재가 선택되지 않은 상태로 완료하시겠습니까?"msgid "Finished goods"msgstr "완제품"@@ -7074,7 +7074,7 @@ msgid "Keep Open"msgstr "열린 상태 유지"msgid "Keep picking"-msgstr ""+msgstr "계속 선택"msgid "Key"msgstr "키"@@ -11725,7 +11725,7 @@ msgid "Shop-floor configuration."msgstr "현장 설정."msgid "short"-msgstr ""+msgstr "부족"msgid "Short"msgstr "짧게"@@ -13257,7 +13257,7 @@ msgid "These email addresses will be automatically CC'd on all quote emails sentmsgstr "이 이메일 주소는 고객에게 발송되는 모든 견적 이메일에 자동으로 참조(CC)됩니다."msgid "These items still have material to pick. Finishing now marks the list Partial."-msgstr ""+msgstr "이 항목들은 여전히 선택할 자재가 있습니다. 지금 완료하면 목록이 부분으로 표시됩니다."msgid "These jobs have operations assigned to this work center:"msgstr "다음 작업에 이 작업장이 지정된 공정작업이 있습니다:"diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.poindex d0e708221a..f4e412fe9d 100644--- a/packages/locale/locales/pl/erp.po+++ b/packages/locale/locales/pl/erp.po@@ -555,7 +555,7 @@ msgid "Accumulation Period:"msgstr "Okres akumulacji:"msgid "Acknowledge & finish"-msgstr ""+msgstr "Potwierdź i zakończ"msgid "Acquisition Cost"msgstr "Koszt nabycia"@@ -5788,7 +5788,7 @@ msgid "Finish To"msgstr "Zakończyć do"msgid "Finish with material unpicked?"-msgstr ""+msgstr "Zakończyć bez rozliczenia materiału?"msgid "Finished goods"msgstr "Wykończenia"@@ -7074,7 +7074,7 @@ msgid "Keep Open"msgstr "Utrzymaj otwarte"msgid "Keep picking"-msgstr ""+msgstr "Kontynuuj pobieranie"msgid "Key"msgstr "Klucz"@@ -11725,7 +11725,7 @@ msgid "Shop-floor configuration."msgstr "Konfiguracja hali produkcyjnej."msgid "short"-msgstr ""+msgstr "krótko"msgid "Short"msgstr "Brakuje"@@ -13257,7 +13257,7 @@ msgid "These email addresses will be automatically CC'd on all quote emails sentmsgstr "Te adresy e-mail będą automatycznie dodawane w polu DW do wszystkich wiadomości e-mail z ofertami wysyłanych do klientów."msgid "These items still have material to pick. Finishing now marks the list Partial."-msgstr ""+msgstr "Te elementy mają jeszcze materiał do pobrania. Zakończenie teraz oznaczy listę jako Częściowa."msgid "These jobs have operations assigned to this work center:"msgstr "Te zadania mają operacje przypisane do tego centrum pracy:"diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.poindex 35f388e734..275d6df596 100644--- a/packages/locale/locales/pt/erp.po+++ b/packages/locale/locales/pt/erp.po@@ -555,7 +555,7 @@ msgid "Accumulation Period:"msgstr "Período de Acumulação:"msgid "Acknowledge & finish"-msgstr ""+msgstr "Reconhecer e finalizar"msgid "Acquisition Cost"msgstr "Custo de aquisição"@@ -5788,7 +5788,7 @@ msgid "Finish To"msgstr "Terminar Em"msgid "Finish with material unpicked?"-msgstr ""+msgstr "Finalizar com material não coletado?"msgid "Finished goods"msgstr "Acabamentos"@@ -7074,7 +7074,7 @@ msgid "Keep Open"msgstr "Manter Aberto"msgid "Keep picking"-msgstr ""+msgstr "Continuar coletando"msgid "Key"msgstr "Chave"@@ -11725,7 +11725,7 @@ msgid "Shop-floor configuration."msgstr "Configuração do chão de fábrica."msgid "short"-msgstr ""+msgstr "curto"msgid "Short"msgstr "Falta"@@ -13257,7 +13257,7 @@ msgid "These email addresses will be automatically CC'd on all quote emails sentmsgstr "Estes endereços de email serão automaticamente copiados em todos os emails de cotação enviados aos clientes."msgid "These items still have material to pick. Finishing now marks the list Partial."-msgstr ""+msgstr "Esses itens ainda têm material para coletar. Finalizar agora marca a lista como Parcial."msgid "These jobs have operations assigned to this work center:"msgstr "Estes trabalhos têm operações atribuídas a este centro de trabalho:"diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.poindex 6fcd2fdcb0..bf8b3023f5 100644--- a/packages/locale/locales/ru/erp.po+++ b/packages/locale/locales/ru/erp.po@@ -555,7 +555,7 @@ msgid "Accumulation Period:"msgstr "Период накопления:"msgid "Acknowledge & finish"-msgstr ""+msgstr "Подтвердить и завершить"msgid "Acquisition Cost"msgstr "Первоначальная стоимость"@@ -5788,7 +5788,7 @@ msgid "Finish To"msgstr "Завершить в"msgid "Finish with material unpicked?"-msgstr ""+msgstr "Завершить с непобранным материалом?"msgid "Finished goods"msgstr "Отделки"@@ -7074,7 +7074,7 @@ msgid "Keep Open"msgstr "Оставить открытым"msgid "Keep picking"-msgstr ""+msgstr "Продолжить комплектацию"msgid "Key"msgstr "Ключ"@@ -11725,7 +11725,7 @@ msgid "Shop-floor configuration."msgstr "Конфигурация цеха."msgid "short"-msgstr ""+msgstr "короткий"msgid "Short"msgstr "Недостача"@@ -13257,7 +13257,7 @@ msgid "These email addresses will be automatically CC'd on all quote emails sentmsgstr "Эти адреса электронной почты будут автоматически добавлены в копию на все письма с предложениями, отправляемые клиентам."msgid "These items still have material to pick. Finishing now marks the list Partial."-msgstr ""+msgstr "У этих товаров все еще есть материал для комплектации. Завершение сейчас отметит список как Частичный."msgid "These jobs have operations assigned to this work center:"msgstr "Эти задания имеют операции, назначенные этому рабочему центру:"diff --git a/packages/locale/locales/tr/erp.po b/packages/locale/locales/tr/erp.poindex 8457a107e3..cb1e1adf87 100644--- a/packages/locale/locales/tr/erp.po+++ b/packages/locale/locales/tr/erp.po@@ -555,7 +555,7 @@ msgid "Accumulation Period:"msgstr "Biriktirme Dönemi:"msgid "Acknowledge & finish"-msgstr ""+msgstr "Onayla ve Bitir"msgid "Acquisition Cost"msgstr "Satın alma maliyeti"@@ -5788,7 +5788,7 @@ msgid "Finish To"msgstr "Bitirmek İçin"msgid "Finish with material unpicked?"-msgstr ""+msgstr "Seçilmemiş malzeme ile Bitir?"msgid "Finished goods"msgstr "Tamamlamalar"@@ -7074,7 +7074,7 @@ msgid "Keep Open"msgstr "Açık Tut"msgid "Keep picking"-msgstr ""+msgstr "Seçmeye Devam Et"msgid "Key"msgstr "Anahtar"@@ -11725,7 +11725,7 @@ msgid "Shop-floor configuration."msgstr "Üretim katı yapılandırması."msgid "short"-msgstr ""+msgstr "Kısa"msgid "Short"msgstr "Azalt"@@ -13257,7 +13257,7 @@ msgid "These email addresses will be automatically CC'd on all quote emails sentmsgstr "Bu e-posta adresleri, müşterilere gönderilen tüm teklif e-postalarına otomatik olarak CC'lenecektir."msgid "These items still have material to pick. Finishing now marks the list Partial."-msgstr ""+msgstr "Bu maddeler için hala seçilecek malzeme var. Şimdi bitirmek listeyi Kısmi olarak işaretler."msgid "These jobs have operations assigned to this work center:"msgstr "Bu işler bu iş merkezine atanmış işlemlere sahiptir:"diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.poindex fdfbca7850..759fbfd2ee 100644--- a/packages/locale/locales/zh/erp.po+++ b/packages/locale/locales/zh/erp.po@@ -555,7 +555,7 @@ msgid "Accumulation Period:"msgstr "累积期间:"msgid "Acknowledge & finish"-msgstr ""+msgstr "确认并完成"msgid "Acquisition Cost"msgstr "收购成本"@@ -5788,7 +5788,7 @@ msgid "Finish To"msgstr "完成至"msgid "Finish with material unpicked?"-msgstr ""+msgstr "完成但物料未领取?"msgid "Finished goods"msgstr "表面处理"@@ -7074,7 +7074,7 @@ msgid "Keep Open"msgstr "保持开放"msgid "Keep picking"-msgstr ""+msgstr "继续领取"msgid "Key"msgstr "钥匙"@@ -11725,7 +11725,7 @@ msgid "Shop-floor configuration."msgstr "车间配置。"msgid "short"-msgstr ""+msgstr "短缺"msgid "Short"msgstr "缺货"@@ -13257,7 +13257,7 @@ msgid "These email addresses will be automatically CC'd on all quote emails sentmsgstr "这些电子邮件地址将自动抄送到发送给客户的所有报价电子邮件中。"msgid "These items still have material to pick. Finishing now marks the list Partial."-msgstr ""+msgstr "这些物料仍需领取。现在完成将标记列表为部分。"msgid "These jobs have operations assigned to this work center:"msgstr "这些工作有分配给此工作中心的操作:"diff --git a/packages/onboarding/src/ui/GanttChart.tsx b/packages/onboarding/src/ui/GanttChart.tsxindex 44ab5d07cf..41d46d457b 100644--- a/packages/onboarding/src/ui/GanttChart.tsx+++ b/packages/onboarding/src/ui/GanttChart.tsx@@ -20,7 +20,7 @@ export function GanttChart({ steps }: { steps: StepDef[] }) {if (timeline.bars.length === 0) return null;return (- <div className="rounded-2xl border border-border bg-card p-5 sm:p-6 overflow-x-auto">+ <div className="rounded-xl border border-border bg-card p-5 sm:p-6 overflow-x-auto"><div className="min-w-[620px]">{!timeline.hasDates ? (<div className="flex items-center justify-end mb-3">diff --git a/packages/onboarding/src/ui/GuidedUpsellCard.tsx b/packages/onboarding/src/ui/GuidedUpsellCard.tsxindex f2e86e7049..438f3d94a9 100644--- a/packages/onboarding/src/ui/GuidedUpsellCard.tsx+++ b/packages/onboarding/src/ui/GuidedUpsellCard.tsx@@ -13,8 +13,8 @@ export function GuidedUpsellCard({}) {const { i18n } = useLingui();return (- <section className="rounded-2xl border border-border bg-card p-6 flex items-start gap-4">- <div className="shrink-0 size-11 rounded-2xl bg-primary/15 flex items-center justify-center text-primary">+ <section className="rounded-lg border border-border bg-card p-6 flex items-start gap-4">+ <div className="shrink-0 size-11 rounded-lg bg-primary/15 flex items-center justify-center text-primary"><LuSparkles className="text-xl" /></div><div className="flex-1 min-w-0">diff --git a/packages/onboarding/src/ui/HowWeWorkView.tsx b/packages/onboarding/src/ui/HowWeWorkView.tsxindex a506a2fe15..f251665667 100644--- a/packages/onboarding/src/ui/HowWeWorkView.tsx+++ b/packages/onboarding/src/ui/HowWeWorkView.tsx@@ -21,7 +21,7 @@ export function HowWeWorkView() {</p></header>- <section className="rounded-2xl border bg-card shadow-button-base overflow-hidden">+ <section className="rounded-lg border bg-card shadow-button-base overflow-hidden"><div className="px-5 py-3 border-b"><span className="text-sm font-semibold"><Trans>Meeting cadence</Trans>@@ -44,7 +44,7 @@ export function HowWeWorkView() {</ul></section>- <section className="rounded-2xl border bg-card shadow-button-base p-5">+ <section className="rounded-lg border bg-card shadow-button-base p-5"><h2 className="text-sm font-semibold mb-4"><Trans>If something is off track</Trans></h2>@@ -65,7 +65,7 @@ export function HowWeWorkView() {</ol></section>- <div className="rounded-2xl border-l-2 border-l-primary bg-muted/30 px-5 py-4">+ <div className="rounded-lg border-l-2 border-l-primary bg-muted/30 px-5 py-4"><p className="text-sm text-muted-foreground"><span className="font-medium text-foreground"><Trans>The principle:</Trans>diff --git a/packages/onboarding/src/ui/OnboardingHub.tsx b/packages/onboarding/src/ui/OnboardingHub.tsxindex d3ad1363bd..3827d5642b 100644--- a/packages/onboarding/src/ui/OnboardingHub.tsx+++ b/packages/onboarding/src/ui/OnboardingHub.tsx@@ -94,7 +94,7 @@ export function OnboardingHub({return (<div className="w-full max-w-3xl mx-auto flex flex-col gap-6"><header className="flex flex-col items-center text-center gap-3 pt-2">- <div className="size-14 rounded-2xl bg-primary/10 border border-primary/20 flex items-center justify-center mb-1">+ <div className="size-14 rounded-lg bg-primary/10 border border-primary/20 flex items-center justify-center mb-1"><imgsrc="/carbon-mark-light.svg"alt="Carbon"@@ -131,8 +131,8 @@ export function OnboardingHub({) : null}{done === total ? (- <div className="rounded-2xl border border-emerald-500/30 bg-emerald-500/5 p-6 flex items-center gap-4 motion-safe:animate-in motion-safe:fade-in-50 motion-safe:zoom-in-95 motion-safe:duration-500">- <div className="shrink-0 size-12 rounded-2xl bg-emerald-500/15 flex items-center justify-center">+ <div className="rounded-lg border border-emerald-500/30 bg-emerald-500/5 p-6 flex items-center gap-4 motion-safe:animate-in motion-safe:fade-in-50 motion-safe:zoom-in-95 motion-safe:duration-500">+ <div className="shrink-0 size-12 rounded-lg bg-emerald-500/15 flex items-center justify-center"><LuPartyPopper className="text-2xl text-emerald-600 dark:text-emerald-400" /></div><div className="flex-1 min-w-0">@@ -154,7 +154,7 @@ export function OnboardingHub({</div>) : null}- <div className="rounded-2xl border bg-card overflow-hidden">+ <div className="rounded-lg border bg-card overflow-hidden"><div className="flex items-end justify-between gap-4 flex-wrap p-6 pb-4 border-b"><div className="text-base font-medium tracking-tight"><Trans>@@ -244,8 +244,8 @@ function NextStepCard({: undefined;return (- <div className="rounded-2xl border border-border bg-card p-5 flex items-start gap-4 motion-safe:animate-in motion-safe:fade-in-50 motion-safe:slide-in-from-bottom-2 motion-safe:duration-300">- <div className="shrink-0 size-9 rounded-xl bg-primary/15 flex items-center justify-center text-sm font-medium tabular-nums text-primary">+ <div className="rounded-lg border border-border bg-card p-5 flex items-start gap-4 motion-safe:animate-in motion-safe:fade-in-50 motion-safe:slide-in-from-bottom-2 motion-safe:duration-300">+ <div className="shrink-0 size-9 rounded-xl bg-primary/15 flex items-center justify-center text-sm font-medium tabular-nums">{action.gateNumber}</div><div className="flex-1 min-w-0">@@ -347,7 +347,7 @@ function GateRow({<div className="flex items-center gap-2 flex-wrap"><spanclassName={cn(- "text-sm font-medium transition-colors group-hover:text-primary",+ "text-sm font-medium transition-colors group-hover",status === "done" && "line-through text-muted-foreground")}>@@ -365,7 +365,7 @@ function GateRow({) : null}<LuArrowRightclassName={cn(- "size-4 shrink-0 text-muted-foreground/50 transition group-hover:translate-x-0.5 group-hover:text-primary",+ "size-4 shrink-0 text-muted-foreground/50 transition group-hover:translate-x-0.5 group-hover",tier === "self_serve" && "ml-auto")}/>@@ -375,7 +375,7 @@ function GateRow({{i18n._(step.desc)}</p>) : null}- <span className="text-xxs font-medium text-muted-foreground/80 mt-2 inline-block transition-colors group-hover:text-primary">+ <span className="text-xxs font-medium text-muted-foreground/80 mt-2 inline-block transition-colors group-hover"><Trans>View in project plan</Trans></span></button>diff --git a/packages/onboarding/src/ui/OnboardingHubSummary.tsx b/packages/onboarding/src/ui/OnboardingHubSummary.tsxindex 6285c03090..244ca885c7 100644--- a/packages/onboarding/src/ui/OnboardingHubSummary.tsx+++ b/packages/onboarding/src/ui/OnboardingHubSummary.tsx@@ -28,7 +28,7 @@ export function OnboardingHubSummary({const { t } = useLingui();const pct = total > 0 ? Math.round((done / total) * 100) : 0;return (- <div className="relative rounded-2xl border bg-gradient-to-bl from-card from-50% to-background shadow-button-base p-6 pr-12 flex items-center gap-5 mb-6">+ <div className="relative rounded-lg border bg-gradient-to-bl from-card from-50% to-background shadow-button-base p-6 pr-12 flex items-center gap-5 mb-6"><div className="shrink-0 size-12 rounded-xl border flex items-center justify-center"><imgsrc="/carbon-mark-light.svg"diff --git a/packages/onboarding/src/ui/PlanView.tsx b/packages/onboarding/src/ui/PlanView.tsxindex ba7d456099..9a7ce53d3d 100644--- a/packages/onboarding/src/ui/PlanView.tsx+++ b/packages/onboarding/src/ui/PlanView.tsx@@ -188,13 +188,13 @@ function PhaseCard({return (<divid={planAnchorId(step.key)}- className="rounded-2xl border bg-card shadow-button-base overflow-hidden scroll-mt-6"+ className="rounded-lg border bg-card shadow-button-base overflow-hidden scroll-mt-6"><div className="p-5 pb-4"><div className="flex items-start gap-4"><spanclassName={cn(- "shrink-0 size-9 rounded-xl border flex items-center justify-center text-sm font-semibold tabular-nums",+ "shrink-0 size-9 rounded-lg border flex items-center justify-center text-sm font-semibold tabular-nums",gatePassed? "bg-emerald-500/10 border-emerald-500/30 text-emerald-600 dark:text-emerald-400": gateInProgressdiff --git a/packages/onboarding/src/ui/RolesView.tsx b/packages/onboarding/src/ui/RolesView.tsxindex 8907e07a63..3c6e81dfb6 100644--- a/packages/onboarding/src/ui/RolesView.tsx+++ b/packages/onboarding/src/ui/RolesView.tsx@@ -37,7 +37,7 @@ export function RolesView() {</div></header>- <section className="rounded-2xl border border-emerald-500/30 bg-emerald-500/5 shadow-button-base p-5">+ <section className="rounded-lg border border-emerald-500/30 bg-emerald-500/5 shadow-button-base p-5"><h2 className="text-sm font-semibold mb-3 flex items-center gap-2"><span className="size-2 rounded-full bg-emerald-500" /><Trans>What you need to do</Trans>@@ -65,7 +65,7 @@ export function RolesView() {{ROLES.map((step) => (<divkey={step.stepKey}- className="rounded-2xl border bg-card shadow-button-base overflow-hidden"+ className="rounded-lg border bg-card shadow-button-base overflow-hidden"><div className="px-5 py-3 border-b"><span className="text-sm font-semibold">diff --git a/packages/onboarding/src/ui/ScopeView.tsx b/packages/onboarding/src/ui/ScopeView.tsxindex 1ba6771557..e379a493e3 100644--- a/packages/onboarding/src/ui/ScopeView.tsx+++ b/packages/onboarding/src/ui/ScopeView.tsx@@ -115,7 +115,7 @@ export function ScopeView() {<sectionclassName={cn(- "rounded-2xl border p-5 shadow-button-base",+ "rounded-lg border p-5 shadow-button-base",agreed? "border-emerald-500/30 bg-emerald-500/5": "border-primary/30 bg-primary/5"diff --git a/packages/onboarding/src/ui/SetupControls.tsx b/packages/onboarding/src/ui/SetupControls.tsxindex bc353aa20c..afdcaeefb2 100644--- a/packages/onboarding/src/ui/SetupControls.tsx+++ b/packages/onboarding/src/ui/SetupControls.tsx@@ -250,7 +250,7 @@ function Card({children: React.ReactNode;}) {return (- <section className="rounded-2xl border bg-card shadow-button-base p-5">+ <section className="rounded-lg border bg-card shadow-button-base p-5"><h2 className="text-sm font-semibold">{title}</h2>{subtitle ? (<p className="text-xs text-muted-foreground mt-1 mb-4 max-w-xl">diff --git a/packages/onboarding/src/ui/TeamView.tsx b/packages/onboarding/src/ui/TeamView.tsxindex 60e3d3ec57..e8af3ef64b 100644--- a/packages/onboarding/src/ui/TeamView.tsx+++ b/packages/onboarding/src/ui/TeamView.tsx@@ -16,7 +16,7 @@ export function TeamView() {lead={i18n._(PAGE_COPY.team.lead)}/>- <div className="rounded-2xl border border-primary/20 bg-primary/5 p-5">+ <div className="rounded-lg border border-primary/20 bg-primary/5 p-5"><div className="text-xs font-medium uppercase tracking-wide text-primary mb-1"><Trans>Your main point of contact</Trans></div>@@ -33,7 +33,7 @@ export function TeamView() {{TEAM_ROLES.map((member, i) => (<divkey={i}- className="rounded-2xl border bg-card shadow-button-base p-5 flex items-start gap-4"+ className="rounded-lg border bg-card shadow-button-base p-5 flex items-start gap-4"><span className="shrink-0 size-10 rounded-full border bg-background flex items-center justify-center"><LuUser className="text-muted-foreground" />diff --git a/packages/onboarding/src/ui/ValueView.tsx b/packages/onboarding/src/ui/ValueView.tsxindex 133cfcbd86..08999e5dc2 100644--- a/packages/onboarding/src/ui/ValueView.tsx+++ b/packages/onboarding/src/ui/ValueView.tsx@@ -37,7 +37,7 @@ export function ValueView() {{VALUE_METRICS.map((metric) => (<divkey={metric.key}- className="rounded-2xl border bg-card shadow-button-base p-5 flex flex-col gap-1"+ className="rounded-lg border bg-card shadow-button-base p-5 flex flex-col gap-1"><EditableFieldfieldKey={`${metric.key}.value`}diff --git a/packages/onboarding/src/ui/primitives/Section.tsx b/packages/onboarding/src/ui/primitives/Section.tsxindex 3a15493106..e394e39979 100644--- a/packages/onboarding/src/ui/primitives/Section.tsx+++ b/packages/onboarding/src/ui/primitives/Section.tsx@@ -1,5 +1,5 @@// Card-shell + list primitives. The hub's surfaces are all "titled card wrapping-// a divided list"; this replaces ~15 copy-pasted `rounded-2xl border bg-card …`+// a divided list"; this replaces ~15 copy-pasted `rounded-lg border bg-card …`// blocks. Compose: <Section title aside><SectionList>{rows}</SectionList></Section>.import { cn } from "@carbon/react";@@ -27,7 +27,7 @@ export function Section({<sectionid={id}className={cn(- "rounded-2xl border bg-card shadow-button-base overflow-hidden",+ "rounded-lg border bg-card shadow-button-base overflow-hidden",className)}>@@ -82,7 +82,7 @@ export function Panel({return (<sectionclassName={cn(- "rounded-2xl border bg-card shadow-button-base p-5",+ "rounded-lg border bg-card shadow-button-base p-5",className)}>diff --git a/packages/react/AGENTS.md b/packages/react/AGENTS.mdindex 0d6efaf385..ca959917da 100644--- a/packages/react/AGENTS.md+++ b/packages/react/AGENTS.md@@ -7,7 +7,7 @@ Shared UI component library — primitives, layout, data display, and overlays b- **Use existing components first.** Grep `packages/react/src/` before writing custom UI. Prefer built-in `variant` props over ad-hoc `bg-*`/`text-*` classes.- **Use `cn()` for class merging** (`import { cn } from "@carbon/react"` — it's `twMerge(clsx(...))`). Never raw string concatenation for conditional classes.- **Components live flat in `src/`** (e.g. `src/Button.tsx`), not under a `components/` subdirectory. Follow this convention for new components.-- **Concentric border radius**: outer radius = inner radius + padding. Card shell is `rounded-2xl`; don't re-add borders/radius on CardContent.+- **Concentric border radius**: outer radius = inner radius + padding. Card shell is `rounded-lg`; don't re-add borders/radius on CardContent.- **Popover inside Drawer/Dialog**: `stopPropagation` on `onWheel`/`onTouchMove` of `PopoverContent` to prevent scroll-lock from swallowing events.## Ask Firstdiff --git a/packages/react/src/Card.tsx b/packages/react/src/Card.tsxindex 7b96f5e314..b9bc53d13a 100644--- a/packages/react/src/Card.tsx+++ b/packages/react/src/Card.tsx@@ -46,7 +46,7 @@ const Card = forwardRef<HTMLDivElement, CardProps>(<divref={ref}className={cn(- "relative flex flex-col rounded-2xl shadow-button-base dark:shadow-[inset_0_0.5px_0_rgb(255_255_255_/_0.08),_inset_0_0_1px_rgb(255_255_255_/_0.24),_0_0_0_0.5px_rgb(0,0,0,1),0px_0px_4px_rgba(0,_0,_0,_0.08)] bg-accent dark:bg-card text-card-foreground p-0 w-full",+ "relative flex flex-col rounded-lg shadow-button-base dark:shadow-[inset_0_0.5px_0_rgb(255_255_255_/_0.08),_inset_0_0_1px_rgb(255_255_255_/_0.24),_0_0_0_0.5px_rgb(0,0,0,1),0px_0px_4px_rgba(0,_0,_0,_0.08)] bg-accent dark:bg-card text-card-foreground p-0 w-full",className)}{...props}@@ -198,7 +198,7 @@ const CardContent = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(<divref={ref}className={cn(- "flex flex-col flex-1 p-6 rounded-2xl border border-border bg-card dark:bg-muted/40",+ "flex flex-col flex-1 p-6 rounded-lg border border-border bg-card dark:bg-muted/40",className)}{...props}diff --git a/packages/react/src/Drawer.tsx b/packages/react/src/Drawer.tsxindex dd78daa679..9fa5ba0101 100644--- a/packages/react/src/Drawer.tsx+++ b/packages/react/src/Drawer.tsx@@ -73,7 +73,7 @@ const DrawerBody = ({DrawerBody.displayName = "DrawerBody";const sheetVariants = cva(- "flex flex-col z-50 scale-100 bg-accent dark:bg-card opacity-100 shadow-button-base dark:shadow-[inset_0_0.5px_0_rgb(255_255_255_/_0.08),_inset_0_0_1px_rgb(255_255_255_/_0.24),_0_0_0_0.5px_rgb(0,0,0,1),0px_0px_4px_rgba(0,_0,_0,_0.08)] border border-border transition-[background-color,box-shadow,border-color] duration-100 focus-visible:outline-none focus-visible:ring-0 rounded-2xl",+ "flex flex-col z-50 scale-100 bg-accent dark:bg-card opacity-100 shadow-button-base dark:shadow-[inset_0_0.5px_0_rgb(255_255_255_/_0.08),_inset_0_0_1px_rgb(255_255_255_/_0.24),_0_0_0_0.5px_rgb(0,0,0,1),0px_0px_4px_rgba(0,_0,_0,_0.08)] border border-border transition-[background-color,box-shadow,border-color] duration-100 focus-visible:outline-none focus-visible:ring-0 rounded-lg",{variants: {position: {diff --git a/packages/react/src/Tabs.tsx b/packages/react/src/Tabs.tsxindex f45dcccce3..fcb2808df7 100644--- a/packages/react/src/Tabs.tsx+++ b/packages/react/src/Tabs.tsx@@ -18,7 +18,7 @@ const TabsList = forwardRef<// No fixed height and no border — p-1 sizes the box, so the space// around the triggers is uniform on every side (a fixed h-* squeezed// them, and a border-b read as an extra pixel of bottom padding)- "inline-flex items-center justify-center rounded-md bg-muted p-1 text-muted-foreground shadow-[inset_0_1px_2px_rgba(0,0,0,0.15)]",+ "inline-flex items-center justify-center rounded-[0.5rem] bg-muted p-1 text-muted-foreground shadow-[inset_0_1px_2px_rgba(0,0,0,0.15)]",className)}{...props}