Repository: KittyCAD/modeling-app
Pull request #6747: [Feature] Create assembly samples from home page
Author: login: nadr0
Created: 2025-05-07T19:50:28Z | Merged: 2025-05-08T19:41:30Z

# Issue

Users were unable to create a sample for assembly KCL samples. We did not support bulk create kcl files

# Implementation

- Updated `manifest.json` to output all of the project files within kcl samples
  - This is required because we cannot `ls` the electron file server for all the files. We can fetch all of them through the local web server. We need to list them all out since it isn't baked into the binary at the OS level as a file path to copy? 
- Updated the create sample workflow to look up the KCL sample for assembly or single file
- Exports all KCL samples into an array
- Find KCL sample function since we don't have a lookup table
- Fixed `blob.size` of 0 for [thumbnails](https://github.com/KittyCAD/modeling-app/pull/6747/files#diff-98078450a216d540fa31c3db5b1a730d5e46e140c4a413846d446928cac01293R70) if the write fails (aka they close) 
- Create a sample for assembly samples will only allow `new project` due to pathing problems and duplicate name detection
  - If we support importing from sub dirs this can be fixed in the future




Diff:
diff --git a/e2e/playwright/testing-samples-loading.spec.ts b/e2e/playwright/testing-samples-loading.spec.ts
index 8ab73afc969..f9e77a47531 100644
--- a/e2e/playwright/testing-samples-loading.spec.ts
+++ b/e2e/playwright/testing-samples-loading.spec.ts
@@ -52,7 +52,9 @@ test.describe('Testing loading external models', () => {
           name,
         })
       const warningText = page.getByText('Overwrite current file with sample?')
-      const confirmButton = page.getByRole('button', { name: 'Submit command' })
+      const confirmButton = page.getByRole('button', {
+        name: 'Submit command',
+      })
 
       await test.step(`Precondition: check the initial code`, async () => {
         await u.openKclCodePanel()
diff --git a/public/kcl-samples/manifest.json b/public/kcl-samples/manifest.json
index bd64272f920..c349e9664d4 100644
--- a/public/kcl-samples/manifest.json
+++ b/public/kcl-samples/manifest.json
@@ -4,293 +4,450 @@
     "pathFromProjectDirectoryToFirstFile": "80-20-rail/main.kcl",
     "multipleFiles": false,
     "title": "80/20 Rail",
-    "description": "An 80/20 extruded aluminum linear rail. T-slot profile adjustable by profile height, rail length, and origin position"
+    "description": "An 80/20 extruded aluminum linear rail. T-slot profile adjustable by profile height, rail length, and origin position",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "axial-fan/main.kcl",
     "multipleFiles": true,
     "title": "PC Fan",
-    "description": "A small axial fan, used to push or draw airflow over components to remove excess heat"
+    "description": "A small axial fan, used to push or draw airflow over components to remove excess heat",
+    "files": [
+      "fan-housing.kcl",
+      "fan.kcl",
+      "main.kcl",
+      "motor.kcl",
+      "parameters.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "ball-bearing/main.kcl",
     "multipleFiles": false,
     "title": "Ball Bearing",
-    "description": "A ball bearing is a type of rolling-element bearing that uses balls to maintain the separation between the bearing races. The primary purpose of a ball bearing is to reduce rotational friction and support radial and axial loads."
+    "description": "A ball bearing is a type of rolling-element bearing that uses balls to maintain the separation between the bearing races. The primary purpose of a ball bearing is to reduce rotational friction and support radial and axial loads.",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "bench/main.kcl",
     "multipleFiles": true,
     "title": "Bench",
-    "description": "This is a slight remix of Depep1's original 3D Boaty (https://www.printables.com/model/1141963-3d-boaty). This is a tool used for benchmarking 3D FDM printers for bed adhesion, overhangs, bridging and top surface quality. The name of this file is a bit of misnomer, the shape of the object is a typical park bench."
+    "description": "This is a slight remix of Depep1's original 3D Boaty (https://www.printables.com/model/1141963-3d-boaty). This is a tool used for benchmarking 3D FDM printers for bed adhesion, overhangs, bridging and top surface quality. The name of this file is a bit of misnomer, the shape of the object is a typical park bench.",
+    "files": [
+      "bench-parts.kcl",
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "bottle/main.kcl",
     "multipleFiles": false,
     "title": "Bottle",
-    "description": "A simple bottle with a hollow, watertight interior"
+    "description": "A simple bottle with a hollow, watertight interior",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "bracket/main.kcl",
     "multipleFiles": false,
     "title": "Shelf Bracket",
-    "description": "This is a bracket that holds a shelf. It is made of aluminum and is designed to hold a force of 300 lbs. The bracket is 6 inches wide and the force is applied at the end of the shelf, 12 inches from the wall. The bracket has a factor of safety of 1.2. The legs of the bracket are 5 inches and 2 inches long. The thickness of the bracket is calculated from the constraints provided."
+    "description": "This is a bracket that holds a shelf. It is made of aluminum and is designed to hold a force of 300 lbs. The bracket is 6 inches wide and the force is applied at the end of the shelf, 12 inches from the wall. The bracket has a factor of safety of 1.2. The legs of the bracket are 5 inches and 2 inches long. The thickness of the bracket is calculated from the constraints provided.",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "car-wheel-assembly/main.kcl",
     "multipleFiles": true,
     "title": "Car Wheel Assembly",
-    "description": "A car wheel assembly with a rotor, tire, and lug nuts."
+    "description": "A car wheel assembly with a rotor, tire, and lug nuts.",
+    "files": [
+      "brake-caliper.kcl",
+      "car-rotor.kcl",
+      "car-tire.kcl",
+      "car-wheel.kcl",
+      "lug-nut.kcl",
+      "main.kcl",
+      "parameters.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "color-cube/main.kcl",
     "multipleFiles": false,
     "title": "Color Cube",
-    "description": "This is a color cube centered about the origin. It is used to help determine orientation in the scene."
+    "description": "This is a color cube centered about the origin. It is used to help determine orientation in the scene.",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "cycloidal-gear/main.kcl",
     "multipleFiles": false,
     "title": "Cycloidal Gear",
-    "description": "A cycloidal gear is a gear with a continuous, curved tooth profile. They are used in watchmaking and high precision robotics actuation"
+    "description": "A cycloidal gear is a gear with a continuous, curved tooth profile. They are used in watchmaking and high precision robotics actuation",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "dodecahedron/main.kcl",
     "multipleFiles": false,
     "title": "Dodecahedron",
-    "description": "A regular dodecahedron or pentagonal dodecahedron is a dodecahedron composed of regular pentagonal faces, three meeting at each vertex. This example shows constructing the a dodecahedron with a series of intersects."
+    "description": "A regular dodecahedron or pentagonal dodecahedron is a dodecahedron composed of regular pentagonal faces, three meeting at each vertex. This example shows constructing the a dodecahedron with a series of intersects.",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "dual-basin-utility-sink/main.kcl",
     "multipleFiles": false,
     "title": "Dual-Basin Utility Sink",
-    "description": "A stainless steel sink unit with dual rectangular basins and six under-counter storage compartments."
+    "description": "A stainless steel sink unit with dual rectangular basins and six under-counter storage compartments.",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "enclosure/main.kcl",
     "multipleFiles": false,
     "title": "Enclosure",
-    "description": "An enclosure body and sealing lid for storing items"
+    "description": "An enclosure body and sealing lid for storing items",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "exhaust-manifold/main.kcl",
     "multipleFiles": false,
     "title": "Exhaust Manifold",
-    "description": "A welded exhaust header for an inline 4-cylinder engine"
+    "description": "A welded exhaust header for an inline 4-cylinder engine",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "flange/main.kcl",
     "multipleFiles": false,
     "title": "Flange",
-    "description": "A flange is a flat rim, collar, or rib, typically forged or cast, that is used to strengthen an object, guide it, or attach it to another object. Flanges are known for their use in various applications, including piping, plumbing, and mechanical engineering, among others."
+    "description": "A flange is a flat rim, collar, or rib, typically forged or cast, that is used to strengthen an object, guide it, or attach it to another object. Flanges are known for their use in various applications, including piping, plumbing, and mechanical engineering, among others.",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "focusrite-scarlett-mounting-bracket/main.kcl",
     "multipleFiles": false,
     "title": "A mounting bracket for the Focusrite Scarlett Solo audio interface",
-    "description": "This is a bracket that holds an audio device underneath a desk or shelf. The audio device has dimensions of 144mm wide, 80mm length and 45mm depth with fillets of 6mm. This mounting bracket is designed to be 3D printed with PLA material"
+    "description": "This is a bracket that holds an audio device underneath a desk or shelf. The audio device has dimensions of 144mm wide, 80mm length and 45mm depth with fillets of 6mm. This mounting bracket is designed to be 3D printed with PLA material",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "food-service-spatula/main.kcl",
     "multipleFiles": false,
     "title": "Food Service Spatula",
-    "description": "Use these spatulas for mixing, flipping, and scraping."
+    "description": "Use these spatulas for mixing, flipping, and scraping.",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "french-press/main.kcl",
     "multipleFiles": false,
     "title": "French Press",
-    "description": "A french press immersion coffee maker"
+    "description": "A french press immersion coffee maker",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "gear/main.kcl",
     "multipleFiles": false,
     "title": "Spur Gear",
-    "description": "A rotating machine part having cut teeth or, in the case of a cogwheel, inserted teeth (called cogs), which mesh with another toothed part to transmit torque. Geared devices can change the speed, torque, and direction of a power source. The two elements that define a gear are its circular shape and the teeth that are integrated into its outer edge, which are designed to fit into the teeth of another gear."
+    "description": "A rotating machine part having cut teeth or, in the case of a cogwheel, inserted teeth (called cogs), which mesh with another toothed part to transmit torque. Geared devices can change the speed, torque, and direction of a power source. The two elements that define a gear are its circular shape and the teeth that are integrated into its outer edge, which are designed to fit into the teeth of another gear.",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "gear-rack/main.kcl",
     "multipleFiles": false,
     "title": "100mm Gear Rack",
-    "description": "A flat bar or rail that is engraved with teeth along its length. These teeth are designed to mesh with the teeth of a gear, known as a pinion. When the pinion, a small cylindrical gear, rotates, its teeth engage with the teeth on the rack, causing the rack to move linearly. Conversely, linear motion applied to the rack will cause the pinion to rotate."
+    "description": "A flat bar or rail that is engraved with teeth along its length. These teeth are designed to mesh with the teeth of a gear, known as a pinion. When the pinion, a small cylindrical gear, rotates, its teeth engage with the teeth on the rack, causing the rack to move linearly. Conversely, linear motion applied to the rack will cause the pinion to rotate.",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "gridfinity-baseplate/main.kcl",
     "multipleFiles": false,
     "title": "Gridfinity Baseplate",
-    "description": "Gridfinity is a system to help you work more efficiently. This is a system invented by Zack Freedman. There are two main components the baseplate and the bins. The components are comprised of a matrix of squares. Allowing easy stacking and expansion"
+    "description": "Gridfinity is a system to help you work more efficiently. This is a system invented by Zack Freedman. There are two main components the baseplate and the bins. The components are comprised of a matrix of squares. Allowing easy stacking and expansion",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "gridfinity-baseplate-magnets/main.kcl",
     "multipleFiles": false,
     "title": "Gridfinity Baseplate With Magnets",
-    "description": "Gridfinity is a system to help you work more efficiently. This is a system invented by Zack Freedman. There are two main components the baseplate and the bins. The components are comprised of a matrix of squares. Allowing easy stacking and expansion. This baseplate version includes holes for magnet placement"
+    "description": "Gridfinity is a system to help you work more efficiently. This is a system invented by Zack Freedman. There are two main components the baseplate and the bins. The components are comprised of a matrix of squares. Allowing easy stacking and expansion. This baseplate version includes holes for magnet placement",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "gridfinity-bins/main.kcl",
     "multipleFiles": false,
     "title": "Gridfinity Bins",
-    "description": "Gridfinity is a system to help you work more efficiently. This is a system invented by Zack Freedman. There are two main components the baseplate and the bins. The components are comprised of a matrix of squares. Allowing easy stacking and expansion"
+    "description": "Gridfinity is a system to help you work more efficiently. This is a system invented by Zack Freedman. There are two main components the baseplate and the bins. The components are comprised of a matrix of squares. Allowing easy stacking and expansion",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "gridfinity-bins-stacking-lip/main.kcl",
     "multipleFiles": false,
     "title": "Gridfinity Bins With A Stacking Lip",
-    "description": "Gridfinity is a system to help you work more efficiently. This is a system invented by Zack Freedman. There are two main components the baseplate and the bins. The components are comprised of a matrix of squares. Allowing easy stacking and expansion. This Gridfinity bins version includes a lip to allowable stacking Gridfinity bins"
+    "description": "Gridfinity is a system to help you work more efficiently. This is a system invented by Zack Freedman. There are two main components the baseplate and the bins. The components are comprised of a matrix of squares. Allowing easy stacking and expansion. This Gridfinity bins version includes a lip to allowable stacking Gridfinity bins",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "hex-nut/main.kcl",
     "multipleFiles": false,
     "title": "Hex Nut",
-    "description": "A hex nut is a type of fastener with a threaded hole and a hexagonal outer shape, used in a wide variety of applications to secure parts together. The hexagonal shape allows for a greater torque to be applied with wrenches or tools, making it one of the most common nut types in hardware."
+    "description": "A hex nut is a type of fastener with a threaded hole and a hexagonal outer shape, used in a wide variety of applications to secure parts together. The hexagonal shape allows for a greater torque to be applied with wrenches or tools, making it one of the most common nut types in hardware.",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "i-beam/main.kcl",
     "multipleFiles": false,
     "title": "I-beam",
-    "description": "A structural metal beam with an I shaped cross section. Often used in construction and architecture"
+    "description": "A structural metal beam with an I shaped cross section. Often used in construction and architecture",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "keyboard/main.kcl",
     "multipleFiles": false,
     "title": "Zoo Keyboard",
-    "description": "A custom keyboard with Zoo brand lettering"
+    "description": "A custom keyboard with Zoo brand lettering",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "kitt/main.kcl",
     "multipleFiles": false,
     "title": "Kitt",
-    "description": "The beloved KittyCAD mascot in a voxelized style."
+    "description": "The beloved KittyCAD mascot in a voxelized style.",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "lego/main.kcl",
     "multipleFiles": false,
     "title": "Lego Brick",
-    "description": "A standard Lego brick. This is a small, plastic construction block toy that can be interlocked with other blocks to build various structures, models, and figures. There are a lot of hacks used in this code."
+    "description": "A standard Lego brick. This is a small, plastic construction block toy that can be interlocked with other blocks to build various structures, models, and figures. There are a lot of hacks used in this code.",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "makeup-mirror/main.kcl",
     "multipleFiles": false,
     "title": "Makeup Mirror",
-    "description": "A circular vanity mirror mounted on a swiveling arm with pivot joints, used for personal grooming."
+    "description": "A circular vanity mirror mounted on a swiveling arm with pivot joints, used for personal grooming.",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "mounting-plate/main.kcl",
     "multipleFiles": false,
     "title": "Mounting Plate",
-    "description": "A flat piece of material, often metal or plastic, that serves as a support or base for attaching, securing, or mounting various types of equipment, devices, or components."
+    "description": "A flat piece of material, often metal or plastic, that serves as a support or base for attaching, securing, or mounting various types of equipment, devices, or components.",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "multi-axis-robot/main.kcl",
     "multipleFiles": true,
     "title": "Robot Arm",
-    "description": "A 4 axis robotic arm for industrial use. These machines can be used for assembly, packaging, organization of goods, and quality inspection processes"
+    "description": "A 4 axis robotic arm for industrial use. These machines can be used for assembly, packaging, organization of goods, and quality inspection processes",
+    "files": [
+      "globals.kcl",
+      "main.kcl",
+      "robot-arm-base.kcl",
+      "robot-arm-j2.kcl",
+      "robot-arm-j3.kcl",
+      "robot-rotating-base.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "parametric-bearing-pillow-block/main.kcl",
     "multipleFiles": false,
     "title": "Parametric Bearing Pillow Block",
-    "description": "A bearing pillow block, also known as a plummer block or pillow block bearing, is a pedestal used to provide support for a rotating shaft with the help of compatible bearings and various accessories. Housing a bearing, the pillow block provides a secure and stable foundation that allows the shaft to rotate smoothly within its machinery setup. These components are essential in a wide range of mechanical systems and machinery, playing a key role in reducing friction and supporting radial and axial loads."
+    "description": "A bearing pillow block, also known as a plummer block or pillow block bearing, is a pedestal used to provide support for a rotating shaft with the help of compatible bearings and various accessories. Housing a bearing, the pillow block provides a secure and stable foundation that allows the shaft to rotate smoothly within its machinery setup. These components are essential in a wide range of mechanical systems and machinery, playing a key role in reducing friction and supporting radial and axial loads.",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "pipe/main.kcl",
     "multipleFiles": false,
     "title": "Pipe",
-    "description": "Piping for the pipe flange assembly"
+    "description": "Piping for the pipe flange assembly",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "pipe-flange-assembly/main.kcl",
     "multipleFiles": true,
     "title": "Pipe and Flange Assembly",
-    "description": "A crucial component in various piping systems, designed to facilitate the connection, disconnection, and access to piping for inspection, cleaning, and modifications. This assembly combines pipes (long cylindrical conduits) with flanges (plate-like fittings) to create a secure yet detachable joint."
+    "description": "A crucial component in various piping systems, designed to facilitate the connection, disconnection, and access to piping for inspection, cleaning, and modifications. This assembly combines pipes (long cylindrical conduits) with flanges (plate-like fittings) to create a secure yet detachable joint.",
+    "files": [
+      "1120t74-pipe.kcl",
+      "68095k348-flange.kcl",
+      "91251a404-bolt.kcl",
+      "9472k188-gasket.kcl",
+      "95479a127-hex-nut.kcl",
+      "98017a257-washer.kcl",
+      "main.kcl",
+      "parameters.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "pipe-with-bend/main.kcl",
     "multipleFiles": false,
     "title": "Pipe with bend",
-    "description": "A tubular section or hollow cylinder, usually but not necessarily of circular cross-section, used mainly to convey substances that can flow."
+    "description": "A tubular section or hollow cylinder, usually but not necessarily of circular cross-section, used mainly to convey substances that can flow.",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "poopy-shoe/main.kcl",
     "multipleFiles": false,
     "title": "Poopy Shoe",
-    "description": "poop shute for bambu labs printer - optimized for printing."
+    "description": "poop shute for bambu labs printer - optimized for printing.",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "router-template-cross-bar/main.kcl",
     "multipleFiles": false,
     "title": "Router template for a cross bar",
-    "description": "A guide for routing a notch into a cross bar."
+    "description": "A guide for routing a notch into a cross bar.",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "router-template-slate/main.kcl",
     "multipleFiles": false,
     "title": "Router Template for a Slate",
-    "description": "A guide for routing a slate for a cross bar."
+    "description": "A guide for routing a slate for a cross bar.",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "sheet-metal-bracket/main.kcl",
     "multipleFiles": false,
     "title": "Sheet Metal Bracket",
-    "description": "A component typically made from flat sheet metal through various manufacturing processes such as bending, punching, cutting, and forming. These brackets are used to support, attach, or mount other hardware components, often providing a structural or functional base for assembly."
+    "description": "A component typically made from flat sheet metal through various manufacturing processes such as bending, punching, cutting, and forming. These brackets are used to support, attach, or mount other hardware components, often providing a structural or functional base for assembly.",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "socket-head-cap-screw/main.kcl",
     "multipleFiles": false,
     "title": "Socket Head Cap Screw",
-    "description": "This is for a #10-24 screw that is 1.00 inches long. A socket head cap screw is a type of fastener that is widely used in a variety of applications requiring a high strength fastening solution. It is characterized by its cylindrical head and internal hexagonal drive, which allows for tightening with an Allen wrench or hex key."
+    "description": "This is for a #10-24 screw that is 1.00 inches long. A socket head cap screw is a type of fastener that is widely used in a variety of applications requiring a high strength fastening solution. It is characterized by its cylindrical head and internal hexagonal drive, which allows for tightening with an Allen wrench or hex key.",
+    "files": [
+      "main.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "walkie-talkie/main.kcl",
     "multipleFiles": true,
     "title": "Walkie Talkie",
-    "description": "A portable, handheld two-way radio device that allows users to communicate wirelessly over short to medium distances. It operates on specific radio frequencies and features a push-to-talk button for transmitting messages, making it ideal for quick and reliable communication in outdoor, work, or emergency settings."
+    "description": "A portable, handheld two-way radio device that allows users to communicate wirelessly over short to medium distances. It operates on specific radio frequencies and features a push-to-talk button for transmitting messages, making it ideal for quick and reliable communication in outdoor, work, or emergency settings.",
+    "files": [
+      "antenna.kcl",
+      "body.kcl",
+      "button.kcl",
+      "case.kcl",
+      "knob.kcl",
+      "main.kcl",
+      "parameters.kcl",
+      "talk-button.kcl",
+      "zoo-logo.kcl"
+    ]
   },
   {
     "file": "main.kcl",
     "pathFromProjectDirectoryToFirstFile": "washer/main.kcl",
     "multipleFiles": false,
     "title": "Washer",
-    "description": "A small, typically disk-shaped component with a hole in the middle, used in a wide range of applications, primarily in conjunction with fasteners like bolts and screws. Washers distribute the load of a fastener across a broader area. This is especially important when the fastening surface is soft or uneven, as it helps to prevent damage to the surface and ensures the load is evenly distributed, reducing the risk of the fastener becoming loose over time."
+    "description": "A small, typically disk-shaped component with a hole in the middle, used in a wide range of applications, primarily in conjunction with fasteners like bolts and screws. Washers distribute the load of a fastener across a broader area. This is especially important when the fastening surface is soft or uneven, as it helps to prevent damage to the surface and ensures the load is evenly distributed, reducing the risk of the fastener becoming loose over time.",
+    "files": [
+      "main.kcl"
+    ]
   }
 ]
\ No newline at end of file
diff --git a/rust/kcl-lib/src/simulation_tests/kcl_samples.rs b/rust/kcl-lib/src/simulation_tests/kcl_samples.rs
index 67e1438ebb9..a975cfbc9d5 100644
--- a/rust/kcl-lib/src/simulation_tests/kcl_samples.rs
+++ b/rust/kcl-lib/src/simulation_tests/kcl_samples.rs
@@ -220,6 +220,7 @@ struct KclMetadata {
     multiple_files: bool,
     title: String,
     description: String,
+    files: Vec<String>,
 }
 
 // Function to read and parse .kcl files
@@ -263,12 +264,16 @@ fn get_kcl_metadata(project_path: &Path, files: &[String]) -> Option<KclMetadata
         primary_kcl_file.clone()
     };
 
+    let mut files = files.to_vec();
+    files.sort();
+
     Some(KclMetadata {
         file: primary_kcl_file,
         path_from_project_directory_to_first_file: path_from_project_dir,
         multiple_files: files.len() > 1,
         title,
         description,
+        files,
     })
 }
 
diff --git a/src/components/ProjectCard/ProjectCard.tsx b/src/components/ProjectCard/ProjectCard.tsx
index 9cf57765d8a..e3b2099c73a 100644
--- a/src/components/ProjectCard/ProjectCard.tsx
+++ b/src/components/ProjectCard/ProjectCard.tsx
@@ -66,7 +66,14 @@ function ProjectCard({
         const imageData = await window.electron.readFile(projectImagePath)
         const blob = new Blob([imageData], { type: 'image/png' })
         const imageUrl = URL.createObjectURL(blob)
-        setImageUrl(imageUrl)
+
+        if (blob.size > 0) {
+          /**
+           * Off chance that a thumbnail.png is cancelled writing and ends up writing 0 bytes
+           * We do not want to load a 0 byte image
+           */
+          setImageUrl(imageUrl)
+        }
       }
     }
 
diff --git a/src/lib/commandBarConfigs/applicationCommandConfig.ts b/src/lib/commandBarConfigs/applicationCommandConfig.ts
index 71f2f76a2eb..e838bc10b3b 100644
--- a/src/lib/commandBarConfigs/applicationCommandConfig.ts
+++ b/src/lib/commandBarConfigs/applicationCommandConfig.ts
@@ -1,19 +1,100 @@
 import type { systemIOMachine } from '@src/machines/systemIO/systemIOMachine'
 import type { ActorRefFrom } from 'xstate'
 import type { Command, CommandArgumentOption } from '@src/lib/commandTypes'
+import type { RequestedKCLFile } from '@src/machines/systemIO/utils'
 import { SystemIOMachineEvents } from '@src/machines/systemIO/utils'
 import { isDesktop } from '@src/lib/isDesktop'
-import { kclSamplesManifestWithNoMultipleFiles } from '@src/lib/kclSamples'
-import { getUniqueProjectName } from '@src/lib/desktopFS'
 import {
-  FILE_EXT,
-  IS_ML_EXPERIMENTAL,
-  ML_EXPERIMENTAL_MESSAGE,
-} from '@src/lib/constants'
+  everyKclSample,
+  findKclSample,
+  kclSamplesManifestWithNoMultipleFiles,
+} from '@src/lib/kclSamples'
+import { getUniqueProjectName } from '@src/lib/desktopFS'
+import { IS_ML_EXPERIMENTAL, ML_EXPERIMENTAL_MESSAGE } from '@src/lib/constants'
 import toast from 'react-hot-toast'
 import { reportRejection } from '@src/lib/trap'
 import { relevantFileExtensions } from '@src/lang/wasmUtils'
 import { getStringAfterLastSeparator, webSafePathSplit } from '@src/lib/paths'
+import { FILE_EXT } from '@src/lib/constants'
+
+function onSubmitKCLSampleCreation({
+  sample,
+  kclSample,
+  uniqueNameIfNeeded,
+  systemIOActor,
+}: {
+  sample: any
+  kclSample: ReturnType<typeof findKclSample>
+  uniqueNameIfNeeded: any
+  systemIOActor: ActorRefFrom<typeof systemIOMachine>
+}) {
+  if (!kclSample) {
+    toast.error('The command could not be submitted, unable to find Zoo sample')
+    return
+  }
+  const pathParts = webSafePathSplit(sample)
+  const projectPathPart = pathParts[0]
+  const files = kclSample.files
+
+  const filePromises = files.map((file) => {
+    const sampleCodeUrl =
+      (isDesktop() ? '.' : '') +
+      `/kcl-samples/${encodeURIComponent(
+        projectPathPart
+      )}/${encodeURIComponent(file)}`
+    return fetch(sampleCodeUrl).then((response) => {
+      return {
+        response,
+        file,
+        projectName: projectPathPart,
+      }
+    })
+  })
+
+  const requestedFiles: RequestedKCLFile[] = []
+  // If any fetches fail from the KCL Code download we will instantly reject
+  // No cleanup required since the fetch response is in memory
+  // TODO: Try to catch if there is a failure then delete the root folder and show error
+  Promise.all(filePromises)
+    .then(async (responses) => {
+      for (let i = 0; i < responses.length; i++) {
+        const response = responses[i]
+        const code = await response.response.text()
+        requestedFiles.push({
+          requestedCode: code,
+          requestedFileName: response.file,
+          requestedProjectName: uniqueNameIfNeeded,
+        })
+      }
+
+      if (requestedFiles.length === 1) {
+        /**
+         * Navigates to the single file that could be renamed on disk for duplicates
+         */
+        const folderNameBecomesKCLFileName = projectPathPart + FILE_EXT
+        systemIOActor.send({
+          type: SystemIOMachineEvents.importFileFromURL,
+          data: {
+            requestedProjectName: requestedFiles[0].requestedProjectName,
+            requestedFileNameWithExtension: folderNameBecomesKCLFileName,
+            requestedCode: requestedFiles[0].requestedCode,
+          },
+        })
+      } else {
+        /**
+         * Bulk create the assembly and navigate to the project
+         */
+        systemIOActor.send({
+          type: SystemIOMachineEvents.bulkCreateKCLFilesAndNavigateToProject,
+          data: {
+            files: requestedFiles,
+            requestedProjectName: uniqueNameIfNeeded,
+          },
+        })
+      }
+    })
+    .catch(reportError)
+}
 
 export function createApplicationCommands({
   systemIOActor,
@@ -115,39 +196,18 @@ export function createApplicationCommands({
           ? getUniqueProjectName(requestedProjectName, folders)
           : requestedProjectName
 
-        if (data.source === 'kcl-samples' && data.sample) {
-          // This is web safe because the values are taken from manifest.json not from the disk when selecting
-          const pathParts = webSafePathSplit(data.sample)
-          const projectPathPart = pathParts[0]
-          const primaryKclFile = pathParts[1]
-          const folderNameBecomesKCLFileName = projectPathPart + FILE_EXT
-
-          const sampleCodeUrl =
-            (isDesktop() ? '.' : '') +
-            `/kcl-samples/${encodeURIComponent(
-              projectPathPart
-            )}/${encodeURIComponent(primaryKclFile)}`
-
-          fetch(sampleCodeUrl)
-            .then(async (codeResponse) => {
-              if (!codeResponse.ok) {
-                console.error(
-                  'Failed to fetch sample code:',
-                  codeResponse.statusText
-                )
-                return Promise.reject(new Error('Failed to fetch sample code'))
-              }
-              const code = await codeResponse.text()
-              systemIOActor.send({
-                type: SystemIOMachineEvents.importFileFromURL,
-                data: {
-                  requestedProjectName: uniqueNameIfNeeded,
-                  requestedFileNameWithExtension: folderNameBecomesKCLFileName,
-                  requestedCode: code,
-                },
-              })
-            })
-            .catch(reportError)
+        const kclSample = findKclSample(data.sample)
+        if (
+          data.source === 'kcl-samples' &&
+          kclSample &&
+          kclSample.files.length >= 1
+        ) {
+          onSubmitKCLSampleCreation({
+            sample: data.sample,
+            kclSample,
+            uniqueNameIfNeeded,
+            systemIOActor,
+          })
         } else if (data.source === 'local' && data.path) {
           const clonePath = data.path
           const fileNameWithExtension = getStringAfterLastSeparator(clonePath)
@@ -193,16 +253,57 @@ export function createApplicationCommands({
           ]
         },
       },
+      sample: {
+        inputType: 'options',
+        required: (commandContext) =>
+          !['local'].includes(
+            commandContext.argumentsToSubmit.source as string
+          ),
+        hidden: (commandContext) =>
+          ['local'].includes(commandContext.argumentsToSubmit.source as string),
+        valueSummary(value) {
+          const MAX_LENGTH = 12
+          if (typeof value === 'string') {
+            return value.length > MAX_LENGTH
+              ? value.substring(0, MAX_LENGTH) + '...'
+              : value
+          }
+          return value
+        },
+        options: ({ argumentsToSubmit }) => {
+          const samples =
+            isDesktop() && argumentsToSubmit.method !== 'existingProject'
+              ? everyKclSample
+              : kclSamplesManifestWithNoMultipleFiles
+          return samples.map((sample) => {
+            return {
+              value: sample.pathFromProjectDirectoryToFirstFile,
+              name: sample.title,
+            }
+          })
+        },
+      },
       method: {
         inputType: 'options',
         required: true,
         skip: true,
-        options: isDesktop()
-          ? [
-              { name: 'New project', value: 'newProject', isCurrent: true },
-              { name: 'Existing project', value: 'existingProject' },
-            ]
-          : [{ name: 'Overwrite', value: 'existingProject' }],
+        options: ({ argumentsToSubmit }, _) => {
+          if (isDesktop() && typeof argumentsToSubmit.sample === 'string') {
+            const kclSample = findKclSample(argumentsToSubmit.sample)
+            if (kclSample && kclSample.files.length > 1) {
+              return [
+                { name: 'New project', value: 'newProject', isCurrent: true },
+              ]
+            } else {
+              return [
+                { name: 'New project', value: 'newProject', isCurrent: true },
+                { name: 'Existing project', value: 'existingProject' },
+              ]
+            }
+          } else {
+            return [{ name: 'Overwrite', value: 'existingProject' }]
+          }
+        },
         valueSummary(value) {
           return isDesktop()
             ? value === 'newProject'
@@ -237,30 +338,6 @@ export function createApplicationCommands({
           commandsContext.argumentsToSubmit.method === 'newProject',
         skip: true,
       },
-      sample: {
-        inputType: 'options',
-        required: (commandContext) =>
-          !['local'].includes(
-            commandContext.argumentsToSubmit.source as string
-          ),
-        hidden: (commandContext) =>
-          ['local'].includes(commandContext.argumentsToSubmit.source as string),
-        valueSummary(value) {
-          const MAX_LENGTH = 12
-          if (typeof value === 'string') {
-            return value.length > MAX_LENGTH
-              ? value.substring(0, MAX_LENGTH) + '...'
-              : value
-          }
-          return value
-        },
-        options: kclSamplesManifestWithNoMultipleFiles.map((sample) => {
-          return {
-            value: sample.pathFromProjectDirectoryToFirstFile,
-            name: sample.title,
-          }
-        }),
-      },
       path: {
         inputType: 'path',
         skip: true,
@@ -282,7 +359,78 @@ export function createApplicationCommands({
     },
   }
 
+  /**
+   * Looks similar to Add file to project but more data is hard coded for the home page button
+   * to direct the user in a more seamless method.
+   *
+   * This will always create a new folder on disk does not import into existing projects.
+   * Desktop only command for now!
+   */
+  const createASampleDesktopOnly: Command = {
+    name: 'create-a-sample',
+    displayName: 'Create a sample',
+    description: 'Create a new project from a Zoo Sample',
+    needsReview: false,
+    icon: 'importFile',
+    groupId: 'application',
+    hideFromSearch: true,
+    onSubmit: (data) => {
+      if (data) {
+        const folders = systemIOActor.getSnapshot().context.folders
+        const kclSample = findKclSample(data.sample)
+        if (!kclSample) {
+          toast.error(
+            'The command could not be submitted, unable to find Zoo sample'
+          )
+          return
+        }
+        const pathParts = webSafePathSplit(
+          kclSample.pathFromProjectDirectoryToFirstFile
+        )
+        const folderNameBecomesSampleName = pathParts[0]
+        const uniqueNameIfNeeded = getUniqueProjectName(
+          folderNameBecomesSampleName,
+          folders
+        )
+        onSubmitKCLSampleCreation({
+          sample: data.sample,
+          kclSample,
+          uniqueNameIfNeeded,
+          systemIOActor,
+        })
+      }
+    },
+    args: {
+      source: {
+        inputType: 'text',
+        required: true,
+        skip: false,
+        defaultValue: 'kcl-samples',
+        hidden: true,
+      },
+      sample: {
+        inputType: 'options',
+        required: true,
+        valueSummary(value) {
+          const MAX_LENGTH = 12
+          if (typeof value === 'string') {
+            return value.length > MAX_LENGTH
+              ? value.substring(0, MAX_LENGTH) + '...'
+              : value
+          }
+          return value
+        },
+        options: everyKclSample.map((sample) => {
+          return {
+            value: sample.pathFromProjectDirectoryToFirstFile,
+            name: sample.title,
+          }
+        }),
+      },
+    },
+  }
+
   return isDesktop()
-    ? [textToCADCommand, addKCLFileToProject]
+    ? [textToCADCommand, addKCLFileToProject, createASampleDesktopOnly]
     : [textToCADCommand, addKCLFileToProject]
 }
diff --git a/src/lib/kclSamples.ts b/src/lib/kclSamples.ts
index d9c36f181cf..0bd6fc2a5c1 100644
--- a/src/lib/kclSamples.ts
+++ b/src/lib/kclSamples.ts
@@ -1,7 +1,14 @@
 import kclSamplesManifest from '@public/kcl-samples/manifest.json'
 
-const kclSamplesManifestWithNoMultipleFiles = kclSamplesManifest.filter(
+export const kclSamplesManifestWithNoMultipleFiles = kclSamplesManifest.filter(
   (file) => !file.multipleFiles
 )
+export const everyKclSample = kclSamplesManifest
 
-export { kclSamplesManifest, kclSamplesManifestWithNoMultipleFiles }
+export const findKclSample = (pathFromProjectDirectoryToFirstFile: string) => {
+  return everyKclSample.find(
+    (sample) =>
+      sample.pathFromProjectDirectoryToFirstFile ===
+      pathFromProjectDirectoryToFirstFile
+  )
+}
diff --git a/src/routes/Home.tsx b/src/routes/Home.tsx
index b68052e1a9e..7c9bf929c9d 100644
--- a/src/routes/Home.tsx
+++ b/src/routes/Home.tsx
@@ -332,12 +332,9 @@ const Home = () => {
                     type: 'Find and select command',
                     data: {
                       groupId: 'application',
-                      name: 'add-kcl-file-to-project',
+                      name: 'create-a-sample',
                       argDefaultValues: {
                         source: 'kcl-samples',
-                        method: 'newProject',
-                        newProjectName:
-                          settings.projects.defaultProjectName.current,
                       },
                     },
                   })


Reviews:
user: login: graphite-app[bot]
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-07T21:53:10Z
user: login: franknoirot
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T00:06:05Z
user: login: graphite-app[bot]
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T14:49:02Z
user: login: nadr0
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T15:00:19Z
user: login: nadr0
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T15:08:17Z
user: login: nadr0
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T15:09:22Z
user: login: franknoirot
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T15:12:33Z
user: login: franknoirot
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T15:17:34Z
user: login: franknoirot
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T15:21:22Z
user: login: franknoirot
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T16:15:38Z
user: login: nadr0
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T16:18:06Z
user: login: franknoirot
body: Sick just writing my understanding of the workflows here:
1. Using "Add KCL file to project" with an assembly KCL sample
    1. Cannot use the "Add to current project" approach
    2. Always creates a unique project name
    3. Never changes the file names
2. Using "Add KCL file to project" with a single-file KCL sample
    1. Can use the "Add to current project" approach
3. Clicking the button on the homepage invokes a simplified version of the command which always does 
4. Browser still filters assembly samples, overwrites current file in-place
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T18:31:06Z
user: login: nadr0
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T18:54:52Z
user: login: pierremtb
body: Alright looking all good here! Thanks so much for the effort and handling all the cases
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T19:13:51Z
user: login: franknoirot
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T19:31:11Z

Review comments:
diff_hunk: @@ -115,37 +112,69 @@ export function createApplicationCommands({
           ? getUniqueProjectName(requestedProjectName, folders)
           : requestedProjectName
 
-        if (data.source === 'kcl-samples' && data.sample) {
-          // This is web safe because the values are taken from manifest.json not from the disk when selecting
+        const kclSample = findKclSample(data.sample)
+        if (kclSample && kclSample.files.length >= 1) {
           const pathParts = webSafePathSplit(data.sample)
           const projectPathPart = pathParts[0]
-          const primaryKclFile = pathParts[1]
-          const folderNameBecomesKCLFileName = projectPathPart + FILE_EXT
+          const files = kclSample.files
 
-          const sampleCodeUrl =
-            (isDesktop() ? '.' : '') +
-            `/kcl-samples/${encodeURIComponent(
-              projectPathPart
-            )}/${encodeURIComponent(primaryKclFile)}`
-
-          fetch(sampleCodeUrl)
-            .then(async (codeResponse) => {
-              if (!codeResponse.ok) {
-                console.error(
-                  'Failed to fetch sample code:',
-                  codeResponse.statusText
-                )
-                return Promise.reject(new Error('Failed to fetch sample code'))
+          const filePromises = files.map((file) => {
+            const sampleCodeUrl =
+              (isDesktop() ? '.' : '') +
+              `/kcl-samples/${encodeURIComponent(
+                projectPathPart
+              )}/${encodeURIComponent(file)}`
+            return fetch(sampleCodeUrl).then((response) => {
+              return {
+                response,
+                file,
+                projectName: projectPathPart,
               }
path: src/lib/commandBarConfigs/applicationCommandConfig.ts
user: login: graphite-app[bot]
body: The code should check if the response is successful before proceeding. Currently, if a fetch succeeds but returns a non-200 status code, the code will still attempt to process it. Consider adding a check for `response.ok` before proceeding with the text extraction:

```javascript
return fetch(sampleCodeUrl).then((response) => {
  if (!response.ok) {
    throw new Error(`Failed to fetch ${file}: ${response.statusText}`);
  }
  return {
    response,
    file,
    projectName: projectPathPart,
  };
});
```

This ensures that only successful responses are processed, providing better error handling.
```suggestion
            return fetch(sampleCodeUrl).then((response) => {
              if (!response.ok) {
                throw new Error(`Failed to fetch ${file}: ${response.statusText}`);
              }
              return {
                response,
                file,
                projectName: projectPathPart,
              };
```
  

*Spotted by [Diamond](https://app.graphite.dev/diamond/?org=KittyCAD&ref=ai-review-comment)*<i class='graphite__hidden'><br /><br />Is this helpful? React 👍 or 👎 to let us know.</i>
created_at: 2025-05-07T21:53:08Z
author_association: CONTRIBUTOR
diff_hunk: @@ -115,37 +112,69 @@ export function createApplicationCommands({
           ? getUniqueProjectName(requestedProjectName, folders)
           : requestedProjectName
 
-        if (data.source === 'kcl-samples' && data.sample) {
-          // This is web safe because the values are taken from manifest.json not from the disk when selecting
+        const kclSample = findKclSample(data.sample)
+        if (kclSample && kclSample.files.length >= 1) {
           const pathParts = webSafePathSplit(data.sample)
           const projectPathPart = pathParts[0]
-          const primaryKclFile = pathParts[1]
-          const folderNameBecomesKCLFileName = projectPathPart + FILE_EXT
+          const files = kclSample.files
 
-          const sampleCodeUrl =
-            (isDesktop() ? '.' : '') +
-            `/kcl-samples/${encodeURIComponent(
-              projectPathPart
-            )}/${encodeURIComponent(primaryKclFile)}`
-
-          fetch(sampleCodeUrl)
-            .then(async (codeResponse) => {
-              if (!codeResponse.ok) {
-                console.error(
-                  'Failed to fetch sample code:',
-                  codeResponse.statusText
-                )
-                return Promise.reject(new Error('Failed to fetch sample code'))
+          const filePromises = files.map((file) => {
+            const sampleCodeUrl =
+              (isDesktop() ? '.' : '') +
+              `/kcl-samples/${encodeURIComponent(
+                projectPathPart
+              )}/${encodeURIComponent(file)}`
+            return fetch(sampleCodeUrl).then((response) => {
+              return {
+                response,
+                file,
+                projectName: projectPathPart,
               }
path: src/lib/commandBarConfigs/applicationCommandConfig.ts
user: login: franknoirot
body: We could throw a
```ts
.catch(reportRejection)
```

on there
created_at: 2025-05-08T00:06:05Z
author_association: CONTRIBUTOR
diff_hunk: @@ -152,6 +154,7 @@ test.describe('Testing loading external models', () => {
 
       await test.step(`Ensure we made and opened a new file`, async () => {
         await editor.expectEditor.toContain('// ' + sampleOne.title)
+        await page.pause()
path: e2e/playwright/testing-samples-loading.spec.ts
user: login: graphite-app[bot]
body: This `await page.pause()` statement appears to be debugging code that was accidentally left in. It will cause the test to pause during execution, which would block automated test runs. Consider removing this line before merging.

*Spotted by [Diamond](https://app.graphite.dev/diamond/?org=KittyCAD&ref=ai-review-comment)*<i class='graphite__hidden'><br /><br />Is this helpful? React 👍 or 👎 to let us know.</i>
created_at: 2025-05-08T14:49:01Z
author_association: CONTRIBUTOR
diff_hunk: @@ -115,37 +112,69 @@ export function createApplicationCommands({
           ? getUniqueProjectName(requestedProjectName, folders)
           : requestedProjectName
 
-        if (data.source === 'kcl-samples' && data.sample) {
-          // This is web safe because the values are taken from manifest.json not from the disk when selecting
+        const kclSample = findKclSample(data.sample)
+        if (kclSample && kclSample.files.length >= 1) {
           const pathParts = webSafePathSplit(data.sample)
           const projectPathPart = pathParts[0]
-          const primaryKclFile = pathParts[1]
-          const folderNameBecomesKCLFileName = projectPathPart + FILE_EXT
+          const files = kclSample.files
 
-          const sampleCodeUrl =
-            (isDesktop() ? '.' : '') +
-            `/kcl-samples/${encodeURIComponent(
-              projectPathPart
-            )}/${encodeURIComponent(primaryKclFile)}`
-
-          fetch(sampleCodeUrl)
-            .then(async (codeResponse) => {
-              if (!codeResponse.ok) {
-                console.error(
-                  'Failed to fetch sample code:',
-                  codeResponse.statusText
-                )
-                return Promise.reject(new Error('Failed to fetch sample code'))
+          const filePromises = files.map((file) => {
+            const sampleCodeUrl =
+              (isDesktop() ? '.' : '') +
+              `/kcl-samples/${encodeURIComponent(
+                projectPathPart
+              )}/${encodeURIComponent(file)}`
+            return fetch(sampleCodeUrl).then((response) => {
+              return {
+                response,
+                file,
+                projectName: projectPathPart,
               }
path: src/lib/commandBarConfigs/applicationCommandConfig.ts
user: login: nadr0
body: I got beef with this. The catch is handled within the `Promise.all([]).then().catch()`. 

Also the bot's english is confusing.
 > Currently, if a fetch succeeds but returns a non-200 status code.

[Source](https://developer.mozilla.org/en-US/docs/Web/API/Response/ok)
>The ok read-only property of the [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.

If it is saying that you need to see if it is `ok` to say it is exactly `200` it is wrong. Does `non-200` mean `200-299` or everything but `200`.

Yes I agree this could be better but I don't think the bot has the right idea. This bot doesn't realize you can implement GET endpoints that do this

GET https://app.zoo.dev/file/dog.jpg
```
{
  error: true
}
```
^-- people have done shit like this which blows my mind. 
created_at: 2025-05-08T15:00:18Z
author_association: CONTRIBUTOR
diff_hunk: @@ -115,37 +112,69 @@ export function createApplicationCommands({
           ? getUniqueProjectName(requestedProjectName, folders)
           : requestedProjectName
 
-        if (data.source === 'kcl-samples' && data.sample) {
-          // This is web safe because the values are taken from manifest.json not from the disk when selecting
+        const kclSample = findKclSample(data.sample)
+        if (kclSample && kclSample.files.length >= 1) {
           const pathParts = webSafePathSplit(data.sample)
           const projectPathPart = pathParts[0]
-          const primaryKclFile = pathParts[1]
-          const folderNameBecomesKCLFileName = projectPathPart + FILE_EXT
+          const files = kclSample.files
 
-          const sampleCodeUrl =
-            (isDesktop() ? '.' : '') +
-            `/kcl-samples/${encodeURIComponent(
-              projectPathPart
-            )}/${encodeURIComponent(primaryKclFile)}`
-
-          fetch(sampleCodeUrl)
-            .then(async (codeResponse) => {
-              if (!codeResponse.ok) {
-                console.error(
-                  'Failed to fetch sample code:',
-                  codeResponse.statusText
-                )
-                return Promise.reject(new Error('Failed to fetch sample code'))
+          const filePromises = files.map((file) => {
+            const sampleCodeUrl =
+              (isDesktop() ? '.' : '') +
+              `/kcl-samples/${encodeURIComponent(
+                projectPathPart
+              )}/${encodeURIComponent(file)}`
+            return fetch(sampleCodeUrl).then((response) => {
+              return {
+                response,
+                file,
+                projectName: projectPathPart,
               }
path: src/lib/commandBarConfigs/applicationCommandConfig.ts
user: login: nadr0
body: Also what if the `response.ok` is truthy and then the content is `empty`? Then I do text extraction and it is empty? The intention is that URL should be giving me a real resource. The expectation isn't a resource of an empty string.

I don't think `response.ok` is enough bot. 
created_at: 2025-05-08T15:08:17Z
author_association: CONTRIBUTOR
diff_hunk: @@ -152,6 +154,7 @@ test.describe('Testing loading external models', () => {
 
       await test.step(`Ensure we made and opened a new file`, async () => {
         await editor.expectEditor.toContain('// ' + sampleOne.title)
+        await page.pause()
path: e2e/playwright/testing-samples-loading.spec.ts
user: login: nadr0
body: shit u got me on this one bot, we even now.
created_at: 2025-05-08T15:09:21Z
author_association: CONTRIBUTOR
diff_hunk: @@ -115,37 +112,69 @@ export function createApplicationCommands({
           ? getUniqueProjectName(requestedProjectName, folders)
           : requestedProjectName
 
-        if (data.source === 'kcl-samples' && data.sample) {
-          // This is web safe because the values are taken from manifest.json not from the disk when selecting
+        const kclSample = findKclSample(data.sample)
+        if (kclSample && kclSample.files.length >= 1) {
           const pathParts = webSafePathSplit(data.sample)
           const projectPathPart = pathParts[0]
-          const primaryKclFile = pathParts[1]
-          const folderNameBecomesKCLFileName = projectPathPart + FILE_EXT
+          const files = kclSample.files
 
-          const sampleCodeUrl =
-            (isDesktop() ? '.' : '') +
-            `/kcl-samples/${encodeURIComponent(
-              projectPathPart
-            )}/${encodeURIComponent(primaryKclFile)}`
-
-          fetch(sampleCodeUrl)
-            .then(async (codeResponse) => {
-              if (!codeResponse.ok) {
-                console.error(
-                  'Failed to fetch sample code:',
-                  codeResponse.statusText
-                )
-                return Promise.reject(new Error('Failed to fetch sample code'))
+          const filePromises = files.map((file) => {
+            const sampleCodeUrl =
+              (isDesktop() ? '.' : '') +
+              `/kcl-samples/${encodeURIComponent(
+                projectPathPart
+              )}/${encodeURIComponent(file)}`
+            return fetch(sampleCodeUrl).then((response) => {
+              return {
+                response,
+                file,
+                projectName: projectPathPart,
               }
path: src/lib/commandBarConfigs/applicationCommandConfig.ts
user: login: franknoirot
body: That's what I get for not reading the context around the code, I didn't see [the `.catch(reportRejection) down on 179](https://github.com/KittyCAD/modeling-app/pull/6747/files/b173f5fb0f73aac48b45065ab9f8291207cdb062#diff-bdf38726b1d6b8a3d5063d968418b9d284178186d18ac1f11072151710c050a1R179)
created_at: 2025-05-08T15:12:26Z
author_association: CONTRIBUTOR
diff_hunk: @@ -152,6 +154,7 @@ test.describe('Testing loading external models', () => {
 
       await test.step(`Ensure we made and opened a new file`, async () => {
         await editor.expectEditor.toContain('// ' + sampleOne.title)
+        await page.pause()
path: e2e/playwright/testing-samples-loading.spec.ts
user: login: franknoirot
body: lol we are so back
created_at: 2025-05-08T15:17:34Z
author_association: CONTRIBUTOR
diff_hunk: @@ -115,37 +112,69 @@ export function createApplicationCommands({
           ? getUniqueProjectName(requestedProjectName, folders)
           : requestedProjectName
 
-        if (data.source === 'kcl-samples' && data.sample) {
-          // This is web safe because the values are taken from manifest.json not from the disk when selecting
+        const kclSample = findKclSample(data.sample)
+        if (kclSample && kclSample.files.length >= 1) {
           const pathParts = webSafePathSplit(data.sample)
           const projectPathPart = pathParts[0]
-          const primaryKclFile = pathParts[1]
-          const folderNameBecomesKCLFileName = projectPathPart + FILE_EXT
+          const files = kclSample.files
 
-          const sampleCodeUrl =
-            (isDesktop() ? '.' : '') +
-            `/kcl-samples/${encodeURIComponent(
-              projectPathPart
-            )}/${encodeURIComponent(primaryKclFile)}`
-
-          fetch(sampleCodeUrl)
-            .then(async (codeResponse) => {
-              if (!codeResponse.ok) {
-                console.error(
-                  'Failed to fetch sample code:',
-                  codeResponse.statusText
-                )
-                return Promise.reject(new Error('Failed to fetch sample code'))
+          const filePromises = files.map((file) => {
+            const sampleCodeUrl =
+              (isDesktop() ? '.' : '') +
+              `/kcl-samples/${encodeURIComponent(
+                projectPathPart
+              )}/${encodeURIComponent(file)}`
+            return fetch(sampleCodeUrl).then((response) => {
+              return {
+                response,
+                file,
+                projectName: projectPathPart,
               }
path: src/lib/commandBarConfigs/applicationCommandConfig.ts
user: login: franknoirot
body: Yeah bot doesn't get that this is a local, controlled endpoint that we are just fetching an asset from, and that we don't need to be as defensive in our code here.
created_at: 2025-05-08T15:21:22Z
author_association: CONTRIBUTOR
diff_hunk: @@ -115,37 +113,70 @@ export function createApplicationCommands({
           ? getUniqueProjectName(requestedProjectName, folders)
           : requestedProjectName
 
-        if (data.source === 'kcl-samples' && data.sample) {
-          // This is web safe because the values are taken from manifest.json not from the disk when selecting
+        const kclSample = findKclSample(data.sample)
+        if (kclSample && kclSample.files.length >= 1) {
           const pathParts = webSafePathSplit(data.sample)
           const projectPathPart = pathParts[0]
-          const primaryKclFile = pathParts[1]
-          const folderNameBecomesKCLFileName = projectPathPart + FILE_EXT
+          const files = kclSample.files
 
-          const sampleCodeUrl =
-            (isDesktop() ? '.' : '') +
-            `/kcl-samples/${encodeURIComponent(
-              projectPathPart
-            )}/${encodeURIComponent(primaryKclFile)}`
-
-          fetch(sampleCodeUrl)
-            .then(async (codeResponse) => {
-              if (!codeResponse.ok) {
-                console.error(
-                  'Failed to fetch sample code:',
-                  codeResponse.statusText
-                )
-                return Promise.reject(new Error('Failed to fetch sample code'))
+          const filePromises = files.map((file) => {
+            const sampleCodeUrl =
+              (isDesktop() ? '.' : '') +
+              `/kcl-samples/${encodeURIComponent(
+                projectPathPart
+              )}/${encodeURIComponent(file)}`
+            return fetch(sampleCodeUrl).then((response) => {
+              return {
+                response,
+                file,
+                projectName: projectPathPart,
               }
-              const code = await codeResponse.text()
-              systemIOActor.send({
-                type: SystemIOMachineEvents.importFileFromURL,
-                data: {
-                  requestedProjectName: uniqueNameIfNeeded,
-                  requestedFileNameWithExtension: folderNameBecomesKCLFileName,
+            })
+          })
+
+          const requestedFiles: RequestedKCLFile[] = []
+          // If any fetches fail from the KCL Code download we will instantly reject
+          // No cleanup required since the fetch response is in memory
+          // TODO: Try to catch if there is a failure then delete the root folder and show error
+          Promise.all(filePromises)
+            .then(async (responses) => {
+              for (let i = 0; i < responses.length; i++) {
+                const response = responses[i]
+                const code = await response.response.text()
+                requestedFiles.push({
                   requestedCode: code,
-                },
-              })
+                  requestedFileName: response.file,
+                  requestedProjectName: requestedProjectName,
+                })
+              }
+
+              if (requestedFiles.length === 1) {
+                /**
+                 * Navigates to the single file that could be renamed on disk for duplicates
+                 */
+                const folderNameBecomesKCLFileName = projectPathPart + FILE_EXT
+                systemIOActor.send({
+                  type: SystemIOMachineEvents.importFileFromURL,
+                  data: {
+                    requestedProjectName:
+                      requestedFiles[0].requestedProjectName,
+                    requestedFileNameWithExtension:
+                      folderNameBecomesKCLFileName,
+                    requestedCode: requestedFiles[0].requestedCode,
+                  },
+                })
+              } else {
+                /**
+                 * Bulk create the assembly and navigate to the project
+                 */
+                systemIOActor.send({
+                  type: SystemIOMachineEvents.bulkCreateKCLFilesAndNavigateToProject,
+                  data: {
+                    files: requestedFiles,
+                    requestedProjectName: requestedProjectName,
path: src/lib/commandBarConfigs/applicationCommandConfig.ts
user: login: franknoirot
body: ```suggestion
                    requestedProjectName: uniqueNameIfNeeded,
```
created_at: 2025-05-08T16:15:38Z
author_association: CONTRIBUTOR
diff_hunk: @@ -115,37 +113,70 @@ export function createApplicationCommands({
           ? getUniqueProjectName(requestedProjectName, folders)
           : requestedProjectName
 
-        if (data.source === 'kcl-samples' && data.sample) {
-          // This is web safe because the values are taken from manifest.json not from the disk when selecting
+        const kclSample = findKclSample(data.sample)
+        if (kclSample && kclSample.files.length >= 1) {
           const pathParts = webSafePathSplit(data.sample)
           const projectPathPart = pathParts[0]
-          const primaryKclFile = pathParts[1]
-          const folderNameBecomesKCLFileName = projectPathPart + FILE_EXT
+          const files = kclSample.files
 
-          const sampleCodeUrl =
-            (isDesktop() ? '.' : '') +
-            `/kcl-samples/${encodeURIComponent(
-              projectPathPart
-            )}/${encodeURIComponent(primaryKclFile)}`
-
-          fetch(sampleCodeUrl)
-            .then(async (codeResponse) => {
-              if (!codeResponse.ok) {
-                console.error(
-                  'Failed to fetch sample code:',
-                  codeResponse.statusText
-                )
-                return Promise.reject(new Error('Failed to fetch sample code'))
+          const filePromises = files.map((file) => {
+            const sampleCodeUrl =
+              (isDesktop() ? '.' : '') +
+              `/kcl-samples/${encodeURIComponent(
+                projectPathPart
+              )}/${encodeURIComponent(file)}`
+            return fetch(sampleCodeUrl).then((response) => {
+              return {
+                response,
+                file,
+                projectName: projectPathPart,
               }
-              const code = await codeResponse.text()
-              systemIOActor.send({
-                type: SystemIOMachineEvents.importFileFromURL,
-                data: {
-                  requestedProjectName: uniqueNameIfNeeded,
-                  requestedFileNameWithExtension: folderNameBecomesKCLFileName,
+            })
+          })
+
+          const requestedFiles: RequestedKCLFile[] = []
+          // If any fetches fail from the KCL Code download we will instantly reject
+          // No cleanup required since the fetch response is in memory
+          // TODO: Try to catch if there is a failure then delete the root folder and show error
+          Promise.all(filePromises)
+            .then(async (responses) => {
+              for (let i = 0; i < responses.length; i++) {
+                const response = responses[i]
+                const code = await response.response.text()
+                requestedFiles.push({
                   requestedCode: code,
-                },
-              })
+                  requestedFileName: response.file,
+                  requestedProjectName: requestedProjectName,
+                })
+              }
+
+              if (requestedFiles.length === 1) {
+                /**
+                 * Navigates to the single file that could be renamed on disk for duplicates
+                 */
+                const folderNameBecomesKCLFileName = projectPathPart + FILE_EXT
+                systemIOActor.send({
+                  type: SystemIOMachineEvents.importFileFromURL,
+                  data: {
+                    requestedProjectName:
+                      requestedFiles[0].requestedProjectName,
+                    requestedFileNameWithExtension:
+                      folderNameBecomesKCLFileName,
+                    requestedCode: requestedFiles[0].requestedCode,
+                  },
+                })
+              } else {
+                /**
+                 * Bulk create the assembly and navigate to the project
+                 */
+                systemIOActor.send({
+                  type: SystemIOMachineEvents.bulkCreateKCLFilesAndNavigateToProject,
+                  data: {
+                    files: requestedFiles,
+                    requestedProjectName: requestedProjectName,
path: src/lib/commandBarConfigs/applicationCommandConfig.ts
user: login: nadr0
body: Directly committed this, thanks!
created_at: 2025-05-08T16:18:06Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1,19 +1,100 @@
 import type { systemIOMachine } from '@src/machines/systemIO/systemIOMachine'
 import type { ActorRefFrom } from 'xstate'
 import type { Command, CommandArgumentOption } from '@src/lib/commandTypes'
+import type { RequestedKCLFile } from '@src/machines/systemIO/utils'
 import { SystemIOMachineEvents } from '@src/machines/systemIO/utils'
 import { isDesktop } from '@src/lib/isDesktop'
-import { kclSamplesManifestWithNoMultipleFiles } from '@src/lib/kclSamples'
-import { getUniqueProjectName } from '@src/lib/desktopFS'
 import {
-  FILE_EXT,
-  IS_ML_EXPERIMENTAL,
-  ML_EXPERIMENTAL_MESSAGE,
-} from '@src/lib/constants'
+  everyKclSample,
+  findKclSample,
+  kclSamplesManifestWithNoMultipleFiles,
+} from '@src/lib/kclSamples'
+import { getUniqueProjectName } from '@src/lib/desktopFS'
+import { IS_ML_EXPERIMENTAL, ML_EXPERIMENTAL_MESSAGE } from '@src/lib/constants'
 import toast from 'react-hot-toast'
 import { reportRejection } from '@src/lib/trap'
 import { relevantFileExtensions } from '@src/lang/wasmUtils'
 import { getStringAfterLastSeparator, webSafePathSplit } from '@src/lib/paths'
+import { FILE_EXT } from '@src/lib/constants'
+
+function onSubmitKCLSampleCreation({
+  sample,
+  kclSample,
+  uniqueNameIfNeeded,
+  systemIOActor,
+}: {
+  sample: any
+  kclSample: ReturnType<typeof findKclSample>
+  uniqueNameIfNeeded: any
+  systemIOActor: ActorRefFrom<typeof systemIOMachine>
+}) {
+  if (!kclSample) {
+    toast.error('The command could not be submitted, unable to find Zoo sample')
+    return
+  }
+  const pathParts = webSafePathSplit(sample)
+  const projectPathPart = pathParts[0]
+  const files = kclSample.files
+
+  const filePromises = files.map((file) => {
+    const sampleCodeUrl =
+      (isDesktop() ? '.' : '') +
+      `/kcl-samples/${encodeURIComponent(
+        projectPathPart
+      )}/${encodeURIComponent(file)}`
+    return fetch(sampleCodeUrl).then((response) => {
+      return {
+        response,
+        file,
+        projectName: projectPathPart,
+      }
+    })
+  })
+
+  const requestedFiles: RequestedKCLFile[] = []
+  // If any fetches fail from the KCL Code download we will instantly reject
+  // No cleanup required since the fetch response is in memory
+  // TODO: Try to catch if there is a failure then delete the root folder and show error
+  Promise.all(filePromises)
+    .then(async (responses) => {
+      for (let i = 0; i < responses.length; i++) {
+        const response = responses[i]
+        const code = await response.response.text()
+        requestedFiles.push({
+          requestedCode: code,
+          requestedFileName: response.file,
+          requestedProjectName: uniqueNameIfNeeded,
+        })
+      }
+
+      if (requestedFiles.length === 1) {
+        /**
+         * Navigates to the single file that could be renamed on disk for duplicates
+         */
+        const folderNameBecomesKCLFileName = projectPathPart + FILE_EXT
+        systemIOActor.send({
+          type: SystemIOMachineEvents.importFileFromURL,
+          data: {
+            requestedProjectName: requestedFiles[0].requestedProjectName,
+            requestedFileNameWithExtension: folderNameBecomesKCLFileName,
path: src/lib/commandBarConfigs/applicationCommandConfig.ts
user: login: franknoirot
body: nit: this is the bit of logic I was saying if `data.method === "newProject"` we probably don't need to reassign this file name right? so then the user gets something like `/bottle-1/main.kcl` matching the KCL sample as closely as possible
created_at: 2025-05-08T18:26:59Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1,19 +1,100 @@
 import type { systemIOMachine } from '@src/machines/systemIO/systemIOMachine'
 import type { ActorRefFrom } from 'xstate'
 import type { Command, CommandArgumentOption } from '@src/lib/commandTypes'
+import type { RequestedKCLFile } from '@src/machines/systemIO/utils'
 import { SystemIOMachineEvents } from '@src/machines/systemIO/utils'
 import { isDesktop } from '@src/lib/isDesktop'
-import { kclSamplesManifestWithNoMultipleFiles } from '@src/lib/kclSamples'
-import { getUniqueProjectName } from '@src/lib/desktopFS'
 import {
-  FILE_EXT,
-  IS_ML_EXPERIMENTAL,
-  ML_EXPERIMENTAL_MESSAGE,
-} from '@src/lib/constants'
+  everyKclSample,
+  findKclSample,
+  kclSamplesManifestWithNoMultipleFiles,
+} from '@src/lib/kclSamples'
+import { getUniqueProjectName } from '@src/lib/desktopFS'
+import { IS_ML_EXPERIMENTAL, ML_EXPERIMENTAL_MESSAGE } from '@src/lib/constants'
 import toast from 'react-hot-toast'
 import { reportRejection } from '@src/lib/trap'
 import { relevantFileExtensions } from '@src/lang/wasmUtils'
 import { getStringAfterLastSeparator, webSafePathSplit } from '@src/lib/paths'
+import { FILE_EXT } from '@src/lib/constants'
+
+function onSubmitKCLSampleCreation({
+  sample,
+  kclSample,
+  uniqueNameIfNeeded,
+  systemIOActor,
+}: {
+  sample: any
+  kclSample: ReturnType<typeof findKclSample>
+  uniqueNameIfNeeded: any
+  systemIOActor: ActorRefFrom<typeof systemIOMachine>
+}) {
+  if (!kclSample) {
+    toast.error('The command could not be submitted, unable to find Zoo sample')
+    return
+  }
+  const pathParts = webSafePathSplit(sample)
+  const projectPathPart = pathParts[0]
+  const files = kclSample.files
+
+  const filePromises = files.map((file) => {
+    const sampleCodeUrl =
+      (isDesktop() ? '.' : '') +
+      `/kcl-samples/${encodeURIComponent(
+        projectPathPart
+      )}/${encodeURIComponent(file)}`
+    return fetch(sampleCodeUrl).then((response) => {
+      return {
+        response,
+        file,
+        projectName: projectPathPart,
+      }
+    })
+  })
+
+  const requestedFiles: RequestedKCLFile[] = []
+  // If any fetches fail from the KCL Code download we will instantly reject
+  // No cleanup required since the fetch response is in memory
+  // TODO: Try to catch if there is a failure then delete the root folder and show error
+  Promise.all(filePromises)
+    .then(async (responses) => {
+      for (let i = 0; i < responses.length; i++) {
+        const response = responses[i]
+        const code = await response.response.text()
+        requestedFiles.push({
+          requestedCode: code,
+          requestedFileName: response.file,
+          requestedProjectName: uniqueNameIfNeeded,
+        })
+      }
+
+      if (requestedFiles.length === 1) {
+        /**
+         * Navigates to the single file that could be renamed on disk for duplicates
+         */
+        const folderNameBecomesKCLFileName = projectPathPart + FILE_EXT
+        systemIOActor.send({
+          type: SystemIOMachineEvents.importFileFromURL,
+          data: {
+            requestedProjectName: requestedFiles[0].requestedProjectName,
+            requestedFileNameWithExtension: folderNameBecomesKCLFileName,
path: src/lib/commandBarConfigs/applicationCommandConfig.ts
user: login: nadr0
body: I thought we said we wanted `bottle/bottle.kcl`? 
created_at: 2025-05-08T18:54:52Z
author_association: CONTRIBUTOR
diff_hunk: @@ -282,7 +359,78 @@ export function createApplicationCommands({
     },
   }
 
+  /**
+   * Looks similar to Add file to project but more data is hard coded for the home page button
+   * to direct the user in a more seamless method.
+   *
+   * This will always create a new folder on disk does not import into existing projects.
+   * Desktop only command for now!
+   */
+  const createASampleDesktopOnly: Command = {
+    name: 'create-a-sample',
+    displayName: 'Create a sample',
+    description: 'Create a new project from a Zoo Sample',
+    needsReview: false,
+    icon: 'importFile',
+    groupId: 'application',
+    hideFromSearch: true,
+    onSubmit: (data) => {
+      if (data) {
+        const folders = systemIOActor.getSnapshot().context.folders
+        const kclSample = findKclSample(data.sample)
+        if (!kclSample) {
+          toast.error(
+            'The command could not be submitted, unable to find Zoo sample'
+          )
+          return
+        }
+        const pathParts = webSafePathSplit(
+          kclSample.pathFromProjectDirectoryToFirstFile
+        )
+        const folderNameBecomesSampleName = pathParts[0]
+        const uniqueNameIfNeeded = getUniqueProjectName(
+          folderNameBecomesSampleName,
+          folders
+        )
+        onSubmitKCLSampleCreation({
+          sample: data.sample,
+          kclSample,
+          uniqueNameIfNeeded,
+          systemIOActor,
+        })
+      }
+    },
+    args: {
+      source: {
+        inputType: 'text',
+        required: true,
+        skip: false,
+        defaultValue: 'kcl-samples',
+        hidden: true,
+      },
path: src/lib/commandBarConfigs/applicationCommandConfig.ts
user: login: pierremtb
body: Curious: Why do we keep source here?
created_at: 2025-05-08T19:09:24Z
author_association: CONTRIBUTOR
diff_hunk: @@ -193,16 +253,57 @@ export function createApplicationCommands({
           ]
         },
       },
+      sample: {
+        inputType: 'options',
+        required: (commandContext) =>
+          !['local'].includes(
+            commandContext.argumentsToSubmit.source as string
+          ),
+        hidden: (commandContext) =>
+          ['local'].includes(commandContext.argumentsToSubmit.source as string),
+        valueSummary(value) {
+          const MAX_LENGTH = 12
+          if (typeof value === 'string') {
+            return value.length > MAX_LENGTH
+              ? value.substring(0, MAX_LENGTH) + '...'
+              : value
+          }
+          return value
path: src/lib/commandBarConfigs/applicationCommandConfig.ts
user: login: pierremtb
body: Issue for later: we should turn this into a little util
created_at: 2025-05-08T19:12:31Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1,19 +1,100 @@
 import type { systemIOMachine } from '@src/machines/systemIO/systemIOMachine'
 import type { ActorRefFrom } from 'xstate'
 import type { Command, CommandArgumentOption } from '@src/lib/commandTypes'
+import type { RequestedKCLFile } from '@src/machines/systemIO/utils'
 import { SystemIOMachineEvents } from '@src/machines/systemIO/utils'
 import { isDesktop } from '@src/lib/isDesktop'
-import { kclSamplesManifestWithNoMultipleFiles } from '@src/lib/kclSamples'
-import { getUniqueProjectName } from '@src/lib/desktopFS'
 import {
-  FILE_EXT,
-  IS_ML_EXPERIMENTAL,
-  ML_EXPERIMENTAL_MESSAGE,
-} from '@src/lib/constants'
+  everyKclSample,
+  findKclSample,
+  kclSamplesManifestWithNoMultipleFiles,
+} from '@src/lib/kclSamples'
+import { getUniqueProjectName } from '@src/lib/desktopFS'
+import { IS_ML_EXPERIMENTAL, ML_EXPERIMENTAL_MESSAGE } from '@src/lib/constants'
 import toast from 'react-hot-toast'
 import { reportRejection } from '@src/lib/trap'
 import { relevantFileExtensions } from '@src/lang/wasmUtils'
 import { getStringAfterLastSeparator, webSafePathSplit } from '@src/lib/paths'
+import { FILE_EXT } from '@src/lib/constants'
+
+function onSubmitKCLSampleCreation({
+  sample,
+  kclSample,
+  uniqueNameIfNeeded,
+  systemIOActor,
+}: {
+  sample: any
+  kclSample: ReturnType<typeof findKclSample>
+  uniqueNameIfNeeded: any
+  systemIOActor: ActorRefFrom<typeof systemIOMachine>
+}) {
+  if (!kclSample) {
+    toast.error('The command could not be submitted, unable to find Zoo sample')
+    return
+  }
+  const pathParts = webSafePathSplit(sample)
+  const projectPathPart = pathParts[0]
+  const files = kclSample.files
+
+  const filePromises = files.map((file) => {
+    const sampleCodeUrl =
+      (isDesktop() ? '.' : '') +
+      `/kcl-samples/${encodeURIComponent(
+        projectPathPart
+      )}/${encodeURIComponent(file)}`
+    return fetch(sampleCodeUrl).then((response) => {
+      return {
+        response,
+        file,
+        projectName: projectPathPart,
+      }
+    })
+  })
+
+  const requestedFiles: RequestedKCLFile[] = []
+  // If any fetches fail from the KCL Code download we will instantly reject
+  // No cleanup required since the fetch response is in memory
+  // TODO: Try to catch if there is a failure then delete the root folder and show error
+  Promise.all(filePromises)
+    .then(async (responses) => {
+      for (let i = 0; i < responses.length; i++) {
+        const response = responses[i]
+        const code = await response.response.text()
+        requestedFiles.push({
+          requestedCode: code,
+          requestedFileName: response.file,
+          requestedProjectName: uniqueNameIfNeeded,
+        })
+      }
+
+      if (requestedFiles.length === 1) {
+        /**
+         * Navigates to the single file that could be renamed on disk for duplicates
+         */
+        const folderNameBecomesKCLFileName = projectPathPart + FILE_EXT
+        systemIOActor.send({
+          type: SystemIOMachineEvents.importFileFromURL,
+          data: {
+            requestedProjectName: requestedFiles[0].requestedProjectName,
+            requestedFileNameWithExtension: folderNameBecomesKCLFileName,
path: src/lib/commandBarConfigs/applicationCommandConfig.ts
user: login: franknoirot
body: Yeah this is the thing we went back and forth on 😅 
created_at: 2025-05-08T19:31:11Z
author_association: CONTRIBUTOR

PR comments:
user: login: qa-wolf[bot]
created_at: 2025-05-07T19:50:31Z
body: QA Wolf here! As you write new code it's important that your test coverage is keeping up.
[Click here to request test coverage for this PR!](https://app.qawolf.com/api/coverage-requests/new/eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJwdWxsUmVxdWVzdElkIjoicWxnaGhrNDhxN3RncjZmNHJ4ejJ1M2xkb3ByIiwiaWF0IjoxNzQ2NjQ3NDMwLCJleHAiOjE3NDkyMzk0MzB9.2bPljB1x3RMsk3lIjeEHdWvQng_rmC9Y4qm6_0kG8TO4sg_b4O-9oH04AH7ecuGTDs_kR8J_uG4ZKuJKarXaHvCjIBj4tPoWUCCSjnQ0EIwtpQenXue8U8_jItMu0qcx1BSP0620jb5a7xfAm_y1-gVzMWxHm1I_rqN6_IYPsWCBgQMfZxfEqDEiMV3sKs-uix0cIPgvAChOrksF2CJ2meBhWaiTN6gPYa11q-174gro6fZUz3v-WkzzY9JD1UUhnVq6ZlhcFLYPWu9wfp89nRI-EShQGFsRwaAmXf4socuHRMtNjgRPKyxyX8ewIPtCwdE313qpe_Vk6IBZiQqELA)
author_association: NONE
user: login: vercel[bot]
created_at: 2025-05-07T19:50:32Z
body: [vc]: #MdticuHgsk3hgsCRkh5RJC8FaUJMm6Lv9if4eGkvasA=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJtb2RlbGluZy1hcHAiLCJsaXZlRmVlZGJhY2siOnsicmVzb2x2ZWQiOjAsInVucmVzb2x2ZWQiOjAsInRvdGFsIjowLCJsaW5rIjoibW9kZWxpbmctYXBwLWdpdC1uYWRyby1hZGhvY2Fzc2VtYmx5LWtjbC1zYW1wbGVzLTIwLWtpdHR5Y2FkLnZlcmNlbC5hcHAifSwiaW5zcGVjdG9yVXJsIjoiaHR0cHM6Ly92ZXJjZWwuY29tL2tpdHR5Y2FkL21vZGVsaW5nLWFwcC9BaW9ycWRtdXE1aVZEQnNvWUcxd1dMTnRvQ20zIiwicHJldmlld1VybCI6Im1vZGVsaW5nLWFwcC1naXQtbmFkcm8tYWRob2Nhc3NlbWJseS1rY2wtc2FtcGxlcy0yMC1raXR0eWNhZC52ZXJjZWwuYXBwIiwibmV4dENvbW1pdFN0YXR1cyI6IkRFUExPWUVEIiwicm9vdERpcmVjdG9yeSI6bnVsbH1dfQ==
**The latest updates on your projects**. Learn more about [Vercel for Git ↗︎](https://vercel.link/github-learn-more)

| Name | Status | Preview | Comments | Updated (UTC) |
| :--- | :----- | :------ | :------- | :------ |
| **modeling-app** | ✅ Ready ([Inspect](https://vercel.com/kittycad/modeling-app/Aiorqdmuq5iVDBsoYG1wWLNtoCm3)) | [Visit Preview](https://modeling-app-git-nadro-adhocassembly-kcl-samples-20-kittycad.vercel.app) | 💬 [**Add feedback**](https://vercel.live/open-feedback/modeling-app-git-nadro-adhocassembly-kcl-samples-20-kittycad.vercel.app?via=pr-comment-feedback-link) | May 8, 2025 7:30pm |


author_association: NONE
user: login: codspeed-hq[bot]
created_at: 2025-05-07T20:19:15Z
body: <!-- __CODSPEED_PERFORMANCE_REPORT_COMMENT__ -->
<!-- __CODSPEED_INSTRUMENTATION_PERFORMANCE_REPORT_COMMENT__ -->

## [CodSpeed Instrumentation Performance Report](https://codspeed.io/KittyCAD/modeling-app/branches/nadro%2Fadhoc%2Fassembly-kcl-samples-2.0)

### Merging #6747 will **not alter performance**

<sub>Comparing <code>nadro/adhoc/assembly-kcl-samples-2.0</code> (3aa2346) with <code>main</code> (e960d4d)</sub>



### Summary

`✅ 54` untouched benchmarks  




author_association: NONE