Closes https://github.com/KittyCAD/engine/issues/3494. Thanks to @nadr0 for helping on the JS side.
If users set their units, the grid will stop auto scaling, and instead will be set to 10 of whatever unit they used.
If users set their units, and those units are metric, then it'll include a scale bar (see screenshot). Imperial units won't have that bar.
This behaviour is configurable via settings.
## Limitations
- The scale bar below the grid cannot be disabled in metric units, and cannot be enabled in imperial units
<img width="1690" alt="Screenshot 2025-06-05 at 7 51 41 PM" src="https://github.com/user-attachments/assets/c597087c-f96d-4c30-95f4-b3d8ba2b5567" />
* Enable optional arguments in point-and-click Sweep
Fixes#7578
* Fix bug and add e2e test step
* Fix review not triggering bug and e2e test
* WIP: Enable optional arguments in point-and-click Loft
* Add edit flow for loft
* WIP: e2e test and fix
* Got it
* Got it v2 🤦
* use face edge info for some mirrors
* add functionality for other mirror function
* Fix to create new Sketch when mirror results in a new path
* use the original ids and clone the sketches
* remove mirror param
* clippy fix
* debuggin, rm yarn
* Revert "remove mirror param"
This reverts commit a848e243f8.
* use arrbitrary edge_id as sketch mirror id
* additinoal clenaup
* Update rust/kcl-lib/src/std/mirror.rs
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* set .mirror for continuous case
* fix warning
* works without the for loops
* add error handling
* remove duplicate setter
* rm unused var
* clenaup
* unused import
* remove unused let
* Update snapshots
* Update snapshots
* cleanup
* update sim tests
---------
Co-authored-by: gserena <serena@zoo.dev>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add building the artifact graph in mock execution
* Update output
* Add updating the artifact graph after mock execution
* Fix spelling
* Fix to return it all the way
* Fix to not make artifact fields undefined in TS
* WIP: Add bidirectional args to point-and-click Extrude
Will eventually close#7495
* Wire up edit flow for symmetric
* Show skip true args in header in review phase
* Add bidirectionalLength
* Make currentArg always part of header
* WIP
* Add twistAng
* Proper optional args line in review
* Labels in progress button and option arg section heading
* Clean up extrude specific changes
* Clean up to separate from #7506
* Clean up to separate from #7506
* More clean up across branches
* More UI polish
* Remove options bool icon
* Fix labels for tests
* Upgrade e2e tests to cmdBar fixtures with fixes
* More fixes
* Fixed up more tests related to sweep behavior change
* Fix nodeToEdit not having hidden: true on Shell
* Add typecheck
* WIP: footer buttons
* back to reg width
* Clean up
* Update snapshots
* Update snapshots
* Clean up
* Fix tests and remove label
* Refactor
* Fix offset plane test
* Add CommandBarDivider
* Fix step back
* Update snapshots
* Add comment
* Fix it, thanks bot
* Clean up and inline optional heading
* Little case tweak
* Update src/components/CommandBar/CommandBarReview.tsx
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* Rename to CommandBarHeaderFooter
* Rename to CommandBarHeaderFooter
* Clean things up and fix edit
* Add test
* Revert something quick
* Reorg args to match kcl order
* Clean up edit arg retrieval error checks
* Lint
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
# Background
The KCL interpreter (written in Rust) reports errors, lints and other diagnostics as UTF-8 source range offsets. JavaScript, including CodeMirror, represents source code as UTF-16 strings.
# Problem
This means the UTF-8 source ranges sent from Rust don't correspond to the same text in the JS UTF-16 GUI. At best, this means the source ranges highlight the wrong thing if you use non-ASCII characters. At worst, it can cause exceptions by trying to highlight a range that doesn't even exist.
Here's the problem, on main:
<img width="178" alt="Screenshot 2025-06-20 at 11 52 03 AM" src="https://github.com/user-attachments/assets/9a4e75bf-965f-49d8-b238-8868b35912a1" />
# Solution
We define a KCL SourceRange as _always_ being UTF-8. This means if a source range is constructed in JS, it should be converted to UTF-8. When these ranges are converted into CodeMirror diagnostics, they should be converted to UTF-16.
Here's the same code as above, but on this branch:
<img width="170" alt="Screenshot 2025-06-20 at 11 50 55 AM" src="https://github.com/user-attachments/assets/a5b971c0-0b02-4acd-8fcf-5a133331682b" />
Closes https://github.com/KittyCAD/modeling-app/issues/4327
* WIP: Add bidirectional args to point-and-click Extrude
Will eventually close#7495
* Wire up edit flow for symmetric
* Show skip true args in header in review phase
* Add bidirectionalLength
* Make currentArg always part of header
* WIP
* Add twistAng
* Proper optional args line in review
* Labels in progress button and option arg section heading
* Clean up extrude specific changes
* More UI polish
* Remove options bool icon
* Fix labels for tests
* Upgrade e2e tests to cmdBar fixtures with fixes
* More fixes
* Fixed up more tests related to sweep behavior change
* Fix nodeToEdit not having hidden: true on Shell
* Add typecheck
* WIP: footer buttons
* back to reg width
* Clean up
* Clean up
* Fix tests and remove label
* Refactor
* Fix offset plane test
* Add CommandBarDivider
* Fix step back
* Add comment
* Fix it, thanks bot
* Clean up and inline optional heading
* Little case tweak
* Update src/components/CommandBar/CommandBarReview.tsx
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* Rename to CommandBarHeaderFooter
---------
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* Add the 'Download the app' button back on web
Fixes#7527
* Fix staging release link in desktop app
Fixes#7513
* Update snapshots
* Update snapshots
* Update snapshots
* Add ref parsing logic and unit test
* Oops
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add edit flow to named parameters, show their value in feature tree
* Amend a feature tree test to include editing a parameter
* Enforce disallowing "create new variable" in edit parameter flow
* Add wrapping behavior! Sorry forgot to commit this
* Update src/machines/commandBarMachine.ts
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
---------
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Both human and LLMs want to write KCL code in non-English languages. This is important and we should support it.
Note that errors are currently a bit broken with non-ASCII identifiers, see #4327
* Add the 'Download the app' button back on web
Fixes#7527
* Update snapshots
* Update snapshots
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* move useHotkey for undo/redo into App
* _editorView should be private
* get editorView should be a real get method for consistency
* resolve tsc errors
* fmt
* setView, setState are not exposed
* make undo work without editorview when kcl pane is closed
* lint
* circular deps
* resolve circular deps
* fix undo being 1 step late
* unrelated console.warn removed
* fix undo when code pane is closed during editing
* cleanup
* allow undo to get beyond when code editor has been mounted
* fix up clearHistory
* add test for testing Undo with closed code pane
* Resurrect this branch with an initial commit
* Add telemetry to global default items
* Add credit progress bar to status bar
* Add selection info to status bar
* Add help menu to "local" side
* Rename statusBarItem utils
* Delete LowerRightControls, now unused
* fix lints
* Update snapshots
* Add test-id to network health indicator, which all E2E tests rely on
* Update src/components/StatusBar/StatusBar.tsx
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* Fix a couple little issues with the e2e tests
* Fix gizmo e2e tests (it moved) and network health test (it should not be on home page)
* More tweaks to accomodate changes to network health indicator
We made use of two test ID's to make Playwright aware of the state, one
of which was on the icon. Now that we want to normalize usage of the
status bar along a more limited API, that became a not possible. This
just tweaks some test code that relied on that fact.
* Fix lints
* Update snapshots
* Re-run CI
* Update snapshots
* Update snapshots
* Test fixes, label logic tweaks
* Update snapshots
* Update snapshots
* Fix up last few tests hopefully. Relative path syntax failed on windows
* Relative paths are behaving badly on Windows, use the old code here
* Update snapshots
* Update snapshots
* Tweak y-value to work on all platforms, ubuntu didn't like 438
* Fix tooltip and popover alignment on NetworkMachineIndicator
* Remove dire warning comment
* Update src/components/StatusBar/defaultStatusBarItems.tsx
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* @lee-at-zoo-corp feedback, pull hooks out of UI code
* Re-run CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* separate handling of tangentialArc with angle and radius args
* make previousEndTangent available in segment input for handling tangentialArc with angle/radius
* start adding support for editing tangentialArc with angle, radius
* draw tangentialArc sketch when using angle, radius
* fix getTanPreviousPoint when using tangentialArc with angle, radius
* fix case of unwanted negative angles when calculating angle for tangentialArc
* lint
* add test for tangentialArc dragging with andle, radius
* lint, fmt
* fix getArgForEnd for tangentialArc with radius, angle
* renaming vars
* Prompt for temporary workspace when loading external sample
* Always go into temporary workspace when loading sample
* Always go into temporary workspace even on external links
* x
* Add tests
* Fix typo
* Update snapshots
* Update snapshots
* Fix tests that now strip code param
* Fix test
* Weird...
* fmt
* x
* Add await
* agh
* Do not clear query parameters, causes more problems than not
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add libm dependency
* Change to use libm for trig functions
* Remove redactions for floating point
* Update output
* Use clippy to prevent stdlib math sneaking back in
---------
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
* Change to use deterministic artifact graph
* Update output to use the new order
* Fix to clear everything when scene is cleared
* Fix lots
* Update artifact graph output for the last time
* Delete unused sorting code
* Remove unneeded cfg
* Fix to preserve top-level artifacts when there's an error
* Update output after error fix
* Add better doc comments
* Remove duplicate global operations
* Update comments
* Update ignored tests that were flaky
* Update graph for new samples after rebase
* Fix test assertion message
@franknoirot @jtran and I decided that the `extrudeTwist()` function (which I added in https://github.com/KittyCAD/modeling-app/pull/7480) would be better as an optional case of the normal `extrude` function. Doing it this way means less work for the frontend team.