* Rename nightly to staging and have it point to dev infra
Fixes#7421
* To revert: force IS_STAGING
* chmod +x ./scripts/flip-files-to-staging.sh
* Fix mix up dev and prod
* Revert "To revert: force IS_STAGING"
This reverts commit 0178604a55.
* WIP: Use namespace windows-2-cores for build-apps
* WIP: 8-cores to see if it's different
* WIP: macos-6-cores and windows-4-cores
* To revert: test IS_RELEASE
* Change d drive to c for cert
* Maintain job naming
* Revert "To revert: test IS_RELEASE"
This reverts commit 5d4eadce6c.
* Change job names
* Add HammerJS
* Fmt and little type cleanup
* Implement multi-touch through HammerJS
* Add velocity-decay "flick" behavior for orbit
* Update src/clientSideScene/CameraControls.ts
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* tsc fix
* Update src/clientSideScene/CameraControls.ts
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Release KCL 80 (#7391)
* Check for updates button in moar menus & toasts (#7369)
* Check for update button in more menus
Fixes#7368
* Add menubar item
* Another one
* Add Checking for updates... and No new update toasts
* Lint
* Trigger CI
* Update src/main.ts
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* Update electron-builder.yml
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* Update electron-builder.yml
* Moar clean up
---------
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* Format examples in docs (#7378)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Fix some typos in previous PR (#7392)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Remove the untyped getters from std::args (#7377)
* Move last uses of untypeed arg getters
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Rename _typed functions
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* WIP #7226 Fix remove constraints (#7304)
* handle if graphSelections is empty
* fix removeConstrainingValuesInfo by using pathToNodes if available instead of selectionRanges: current selection should not be required to remove constraints
* selectionRanges not needed for removeConstrainingValuesInfo anymore
* fix remove constraint unit test: pass line's pathToNode instead of argument to remove constraint
* Change to use artifact pathToNode (#7361)
* Change to use artifact pathToNode
* Fix to do bounds checking
* move TTC capture to unit test (#7268)
* move TTC capture to unit test
* progress with artifact
* fmt
* abstract cases
* add another case
* add another test
* update snapshots with proper file names
* force to JSON
* fmt
* make jest happy
* add another example and other tweaks
* fix
* tweak
* add logs
* more logs
* strip out kcl version
* remove logs
* add comment explainer
* more comments
* more comment
* remove package-lock line
* Add support for tag on close segment when the last sketch edge is missing (#7375)
* add test
* fix
* Update snapshots
* Update snapshots
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Use namespace for windows e2e tests (#7398)
* Use namespace for windows e2e tests
* Change to the new profile
* Remove TODO
* Commit new snapshots even if some tests failed (#7399)
* Commit new snapshots even if some tests failed
* Update snapshots
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Clean up share link tests (#7372)
* pierremtb/adhoc/clean-up-share-link-tests
* Lint
* WIP labels
* Trigger CI
* Change to skips
* Remove old docs files (#7381)
* Remove old files; no longer generated.
* Update snapshots
* Update snapshots
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jace Browning <jacebrowning@gmail.com>
* #7199 Fix broken links in docs (#7397)
* update broken links
* update github discussion links, fmt
* update comment
---------
Co-authored-by: Jace Browning <jacebrowning@gmail.com>
* Inline engine issue from @Irev-Dev
* Add commented-out test to be implemented later https://github.com/KittyCAD/modeling-app/issues/7403
* Update e2e/playwright/test-utils.ts
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: Andrew Varga <grizzly33@gmail.com>
Co-authored-by: max <margorskyi@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jace Browning <jacebrowning@gmail.com>
Co-authored-by: Nick McCleery <34814836+nickmccleery@users.noreply.github.com>
* fix edge case of sketch not being exited out of properly
* Update e2e/playwright/sketch-tests.spec.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>
Co-authored-by: Jace Browning <jacebrowning@gmail.com>
* Commit new snapshots even if some tests failed
* Update snapshots
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* move TTC capture to unit test
* progress with artifact
* fmt
* abstract cases
* add another case
* add another test
* update snapshots with proper file names
* force to JSON
* fmt
* make jest happy
* add another example and other tweaks
* fix
* tweak
* add logs
* more logs
* strip out kcl version
* remove logs
* add comment explainer
* more comments
* more comment
* remove package-lock line
* handle if graphSelections is empty
* fix removeConstrainingValuesInfo by using pathToNodes if available instead of selectionRanges: current selection should not be required to remove constraints
* selectionRanges not needed for removeConstrainingValuesInfo anymore
* fix remove constraint unit test: pass line's pathToNode instead of argument to remove constraint
* Move last uses of untypeed arg getters
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Rename _typed functions
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Check for update button in more menus
Fixes#7368
* Add menubar item
* Another one
* Add Checking for updates... and No new update toasts
* Lint
* Trigger CI
* Update src/main.ts
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* Update electron-builder.yml
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* Update electron-builder.yml
* Moar clean up
---------
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* Add NodePath to operations
* Change to use nodePath to get pathToNode instead of sourceRange
* Add additional node path unit test
* Update output
* Fix import statement NodePaths
* Update output
* Factor into function
* remove nested <button> elements to avoid dom warning about nested buttons
* keep using Popover.Button to allow popover functionality
* fmt
* match ShareButton margin to main branch to make snapshot tests happy
Previously in a member expression like `foo.x` or `foo[3]`, `foo` had to be an identifier. You could not do something like `f().x` (and if you tried, you got a cryptic error). Rather than make the error better, we should just accept any expression to be the LHS of a member expression (aka its 'object').
This does knock our "parse lots of function calls" from 58 to 55 calls before it stack overflows. But I think it's fine, we'll address this in https://github.com/KittyCAD/modeling-app/pull/6226 when I get back to it.
Closes https://github.com/KittyCAD/modeling-app/issues/7273
* Move import graph to execution
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Refactor artifact handling
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Refactor caching to separate global state from per-module state
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
This brings the `execute_mock` function into line with the `execute` function, which I tweaked in https://github.com/KittyCAD/modeling-app/pull/7351. Now mock execution, like real execution, will always return a properly-formatted KCL error, instead of any possible JS value.
Also, incidentally, I noticed that send_response always succeeds, so I changed it from Result<()> to void.
Specifically this warning:
```
[vite] warning: This case clause will never be evaluated because it duplicates an earlier case clause
| case 'angledLine':
| case 'startProfile':
| case 'arcTo':
| ^
| return fnName
| default:
```
* Fix the black screen of death
* fmt
* make check
* Clean up
* Fix up zoom to fit
* Change how emulateNetworkConditions work
* Do NOT use browser's offline/online mechanisms
* Fix test
* Improve network error messages
* Signal offline when failed event comes in
* Don't use logic on components that only want a loader
* Remove unnecessary pause state transition
---------
Co-authored-by: jacebrowning <jacebrowning@gmail.com>
* fix test
* fix e2e test in another way so it doesnt break unit tests
* Cleanup
* Update src/hooks/useQueryParamEffects.ts
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* hasAskToOpen should only be used if not in desktop
---------
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
# Symptoms
This code produces a big ugly confusing error in the frontend, see #7340.
# Root cause
I added a new test case, with an unknown type. In `ast.snap` under `body[0].declaration.init.ty` there two different `type` fields in the AST node for the type's name, and they have conflicting values Primitive and Identifier.
<img width="602" alt="Screenshot 2025-06-03 at 4 04 55 PM" src="https://github.com/user-attachments/assets/913a0fa0-3e8d-473f-bb64-003d44915be0" />
# Solution
Change the `enum PrimitiveType` variant from `Named(Node<Identifier>)` to `Named { name: Node<Identifier> }` so that the fields nest differently.
Now the error correctly points out to the user that the type `NotARealType` can't be found. Much better error message that shows the user the problem.
# Alternative solutions
Stop the duplicated JSON fields altogether. I tried this previously in https://github.com/KittyCAD/modeling-app/pull/4369 but it was very involved, and I didn't think it was worth it. Maybe I should reopen that PR and solve this properly.
Closes#7340
I ignored some new clippy lints about large differences between enum variants.
We can always revisit these later (the compiler suggests boxing them so
that the enum variants are similar size)
There's some bug in the frontend or KCL somewhere, which results in the TypeScript frontend sending an AST (serialized to JSON) to the KCL executor, but the JSON cannot be deserialized into an AST. If this happens, it's a bug in ZDS, not a user error.
The problem is that this sort of error will cause the frontend to silently stop rendering KCL, and it won't show the user any errors. They need to open up the console and look at the error there, and even if they do, it's hard to understand.
This PR changes how we report these unexpected errors due to bugs in ZDS. ZDS should not silently stop working, it should at least print a half-decent error like this:
<img width="527" alt="nicer error" src="https://github.com/user-attachments/assets/1bb37a64-0915-4472-849c-d146f397356b" />
## Fix
Right now, the wasm library exports a function `execute`. It previous returned an error as a String if one occurred. The frontend assumed this error string would be JSON that matched the schema `KclErrorWithOutputs`. This was not always true! For example, if something couldn't be serialized to JSON, we'd take the raw Serde error and stringify that. It wouldn't match `KclErrorWithOutputs`.
Now I've changed `execute` so that if it errors, it'll returns a JsValue not a string. So that's one check (can this string be deserialized into a JSON object) that can be removed -- it'll return a JSON object directly now. The next check is "does this JSON object conform to the KclErrorWithOutputs schema". To prove that's correct, I changed `execute` to be a thin wrapper around `fn execute_typed` which returns `Result<ExecOutcome, KclErrorWithOutputs>`. Now we know the error will be the right type.
* Fix orbit style setting not updating in camControls
* Break apart camera movement tests, add trackball to orbit one
* I don't think zoom was actually testing changes, this fixes that
* test refactor: pass in expected cam pos, not its inverse
* Lints
* Lint fix broke the test, fix fix
* Gah biome whyyy did you format other test names like that?