* Fix test settings to actually get used
Co-authored-by: Frank Noirot <frank@zoo.dev>
* Export file size changed out from under us again, relax this test to just be above a reasonable size
* Missed on updated export expectation
* Wrong check, should just be greater than
* Fix E2E test, remove console log
* fmt
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Sketchy rectangle commit fix
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Re-run CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"
This reverts commit 2ace7a3b0e.
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Bump timeouts for snapshots
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Re-run CI
---------
Co-authored-by: Frank Noirot <frank@zoo.dev>
Co-authored-by: Frank Noirot <frank@kittycad.io>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Revert "KCL: Fix duplicate 'type' key"
This reverts commit f650281855.
* Revert "Remove duplicate "type" field in the snapshots (#4211)"
This reverts commit 824b4c823e.
* Remove duplicate "type" field in the snapshots
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Confirm
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* Add syntax highlighting for comparison operators
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Confirm
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Split builds per os and per architecture to minimize artifacts size
Fixes#3920
* Add missing if case; Add nightly build updater support
* Fix linux x86_64
* Improve upload filtering
* Attempt to fix matrix
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Test release builds
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Clean up
* Clean up win arm64 builds
* Add temp fake-publish to check on artifacts
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Trigger CI
* Fix win arm
* Clean up
* Remove forced release builds
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Addresses #4080. (Not ready to close it yet.)
# Important
Requires a fix for #4147 before it can work in ZMA.
# Overview
```kcl
// numbers.kcl
export fn inc = (x) => {
return x + 1
}
```
```kcl
import inc from "numbers.kcl"
answer = inc(41)
```
This also implements multiple imports with optional renaming.
```kcl
import inc, dec from "numbers.kcl"
import identity as id, length as len from "utils.kcl"
```
Note: Imported files _must_ be in the same directory.
Things for a follow-up PR:
- #4147. Currently, we cannot read files in WebAssembly, i.e. ZMA.
- Docs
- Should be an error to `import` anywhere besides the top level. Needs parser restructuring to track the context of a "function body".
- Should be an error to have `export` anywhere besides the top level. It has no effect, but we should tell people it's not valid instead of silently ignoring it.
- Error message for cycle detection is funky because the Rust side doesn't actually know the name of the first file. Message will say "b -> a -> b" instead of "a -> b -> a" when "a" is the top-level file.
- Cache imported files so that they don't need to be re-parsed and re-executed.
* CI: Remove rust-cache from static analysis
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Look at this (photo)Graph *in the voice of Nickelback*
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Fixes#4150 by ignoring whitespace before a colon just like how whitespace after a colon is already ignored.
Added snapshot parser::parser_impl::snapshot_tests::bh for a kcl snippet that has whitespace before a colon.
Co-authored-by: 49fl <ircsurfer33@gmail.com>
Closes#4021
Allows array ranges (e.g., `[0..10]`) to take expression instead of just numeric literals as their start and end values. Both expressions are required (we don't support `[0..]`, etc.).
I've created a new kind of expression in the AST. The alternative was to represent the internals of an array as some kind of pattern which could initially be fully explicit or ranges. I figured the chosen version was simpler and easier to extend to open ranges, whereas the latter would be easier to extend to mixed ranges or other patterns. I chose simpler, it'll be easy enough to refactor if necessary.
Parsing is tested implicitly by the tests of execution and unparsing.
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
Previously, map was wrapping KCL values in a JSON object unnecessarily. The new `double_map` test would emit this error:
```
Syntax(KclErrorDetails {
source_ranges: [SourceRange([31, 32])],
message: "Invalid number: {\"type\":\"UserVal\",\"value\":1.0,\"__meta\":[{\"sourceRange\":[31,36]}]}"
})
```
In other words, the second `map` statement is being passed an array of JSON STRINGS, not an array of numbers.
The strings contain JSON stringified representations of user values which are numbers.
Bug is now fixed.
Josh Gomez requests pattern calculations take the total number of instances,
not the number of extra repetitions to do. This is how we designed the
patternTransform API, but we didn't do that for patternLinear/Circular.
* Add collapsible element to updater toast notification showing release notes
* Temp create release artifacts to test updater
* Fix tsc error
* Fix some styling, make release notes not appear if no notes are present
* Add component tests
* Remove test release builds
---------
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* add support for opposite and adjacent edges
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* update playwright
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* update unit tests
* enable button state checker for selections
* typos
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* trigger ci
* fix typo
* remove leave(node)
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* typo
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* pull getEdgeTagCall into a utility function
* mask model-state-indicator
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Rerun CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Rerun CI
* screenshot fix
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* Don't mutate the user's `codeBasedSelections` when they apply a multi-selection constraint
* Fix to not mutate the input parameter
* Format
---------
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* Sort selections in order of appearance before applying `transformSecondarySketchLinesTagFirst`
* Add an integration test for this sorting behavior
* Remove console logs from test
* Upload release-notes.md on release
Contributes to #3984
* Test release builds with updater-test-release-notes
* Change to releaseNotesFile conf, tested locally
* Clean up for merge
* Add a loading toast when update download begins
* Temporarily turn on artifact builds to test
* fmt
* Oops forgot to rename where I used a type
* Update src/index.tsx
* Update src/index.tsx
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Add an `update-error` listener
* Flatten autoupdater hooks
* Revert "Temporarily turn on artifact builds to test"
This reverts commit e2e1991977.
* Switch branch to build-publish-apps on to this one
* Make the loading toast not attempt to display a version number
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* fmt
* Update .github/workflows/build-test-publish-apps.yml
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Add ID generator to ExecState
* Change default plane IDs to be hardcoded
* Fix lint warning
* Add exposing ID generator as output of executor
* Change to use generated definition of ExecState in TS
* Fix IdGenerator to use camel case in TS
* Fix TS type errors
* Add exposing id_generator parameter
* Add using the previously generated ID generator
* wip: Add display of feature tree in debug pane
* Remove artifact graph augmentation
* Change default planes to use id generator instead of hardcoded UUIDs
* Fix to reuse previously generated IDs
* Add e2e test
* Change feature tree to be collapsed by default
* Remove debug prints
* Fix unit test to use execState
* Fix type to be more general
* Remove outdated comment
* Update derive-docs output
* Fix object display component to be more general
* Remove unused ArtifactId type
* Fix test to be less brittle
* Remove codeRef and pathToNode from display
* Fix to remove test.only
Co-authored-by: Frank Noirot <frank@zoo.dev>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Move plane conversion code to be next to type
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)"
This reverts commit 3455cc951b.
* Rename file
* Rename components and add doc comments
* Revive the collapse button
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Confirm
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Confirm
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Confirm
---------
Co-authored-by: Frank Noirot <frank@zoo.dev>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* bug: fixing multiple state issues with the engine and modeling app to enable/disable planes/axis/delete code
* fix: yarn tsc fmt lint xgen
* fix: adding a comment back that I deleted on accident
* fix: adding formatting back?
* fix: reverting syntax
* fix: removing click line tool because the line tool is automatically selected. Clicking this will exit
* fix: Fixed a E2E test that had a line tool workflow with no points
---------
Co-authored-by: Frank Noirot <frank@zoo.dev>
Co-authored-by: 49fl <ircsurfer33@gmail.com>
* fix: added more documentation on the cut and release process
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Reload user settings when changed externally
* Fix to not use any
* Make sure listener doesn't already exist
* Fix up projects reloading
---------
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* tentatively adding this
* Update src/components/ModelingMachineProvider.tsx
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* Show shortcut in UI dialog
* Move command into modelingMachine action
* Add a menu item to the view menu
* Switch gizmo tests to use "deprecated" test setup in prep for new fixture-based test
* Add e2e test for center view to selection
* Bump @kittycad/lib to latest and fix tsc
* Bump @kittycad/lib to v2.0.7 to fix electron building
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
---------
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: Frank Noirot <frank@kittycad.io>
Co-authored-by: 49fl <ircsurfer33@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Frank Noirot <frank@zoo.dev>
* Add syntax highlighting for if-else
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Confirm
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix CodeMirror syntax highlighting of variables without keyword
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Confirm
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* chore: adding Kurt's fix for electron in the new CI CD files. Adding a forced failure to test
* chore: increasing max retry for electron to match the playwright browser retry count
* fix: debugging ci cd for playwright last report
* fix: changing the output dir for snapshot to a custom one to not overwrite the previous job runs failure
* fix: found out hidden files are excluded automatically, was a breaking change :(
* fix: output typo
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Delete test-results-snapshots/.last-run.json
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* fix: cleanup
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Delete test-results-snapshots/.last-run.json
* fix: removing this folder, should have been git ignored
* fix: do not need these anymore since the hidden files is fixed
* fix: removed hard coded failure for debugging
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* chore: saving off package.json progress unit tests fail in main
* fix: implementing a one liner for unit tests
* fix: renaming test:unit:local
* chore: adding playwright tests
* fix: making package.json not destructive to keep same pipeline commands for now
* fix: reordering
* fix: added tags for OS tests, moved kill-port to dev depen
* fix: OS skipping at tag level
* fix: lint, fmt, tsc, etc...
* Look at this (photo)Graph *in the voice of Nickelback*
* fix: new formatting
* fix: removing the ci copy, do not like it
* Look at this (photo)Graph *in the voice of Nickelback*
* chore: updating readme with explanation on the commands for CI CD simulation locally
* fix: package.json command for unit test, removing cached breaking cache in unit tests
* fix: fixing copy and typos in README.md for CI CD section
* fix: adding a duplicate command for a better name. CI CD will use it in a future PR
* chore: trying to clean up the copy and commands for CI CD tests
* chore: porting the bash code in the YAML to a bash script then using matrix permutations to control the runtime
* fix: typos
* fix: another typo, missed these went porting to the bash script logic
* fix: I think I need the checkout action since it has the repo code?
* fix: wrote absolute path not the relative hidden path, ope
* fix: does this cache give me the yarn install of playwright?
* fix: yarn cannot find the binary, use the yarn command
* fix: remove all uses...?
* chore: adding bash script for electron runtimes
* fix: copy cleanup
* fix: typo when copy and pasting the exclude logic, ope
* fix: this is wrong
* fix: build:wasm is a requirement for yarn tsc
* fix: reorder?
* fix: renaming integrations to e2e
* fix: windows is complaining about a pipe issue in the bash script?
* fix: escaping double quotes in windows?
* chore: consolidating commands into 1 file and easier YAML configuation for electron
* chore: mapped multiple OS playwright browser into a single bash script
* fix: removing old bash scripts, renaming matrix jobs
* fix: missed deleting this when I added the if statements.
* chore: removing unused job, xstate typegen more more since v5
* fix: trying to get these two tests to pass on first try
* fix: auto fixes
* fix: removing old unit test command
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Log any Errors to stderr
This isn't perfect -- in fact, this is maybe not even very good at all,
but it's better than what we have today.
Currently, when we get an Erorr back from the WebSocket, we drop it in
kcl-lib. The web-app logs these to the console (I can't find my commit
doing that off the top of my head, but I remember doing it) -- so this
is some degree of partity.
This won't be very useful at all for wasm usage, but it will fix issues
with the zoo cli silently breaking with a "WebSocket Closed" error --
which is the same issue I was solving for in the desktop app too.
In the future perhaps this can be a real Error? I'm not totally sure
yet, since we can't align to the request-id, so we can't really tie it
to a specific call (yet).
* add to responses
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* add a test
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* clippy[
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* empty
* fix error
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates tests
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* docs
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
Previously variable declaration required a keyword, e.g.
```kcl
let x = 4
const x = 4
var x = 4
```
These were all valid, and did the exact same thing. As of this PR, they're all still valid, but the KCL formatter will change them all to just:
```kcl
x = 4
```
which is the new preferred way to declare a constant.
But the formatter will remove the var/let/const keywords.
Closes https://github.com/KittyCAD/modeling-app/issues/3985
* Make web app warning banner in the middle of the screen and simpler
* Some dark mode styles were whack
* Better wording for second sentence
* Update text in popup and appearance of download link
* Make download link first in focus order
* chore: saving off package.json progress unit tests fail in main
* fix: implementing a one liner for unit tests
* fix: renaming test:unit:local
* chore: adding playwright tests
* fix: making package.json not destructive to keep same pipeline commands for now
* fix: reordering
* fix: added tags for OS tests, moved kill-port to dev depen
* fix: OS skipping at tag level
* fix: lint, fmt, tsc, etc...
* Look at this (photo)Graph *in the voice of Nickelback*
* fix: new formatting
* fix: removing the ci copy, do not like it
* Look at this (photo)Graph *in the voice of Nickelback*
* chore: updating readme with explanation on the commands for CI CD simulation locally
* fix: package.json command for unit test, removing cached breaking cache in unit tests
* fix: fixing copy and typos in README.md for CI CD section
* fix: adding a duplicate command for a better name. CI CD will use it in a future PR
* fix: this is wrong... removing it
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"
This reverts commit f767dd46d4.
* fix: typos in README.md
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
* wip on this
* wip on kcl-to-core tool
* Update conn_mock_core.rs
* stopping point
* wip
* use enum for is_mock for added versatility
* get at least circular patterns working to finish POC
* fmt
* fmt part 2
* Update Cargo.lock
* quick fix for tests
* quick fix
* more fixes
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* get more cases of this working
* Update src/wasm-lib/kcl-to-core/src/conn_mock_core.rs
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* kcl core gen plane code by default
* fmt
* fix build?
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Fix clippy errors
* Remove unneeded clippy allow
* post merge build fix attempt
* Add missing indexmap dependency
* Fix to use IndexMap instead of HashMap
* Migrate to kittycad-modeling-cmds
* fix build
* fmt
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"
This reverts commit 991cdde15e.
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)"
This reverts commit a4ae03c740.
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)"
This reverts commit 9a082e7c9f.
* Regenerate derive_docs
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)"
This reverts commit a8bdb35627.
* Fix e2e test failing by masking state indicator
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Confirm snapshot change
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Confirm snapshot change
* Fix build from last merge with main
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
Co-authored-by: Frank Noirot <frank@zoo.dev>
* Fix e2e test failing by masking state indicator
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Confirm snapshot change
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Confirm snapshot change
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
I had to revert https://github.com/KittyCAD/modeling-app/pull/4031 because it broke syntax highlighting. This is the same PR, but updated to fix syntax highlighting.
Highlighting broke because the KCL LSP could not determine how to autocomplete the `map` function. The first argument of `map` is `[KclValue]` and the LSP doesn't know any good suggestions for "any KCL value", so it error'd out. I am using the value `[0..9]` for this case now. Tested that syntax highlighting works again.
* Split builds per os and per architecture to minimize artifacts size
Fixes#3920
* Add missing if case; Add nightly build updater support
* Fix linux x86_64
I think when we make reduce work with objects,
we'll either keep the same function and make it
polymorphic, or we'll have namespaces/modules and
use Array.reduce and Object.reduce. Either way this
name can be changed.
* fix new file sketch mode issue
* initial extron app fixture
* Add tests for exiting sketch mode on file tree actions
* organise files
* before all after all clean up
* tweak after each
* makes typedKeys as unsafe
* update mask for draft line snapshots
* fix mask
* add fix again
* Preserve paragraph breaks in the KCL docs
The KCL docs on the website are hard to read, because they concatenate all
the paragraphs in my nicely-formatted docstrings in the stdlib functions
into one big paragraph. PR should fix this.
* Fix arc docs being split into two lines
The 'summary' section of the docs has a maximum line length, and if you
go over that length, your summary gets split into two lines weirdly.
Makes the arc docs shorter, so the summary is back to one line like
it should be.
* Update docs for pattern transform
* Add cameraProjection setting
* Add UI to toggle the user-level projection setting.
* Make cameraProjection setting respected at startup
* Add an E2E test for the perspective toggle
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Don't force user back into perspective when exiting sketch
* Make the projection setting more searchable
* Make `current` label apply to the default option if not set
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Re-run CI
* Ohh *cargo fmt*
* @lf94 feedback, fix found toggling bug, make command bar instantly toggle setting
* Roll back the instant toggling behavior, it breaks the tests
* Make ortho the default, keep tests using perspective
* Move projection below camera controls setting
* Fix up gizmo tests, which broke because the gizmo moved
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Look at this (photo)Graph *in the voice of Nickelback*
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: 49fl <ircsurfer33@gmail.com>
* Implement basic unit overwriting, update tests
* fix eslint warning
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"
This reverts commit 2ecf012c25.
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* more recursive
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates;
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* add the format
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* get the descriptions again
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Also, there were some executor unit tests to test pattern transform. I realized they make more sense as example tests in the KCL stdlib for pattern transform. This way, they show up in the docs too. So I removed the unit tests (the examples now test these features instead).
Big thanks to Serena for fixing this on the engine side!
Also looks like the pictures from artifact graph were deleted, so GH Actions wants to put it back.
* Add event listener for theme media query to update engine theme
* tsc fixes
* Add a Playwright test for UI and engine theme switch
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Pattern transforms now have a new `rotation` parameter, letting you rotate each instance of the shape. Currently only rotation around the local origin (i.e. rotating the object around the center of its own bounding box) works correctly. Rotating around a global origin (i.e. center of the scene) will be fixed on the server side soon.
* sketch on chamfer start
* working
* step app from getting in weird state when selection face to sketch on
* sketch on chamfer tests
* clean up
* fix test
* fix click selections for chamfers, add tests
* fixture setup (#3964)
* initial break up
* rename main fixture file
* add more expect state pattern
* add fixture comment
* add comments to chamfer function
* typos
* works without pipeExpr
* Add custom updater model back after electron migration
Fixes#3872
* Enable release builds (temp)
* Lint & clean up
* Change approach to no user input, heads up with toast
* Re-enable prod builds
* Working toasts
* Only one toast
* Add missing type
* Clean up before review
* New toast design test
* Clean up
* Use theme colors, add link to changelog
---------
Co-authored-by: Frank Noirot <frank@kittycad.io>
* Add a shell script to get the list of KCL samples into the app
* Add support for overwriting current file with sample
* Move these KCL commands down into FileMachineProvider
* Add support for creating a new file on desktop
* Make it so these files aren't set to "renaming mode" right away
* Add support for initializing default values that are functions
* Add E2E tests
* Add a code menu item to load a sample
* Fix tsc issues
* Remove `yarn fetch:samples` from `yarn postinstall`
* Remove change to arg initialization logic, I was holding it wrong
* Switch to use new manifest file from kcl-samples repo
* Update tests now that we use proper sample titles
* Remove double-load from units menu test
* @jtran feedback
* Don't encode `https://` that's silly
* fmt
* Update e2e/playwright/testing-samples-loading.spec.ts
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Test feedback
* Add a test step to actually check the file contents were written to (@Irev-Dev feedback)
---------
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Show user code while logging in
* fmt
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* @jtran feedback
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"
This reverts commit 5ba9e4351a.
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* circle
* fix another example
* fix bad comment
* toPoint fix
* cargo fmt
* resolve most of the tests
* fix last test
* missed circle in bracket
* remove console error
* fmt
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* trigger ci
* remove three dot menu for circle
* make sure circle can be extruded
* fix up after merge
* add extrude test for circle
* clean up
* typo
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"
This reverts commit 03f8eeb542.
* update docs again
* cmd bar test serialisation improvements
* tiny clean up
* fix after: Replace kittycad crate with kittycad-modeling-cmds
* fmt
* rename fix
* Update src/lib/toolbar.ts
Co-authored-by: Frank Noirot <frank@zoo.dev>
* add another error to list
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* image updates
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)"
This reverts commit 505bb20bea.
* update markdown
* skip un reproducable windows test failure
* rust review
* leave issue todo comment
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Frank Noirot <frank@zoo.dev>
* WIP: No more empty outputs from modeling API
Part of https://github.com/KittyCAD/modeling-api/issues/518
* Remove unused import
* Keep Empty in the API
* Fix TS type error due to upgrade to ts_rs 10.0.0
* Fix warning about unused use
* Fix more type errors from ts_rs upgrade
* De-flake settings override desktop test
* Update export test file sizes
---------
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: Frank Noirot <frank@kittycad.io>
* bump the world
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"
This reverts commit e095d2a990.
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* dumb ass logic bug with edge cuts
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* change order
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"
This reverts commit 1ad9eb315e.
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)"
This reverts commit 4004c9c1db.
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"
This reverts commit 57d0d05d06.
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix: fixing logic around setting the perspective and position of perspective camera when leaving sketch mode
* fix: typo
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"
This reverts commit 60b12ffc54.
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)"
This reverts commit 9ab973c6c4.
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* remove unused vars
* fix: fixed the positions of the mouse clicks since the zoom level has changed?
* fix: updating test to make it work with my new zoom level
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
* Move file tree deletion tests into file-tree.spect.ts
* Move other file tree tests into file-tree.spec.ts
* Add tests that prove we show a deletion confirmation for folders
* Fix lint warning
lib.rs/kittycad-modeling-cmds is the source of our Modeling API. It gets included in our backend APIs, and those APIs generate OpenAPI specs which are read by `openapitor` which generates the lib.rs/kittycad crate. So basically, our modeling app is using the _generated code_ instead of the _handwritten code_.
This sucks -- if you add a new field to the modeling-api crate, you have to merge PRs to the engine, api-deux, and kittycad.rs before finally you can get the new field into the modeling-app. I was pretty embarrased when @mlfarrell asked how to get a new field into the modeling app and had to explain this whole bullshit cycle. Let's fix it.
Switching to use the kittycad-modeling-cmds (aka kcmc) crate directly should speed up our dev cycle.
* Bug fix: make dismiss during export not fire success toast
* Fix export fail test, since this failure errors early now
* Remove throttling from send side
* Move toast.loading out to when first engine command is sent, so it is shown immediately
* Use shared, named constants for toast messages
* Hook up a couple other error toasts to the `pendingExport.toastId`
* fix: just a one liner? forcing a revolve to be an extrude artifact
* fix: first step in renaming ExtrusionArtifact to SweepArtifact
* fix: renaming extrusion to sweep for a few things? need to do another pass
* fix: cleaning up comments, fixing unit tests for new key names
* fix: unit test update
* fix: removing TODO comments that are not needed
* fix: renaming more extrude/extrusion values to sweep
* fix: test:nowatch -u to update the vitests
* Look at this (photo)Graph *in the voice of Nickelback*
* fix: removing TODOs
* fix: forgot to update the extrudeEdge string in other files
* chore: adding e2e test to see if users can sketch on revolved face
* fix: removing garbage string
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* chore: Implemented a executeAst interrupt to stop processing a KCL program
* fix: added a catch since this promise was not being caught
* fix: fmt formatting, need to fix some tsc errors next.
* fix: fixing tsc errors
* fix: cleaning up comment
* fix: only rejecting pending modeling commands
* fix: adding constant for rejection message, adding rejection in WASM send command
* fix: tsc, lint, fmt checks
* feat: first pass over revolve with basic hard coded X axis
* fix: updated revolve status for DEV only
* fix: adding some TODOs to warn others about the Revolve MVP
* fix: fmt, lint, tsc checks
* fix: codespell got me
* fix: xstate v5 upgrade
* fix: removing this fix for a different PR. Not needed for initial MVP
* fix: renaming extrude function to sweep since it fixes extrude and revolve now
* fix: updating selection logic to support revolve
* fix: renaming extrude to sweep since it adds revolve
* fix: swapping as for type in function parameters
* fix: updated from object destruct to structuredClone
* fix: addressing PR comments
* fix: one other typo for return value of revolve
* Make light theme borders more contrasting
* Update icons in sidebar
* fix disabled styles on ActionIcon
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Update src/components/CustomIcon.tsx
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* trigger CI
* fmt
* Update "Make" button test locator to be more specific
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
Co-authored-by: 49fl <ircsurfer33@gmail.com>
* Add ExecState that combines ProgramMemory and DynamicState
* Remove unneeded clones
* Add exec_state parameter to all KCL stdlib functions
* Move pipe value into ExecState
* Add test for pipe substitution not leaking into function calls
* KCL: Better message on assertEqual function
Also add a new no-visual test for performance testing.
* Fix new array module to use ExecState
---------
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
* Add updater-test back after electron migration
Fixes#3871
* Separate updater-test files more
* Push dummy 0.999.999 version to updater-test
* Push 0.255.255
* Revert dummy push commits
* Clean up
* initial console error whitelist
* add testInfo to the beforeEach
* set COLLECT_CONSOLE_ERRORS
* add more console errors
* temporarily set max_retrys to 0 instead of 4
* more console errors
* revert max retries back to 4
* add 'necessary' to complete sentence
* tweak env var name
* update whitelist
* test disabling flag
* update whitelist
* lint + enable for chrome only
* re-enabled on CI
* re-order whitelist
* create failOnConsoleErrors
* try update list
* add more to list
* tweak list again
* tweak again<
* tweak again
* tweak
* testInfo
* increase timeout
---------
Co-authored-by: ryanrosello-og <ry@zoo.dev>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
Adds an `arrayReduce` function to KCL stdlib. Right now, it can only reduce SketchGroup values because my implementation of higher-order KCL functions sucks. But we will generalize it in the future to be able to reduce any type.
This simplifies sketching polygons, e.g.
```
fn decagon = (radius) => {
let step = (1/10) * tau()
let sketch = startSketchAt([
(cos(0) * radius),
(sin(0) * radius),
])
return arrayReduce([1..10], sketch, (i, sg) => {
let x = cos(step * i) * radius
let y = sin(step * i) * radius
return lineTo([x, y], sg)
})
}
```
Part of #3842
* Update Onboarding Bracket
* update KCL header
* update text to go to last character in onboarding code and delete for error reporting
* update allowable tensile stress
* Update test
* fix text
* run prettier
* Make error message in tooltip not matter
* Image asset path needs to be relative on desktop
---------
Co-authored-by: Frank Noirot <frank@kittycad.io>
Co-authored-by: Frank Noirot <frank@zoo.dev>
* refactor clientSide scene
* start consolidate threejs segment funcitons
* rename stuff
* first pass of integrating threejs segment create and update into one
* reduce create segment complexity
* add color back in
* use input
* fix comment
* feedback changes
* test
* test + selection loop
* wipe as
* multi body multi fillet test
* make eslint happy again
* as fatality
* Revert "make eslint happy again"
This reverts commit 21a966b9b0.
* lint error fix
* Use Inter 4.0 as sans-serif font
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Host the Inter font locally
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Re-run CI
* Just use the variable font, it's the future
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Re-run CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Re-run CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Update test to expect new behavior (failing)
* Update behavior to match new test expectations
* Make reset button more clear
* Fix eslint issue
* Fix up separate test that relied on old reset logic
* bug: fixing the position and display of the segment labels during sketch mode
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* fix: minor visual tweaks
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* fix: adding border styling
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* feat: aligned the text to the slope of the line drawn
* fix: tsc, lint, fmt
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* fix: linter warnings for unused variable
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add lints for floating and misued promises
* Add logging async errors in main
* Add async error catch in test-utils
* Change any to unknown
* Trap promise errors and ignore more await warnings
* Add more ignores and toSync helper
* Fix more lint warnings
* Add more ignores and fixes
* Add more reject reporting
* Add accepting arbitrary parameters to toSync()
* Fix more lints
* Revert unintentional change to non-arrow function
* Revert unintentional change to use arrow function
* Fix new warnings in main with auto updater
* Fix formatting
* Change lints to error
This is what the recommended type checked rules do.
* Fix to properly report promise rejections
* Fix formatting
* Fix formatting
* Remove unused import
* Remove unused convenience function
* Move type helpers
* Fix to not return promise when caller doesn't expect it
* Add ignores to lsp code
* migrate settingsMachine
* Guard events with properties instead
* migrate settingsMachine
* Migrate auth machine
* Migrate file machine
* Migrate depracated types
* Migrate home machine
* Migrate command bar machine
* Version fixes
* Migrate command bar machine
* Migrate modeling machine
* Migrate types, state.can, state.matches and state.nextEvents
* Fix syntax
* Pass in modelingState into editor manager instead of modeling event
* Fix issue with missing command bar provider
* Fix state transition
* Fix type issue in Home
* Make sure no guards rely on event type
* Fix up command bar submission logic
* Home machine tweaks to get things running
* Fix AST fillet function args
* Handle "Set selection" when it is called by actor onDone
* Remove unused imports
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Fix injectin project to the fileTree machine
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"
This reverts commit 4b43ff69d1.
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Re-run CI
* Restore success toasts on file/folder deletion
* Replace casting with guarding against event.type
* Remove console.log
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* Replace all instances of event casting with guards against event.type
---------
Co-authored-by: Frank Noirot <frank@kittycad.io>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: Frank Noirot <frank@zoo.dev>
Adds a new KCL executor benchmark which builds a `10` wide by `n` tall lego, with varying `n`. The benchmark runs a n = 1, 2, 3 etc build, so we can get an idea of how the speed changes with size.
This change improves execution speed by 25-36% depending on how many bumps there are. Tested by:
* Rust unit tests
* Open up modeling app, sketch a square, use the command palette to extrude it
* Open up the Bambu printer "poop chute" model, it all extrudes and works fine
Also fixes a bug: extrude, loft, revolve all trigger a GetExtrusionFaceInfo command. Due to a bug, the GetExtrusionFaceInfo command reused the Command ID from the previous extrude/loft/revolve. Fixed that.
* Make code editor go zoom again (reason: parsing is slow)
* Never build wasm bundle in dev mode
---------
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
* Fix "Text-to-CAD functionality" electron test
* Make "Closing settings modal should go back..." test not run order-dependent
* Seeing if paneOpen is part of the run order-dependent story
* Fix mistake in selector for text-to-cad test
* Add resiliency to a couple flakes
---------
Co-authored-by: 49fl <ircsurfer33@gmail.com>
* Update package.json
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add Electron app drag handle to sign-in page
* Don't assign drag regions in web from JSX, results in dev-only console errors about unsupported style values
* chore: Implemented electron playwright test to swap between a small cube and large lego
* fix: updating comment
* fix: added debug panel and execution done calls
* fix: yarn tsc, fmt, lint
* fix: updating lint warnings
* fix: removing testing line of code that hangs forever :(
* fix: trying a longer timeout
* fix: narrowing the scope to not get multiple elements
---------
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Cut release v0.25.0
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
---------
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Frank Noirot <frank@zoo.dev>
* Fix the project directory setting assignment from file
* Fix default project directory value initialization
* Add a couple tests for loading the app without project directory settings
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* trigger CI
* Object merging logic was bad, blew away other app settings if they existed
* Update silly little export file size expectation numbers
* Make rename timeout in test way shorter
* Fix silly little test issues
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
* Remove isFirstRender because isExecuting means the same and remove building scene
* add small makefile util
* Remove waiting for building scene prompt
* Add a new model state indicator
* fmt lint tsc
---------
Co-authored-by: Frank Noirot <frank@kittycad.io>
* Some colors and export file size changes occurred engine-side, update tests to match
* Fix up focusrite example after adjacent edge switch
* Yay now the export file is yet another new size
* Update bracket example code and some test colors that broke
* Use a shorter KCL sample so we don't experience weird locator behavior
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* bump electron playwright timeout
* Relax color expectations a little bit, as they can be different on web and electron
* fix double export test
* unused var
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Re-run CI
* Bump getGreatestPixDiff comparisons from 10 to 15 in projects.spec.ts
* bump another pix diff to 15
* make retries work
* update expect numbers
* remove some logs
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
* WIP: enable build releases
Will eventually fix#3528
* Build on all branches
* WIP: electron-forge publish to gcs
* WIP env var
* WIP windows
* WIP checkout in publish
* Back to matrix for build-apps and upstream wasm build
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP clean up out upload with all dry runs
* WIP macos
* Clean up
* Add update-electron-app
* Bump version down to 0.24.11
* Explicit NODE_ENV=production
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Push dummy version 0.99.99
* Undo
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Trigger CI
* Lint
* Experiment with DMG and MSI
* Split up artifacts
* Executable name to Zoo Modeling App
* Linux kebab-case exe, autoUpdate on wix
* Experiment with electron-builder
* WIP
* fail-fast false
* tronb:vite
* DMG and NSIS
* Typo
* Disable updater for electron-builder tests, quick fix
* WIP macOS sign and notarize
* WIP Win signing
* CSC_FOR_PULL_REQUEST
* Comment out signingHashAlgorithms
* APPLE_APP_SPECIFIC_PASSWORD and move scripts
* notarize: true and change script link
* mac.notarize.teamid
* Clean up and first steps on auto updater
* Lint
* Add logs
* Work on nsis config
* More extensive configs
* Clean up
* Test push updater
* Push again; Fix lint
* Bump down to 0.24.11 to test, disable publish
* WIP mac updater
* Back to .12 to push zips
* Back to .11 to test
* Back to .12 to push to same dir
* Fix windows and names
* Back to .11 to test, no publish
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Push again .12
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Add publisherName as in certificate
* Back to 11 build
* Add msi target
* MSI params
* perMarchine: false
* .12 msi push
* WIP tauri bundle generation (macOS)
* Typo
* Universal build mac
* Test last_update tauri gen for macOS
* VERSION fix
* Add v to VERSION
* Add v to VERSION part 2
* Fix tar
* WIP windows updater
* WIP windows
* Change Compress-Archive to 7z on Windows
* 7z change
* Fix flag
* -mm Deflate
* -mm Copy and version .99
* perMachine true
* perMachine true
* Manual autoUpdater.quitAndInstall
* Test NSIS for tauri transition
* WIP
* No more universal for mac, last_download.json endpoint
* Typo in json
* Tweaks
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Fix typo in download.json
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)"
This reverts commit 0d6d67ec2c.
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)"
This reverts commit b01bc589ab.
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)"
This reverts commit 5deff7614f.
* Fix tauri update json for universal to arch specified
* Fix tauri update json for universal to arch specified part 2
* Fix tauri update json for universal to arch specified part 3
* Back to checkUpdateAndNotify, frames on window
* Clean up
* Default prod env values
* CI clean up
* More clean up
* Override if forge env not set
* Make basic-sketch test more robust
* Fix env vars set
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: 49lf <ircsurfer33@gmail.com>
* chore: Implemented a executeAst interrupt to stop processing a KCL program
* fix: added a catch since this promise was not being caught
* fix: fmt formatting, need to fix some tsc errors next.
* fix: fixing tsc errors
* fix: cleaning up comment
* fix: only rejecting pending modeling commands
* fix: adding constant for rejection message, adding rejection in WASM send command
* fix: tsc, lint, fmt checks
* fix circ dependency
---------
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
Previously, many KCL values could be deserialized as KCL None values.
This isn't good -- the only thing you should be able to possibly
deserialize as KCL None is KCL None.
Solution was to add a private field in KCL None, serialize it with a
special magic number value, and then check for that magic number when
deserializing
* Basic sign-in page layout
* Better responsive styling
* Add wipe animation
* Fix mobile button styling
* Add juicy on-load animation to logo in app header
* Make video card a link to the sample's code
* Fix video URL on bundled desktop app, add "open default browser" behavior to links
* Revert "Add juicy on-load animation to logo in app header"
This reverts commit c167569d7e.
---------
Co-authored-by: 49fl <ircsurfer33@gmail.com>
* Fix: regression on command bar buttons (remove drag)
* Revert "Fix: regression on command bar buttons (remove drag)"
This reverts commit 2404bcdf31.
* Make all elements opt-out of drag behavior by default, add comments around drag attribute
* Add vendor-specific user-select
* It won't do to make all elements opt-out, it ends up swallowing the drag events themselves!
* Sneaking in this email truncation nit that's bothered me
* Gotta remove that one more attempt at a generic "we made this clickable" element
* Make orbit continue to work when dragging over the AppHeader
---------
Co-authored-by: Frank Noirot <frank@kittycad.io>
* ensure auth device token is saved to a file so it persists upgrades and reinstalls
#3639
* write file on check log in
* write file on check log in
* clean up
* Change mouse controls display to be easier to understand
* Fix to not duplicate default camera controls
* Change "Scroll wheel" to "Scroll" on all platforms
* addFillet.ts - refactor existing code
* move logic from modelingMachine to addFillet
* rename getPathForSelection into getPathToExtrudeForSegmentSelection
* stuck with kclManager
* stuck 2
* remove engineless exe from fillet test
* pathToExtrudeNode properly tested
* resolve conflicts
* engine initialization update
* cleanup comments
* passed ExecuteArgs instead of Program to executeAst
* afterAll engineCommandManager.tearDown
* resolve conflicts
* mutateAstForRadiusInsertion
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* save banner from hulk mutations
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* sweet errors
* purging the as
* make type of getNodeFromPath safe again
* as cleaning part 2
* cleared mutation logic
* last bits
* make the linter happy
---------
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix: Updating the playwright tests section
* fix: cleaning up formatting for playwright test markdown
* fix: autocomplete put a 3rd *
* chore: e2e playwright for change of base unit in multiple scenarios
* fix: fmt auto format
* fix: fmt and clean up for PR
* fix: removing typo
* fix: added the ) formatting back
* fix: linting errors + formatting
* fix: removing unused testing code from previous logic
---------
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
Part of https://github.com/KittyCAD/engine/issues/2504:
The engine accepts this 'replay' flag now, so, accept it too and send it up to the engine.
Part of https://github.com/KittyCAD/cli/issues/847
The engine sends 'session data' now (like the API Call ID). The CLI executes KCL using this executor, and would like to get the session data after execution.
* Fix Commands button to show correct shortcut
* Fix onboarding to use the same shortcut reference
* Rename test file to be more general
* Add test for commands button text
* Remove outdated reference to Ctrl+/
* Change shortcut separator to be + and no spaces
* Add JSDocs and improve comments
* Add unit tests
* Change control modifier to regular ASCII caret
* Add browser test and fix platform detection
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Add useful debug info to the error message
* Fix to display metaKey as Super on Linux
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"
This reverts commit f8da90d5d2.
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Approve snapshots
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
* Test: Can load a file with CRLF line endings #3616
* first arg stuff??
* Fix paths in playwright for windows
* Fix line ending replace on windows
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
---------
Co-authored-by: Adam Sunderland <iterion@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
Co-authored-by: Adam Sunderland <adam@kittycad.io>
* Don't chop off file name from file path
* Add a test to confirm file deletion works (as long as you have a main.kcl)
* Add TODO test for when main.kcl doesn't exist
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Make the bad prompt test generate a new prompt each run
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: 49fl <ircsurfer33@gmail.com>
* exporting createProjectAndRenameIt, going to be used for a third time
* feat: added e2e test to test project name retention after onboarding plays
* fix: formatting, adding Page type
* fix: resolved linter warnings, wrong syntax and function name typo
* Fix path splitting issues on windows
* Fix path splitting issue on routeLoaders
* Enable some e2e tests
* Swap enabled e2e tests
* Working bare-min project parse
* Make tsc happy
* Clean up & enable more tests
* Fix paths in browser
* Fix tests for windows
fmt
* Clean up wasm side
* Make build:wasm windows compatible
* More paths cleanup & some tests
* Remove sleep
* Use new config sturcture in parseroute
* Clean up debugger
* Fix: on settings close go back to the same file (#3549)
* Fix: on settings close go back to the same file
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* shit aint working yo
* Get that page a-loading
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Frank Noirot <frank@kittycad.io>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
* Fmt
* Comment out currently failing win32 tests
* Ignore tsc for electron monkey-patch
* Force line-endings to only
* Fix tsc
* Enable more tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Avoid modifying global for tests
---------
Co-authored-by: 49fl <ircsurfer33@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Frank Noirot <frank@kittycad.io>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
* Fix existing: Extrude from command bar selects extrude line after #3545
* remove as
---------
Co-authored-by: Frank Noirot <frank@zoo.dev>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
We can store Rust types like `SketchGroup` as their own variant of `KclValue`, or as `KclValue::UserVal`. Sometimes we store in one and try to read from the other, which fails. This causes bugs, like #3338.
Instead, we should use either ::SketchGroup or ::UserVal, and stop using the other. If we stopped using ::UserVal, we'd need a new variant for every Rust type we wanted to build, including user-defined types. So I don't think that's practical.
Instead, we should store every KCL value by de/serializing it into UserVal. This is a first step along that path, removing just the SketchGroup variants. If it goes well, we can remove the other specialized variants too.
My only concern is there might be performance implications from how frequently we convert between serde_json::Value and Rust types via Serde. But I'm not too worried -- there's no parsing JSON strings, just traversing serde_json::Value trees. This isn't great for performance but I think it'll probably be miniscule in comparison to doing all the API calls.
* Add the unexpected token to the error message
This is helpful during development where there's nothing to point at
the character index.
* Update more tests
* Fix the behavior so that we navigate to the new file path
* This change is done in other PRs but is also necessary here
* Add an Electron Playwright test for renaming a file
* Add tests for renaming dir, one is failing
* Don't need that console.warn
* Add DeepPartial utility type
* Fix settings parsing so that project path parsing is fixed
* Move URL check after DOM checks
* Revert this fallback behavior from https://github.com/KittyCAD/modeling-app/pull/3564 as we don't need it now that config parsing is fixed
* Make new bad prompt each run
* Fix onboarding asset path in web
* Remove double parsing of settings config
* Remove unused imports
* More unused imports
* Fix broken rename test
* Update src/lib/desktop.ts
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Add test for renaming file we do not have open
* fmt
---------
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Add electron test for persisting open panes
* Debugging persistence across test runs
* Trigger addInitScript for electron
* Remove init of PERSIST_MODELING_CONTEXT key
* Remove unused code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
---------
Co-authored-by: 49lf <ircsurfer33@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
* Fix to convert electron platform name darwin to macos
* Remove unneeded async
* Fix to handle other possible platform strings
* Add electron test for user sidebar menu text
* Fix formatting
* fix app version, make more dry
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* empty
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* empty
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* empty
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix a couple issues with settings reset on web & electron
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
* electron test code with error loading
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* Look at this (photo)Graph *in the voice of Nickelback*
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Dispose of requestAnimationFrame loop when component unmounts
* Only run requestAnimationFrame loop when mouse is on canvas
* Better animation loop disposal on canvas mouseout
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Text-to-cad test flakiness
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Re-run CI
* Remove arbitrary timeout which may cause us to miss the toast on a fast-running test
* Remove a couple more arbitrary timeouts in text-to-cad tests
* Remove all the arbitrary 5s awaits from these tests
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix up little differences in file/dir creation logic for electron
* Fix typo
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"
This reverts commit 8e7212f5da.
* Text-to-cad test flakiness
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add a yarn script to run electron tests locally
* Add plawright electron test restarting onboarding
* Add steps to restart onboarding with no code, and restart from settings button
* The "Opening the bracket" had a step that could occasionally resolve to multiple elements
* Fix my misunderstanding of how to select for the bracket project card
---------
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
* Get electron building something at all
* Merge Frank test setup work (#3418)
* Working window.electron.getPath
* Loading project-specific settings in electron tests
* Simplify test until we can get snapshots/traces working in electron tests
* test tweaks
---------
Co-authored-by: Frank Noirot <frank@kittycad.io>
* add test #3375 and #3420
* put kcl files together
* move files
* can sort projects #3362
* File in the file pane should open with a single click #3385
* pressing delete on home screen should do nothing #3387
* add aria labels to icons
* Rename and delete projects, also spam arrow keys when renaming #3364#3365#3259
* Fix up paths
* Update flake.nix to support Electron
* Remove a layer of indirection
* Work without a web server
* Fix settings#projectDir link on home
* Fix login (requires new @kittycad/lib WHICH IS NOT INCLUDED HERE)
* Lee: Tests are broken because auth skip needs to happen
* get setting override envs passed through
* tweak eletron CI
* yml tweak
* fmt
* NUKE tauri shit post merge with main
* another test auth tweak
* Revert "another test auth tweak"
This reverts commit b2254b10af.
* try CI again
* CI tweaks
* SKIP_AUTH true now on playwright
* Skipping auth when NODE_ENV=development now
* fmt
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* Use BASE_URL()
* fix exists
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix foldername for macos
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* update for windows
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix version in lower right
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* cleanup unused imports
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* progress on is playwright
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix test folders
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix fmt
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* remove tauri from actions bullshit
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* remove tauri dir
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fixups the coredump async shit
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* node env dev
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix cancellable
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* cleanup unnessary things
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* env vars
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* Bring back fix for NOT using hardcoded main.kcl
* env
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fmt
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* Revert "updates"
This reverts commit da5d9f1043eb94404e8b3f8044088e990e34a4ef.
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* remove tauri clippuy
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* less retries for now, no debug
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* tsconfig
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* small tsc fix
* update some tsc
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* tsc env
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix other tsc
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* small change for routeLoaders
* rm old screenshot
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix auth
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix last onew
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* auth clean up
* fix package.json
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* dissmissed screen on tests
* add waits between files being written
* put back retried
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix weird programMemory Map issue
* put private back
* Revert "put private back"
This reverts commit d311b978ca.
* Revert "fix weird programMemory Map issue"
This reverts commit 6c387bdf62.
* remove serde-wasm-bindgen
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* add env
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* fix tests
* more test tweaks
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* another tweak
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* more test tweaks
* more tweaks
* increase macos timeout
* try fix macos
* disable macos playwright tests
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
Co-authored-by: Frank Noirot <frank@kittycad.io>
Co-authored-by: Adam Sunderland <iterion@gmail.com>
Co-authored-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add actual support for makeUnique parameter
* Add uniqueness logic to dirs, make text-to-cad receive unique filename
* No longer need makeUnique flag, it's always on
* fmt
* Don't show toast when name hasn't changed during a rename
* fmt
* Get "interact with many" text-to-cad test passing again
* Get "engine fails export" back to reliably green
* Maybe more stable click target for text-to-cad test
* Make "export is already going" test moderately more reliable
* Mark "export is already going" as fixme
* Undo that fixme thing I take it back
* Add logical not operator using bang !
* Change to be more concise
* Add codemirror syntax highlighting for bang operator
* Add LSP semantic token type
* Change to runtime error for bang on non-bool
* Add additional assert check
* Fix tests to verify runtime values, not parsing
* Fix test failure messages to be more helpful
* Fix semantic token tests to not care about the index
---------
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
* Factor out expression execution
* Reduce code duplication
* Rename function to be clearer
* Change to use From::from to be clearer
* Rename to be clearer
* Fix to avoid unneeded clone
* Fix to not need to be mutable
* Remove struct that isn't very useful yet
* Change pipelines to not duplicate expression evaluation
* Rename to be more consistent
Now the process for adding a new KCL test is:
- `cd src/wasm-lib`
- Write a new .kcl file in the `tests/inputs` directory, e.g. `tests/inputs/foo.kcl`
- Run `just new-test foo`
- That created `tests/outputs/foo.png`, so open it and check it looks correct
- Commit changes and open a PR
`ProgramReturn::Arguments` variant is never instantiated and should go away. This would make `ProgramReturn` an unnecessary wrapper around `KclValue`, so the whole type should go away.
Part of https://github.com/KittyCAD/modeling-app/issues/3379
As @jon points out, "It's not only used in ProgramMemory. It's also
used as the return value of functions and as what gets substituted in
for the pipe substitution symbol %"
Rename kcl's Value to Expr
As Jon pointed out, kcl's `Value` enum is actually an expression.
"2+2" isn't a value, it's an expression, which can compute a value.
So I renamed it `Expr`.
* Disallow users to set theme as a project-level setting
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Fix up tests that assumed theme could be set at project level
* Missed two more tests that assumed theme was a project-level setting
---------
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Move executeCode out of routeLoaders, into shared space in Stream
* Update src/components/Stream.tsx
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* Remove unused dependency
* file switching useEffect should depend on engineConnection
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Re-run CI
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)"
This reverts commit d97e74a48b.
* Post-merge fix up
---------
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
* Fix settings opening and messing up everything
* Set settings aggressively for startup project theme loading
* fmt
---------
Co-authored-by: Lee <lee@Lees-Mac-mini.local>
* updated tangentArc math
* Add a test case showing tan arc then xLineTo
* Fix compile errors
* Tweaking the math
* Use + on angles
* atan2 outputs radians, not degrees
* Track ccw and center of all tan arcs
* re-sequenced atan2 arcTan
* Remove print statements
* Update the test
* Update kittycad in tauri
* New arc fields
---------
Co-authored-by: Jordan Noone <jordan@kittycad.io>
* set playwright actionTimeout to 15 seconds
* enabled screenshot on failure and html reporter to easily see individual test duration
* extend timeout when waiting for console
* removed duplicated html reporter
---------
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
Co-authored-by: ryanrosello-og <ry@zoo.dev>
* Reload everything on a disconnect
* fix unit-integration tests
* Further improvements to connection manager; persist theme across reconnects
* Fix up artifactGraph.test
* Actually pass the callback
* Kurt hmmm (#3308)
* kurts attempts
* we're almost sane
* get tests working, praise be
---------
Co-authored-by: 49lf <ircsurfer33@gmail.com>
* typo
---------
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
* artifactgraph snapshot stability
* clean up
* tweak
* Look at this (photo)Graph *in the voice of Nickelback*
* trigger ci
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add a search bar to the projects/home page
* Better hotkey config
* Look at this (photo)Graph *in the voice of Nickelback*
* Re-run CI
* Look at this (photo)Graph *in the voice of Nickelback*
* Re-run CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Cut release v0.24.9
* Look at this (photo)Graph *in the voice of Nickelback*
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This new test framework, `no_visuals`, is for testing KCL programs via asserts, not via twenty-twenty visual tests. This is useful for unit-testing small fragments of KCL.
It's easy! All you need to do is:
- Write a KCL file
- Save it under `tests/executor/inputs/no_visuals/foo.kcl`
- Open `no_visuals.rs` and add `gen_test!(foo);`
* add @snapshot tag to all snapshot-tests
* set workers to 1 on CI
* try sharding on google chrome only
* add retry when navigating to the app (on CI)
* reduce ubuntu-cores to 2
* revert runner back to 8 cores
* re-add retry + enable macos
* Reduce timeouts to 30 minutes
* ensure retry is triggered
* removed sharding when retrying failures
* added --pass-with-no-tests
* ensure failure occurs
* revert failure
* use smaller sized runners
* revert back to supported runner size
* revert to og version
* minimize changes
* yarn fmt
* ensure failure
* undo failure
---------
Co-authored-by: ryanrosello-og <ry@zoo.dev>
* add function to scroll to view
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* scroll into view on click
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* add test for jump to code with error
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* adjust engine connection to opt out of webRTC connection
* refactor start and test setup
* add env to unit test
* spell config update
* fix beforeAll order bug
* initial integration of new artifact map with tests passing
* remove old artifact map and clean up
* graph artifact map
* have graph commited
* have graph commited
* remove bad file
* install playwright
* fmt
* commit permissions
* typo
* flesh out tests more
* Look at this (photo)Graph *in the voice of Nickelback*
* multi highlight
* redo image logic
* add in solid 2d data into artifactMap
* fix snapshots
* stabiles graph images
* Look at this (photo)Graph *in the voice of Nickelback*
* tweak tests
* rename blend to edgeCut
* Look at this (photo)Graph *in the voice of Nickelback*
* fix playw tests
* start of artifact map rename to graph
* rename file
* rename test
* rename clearup
* comments
* docs
* docs proof read
* few tweaks here and there
* typos
* delete get parent logic
* nit, combine if statements
* remove unused param
* fix silly test bug
* rename surfId to sufaceId
* rename types
* update comments
* add comment
* add extra check
* Look at this (photo)Graph *in the voice of Nickelback*
* pull out merge artifact function
* update comments
* fix test
* fmt
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Have links clickable within tooltips without clicking content below them
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Re-run CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Re-run CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
'serial_test' isn't actually accurate. Two of these tests run in parallel
now. So I renamed it 'kcl_test' as that's what it's actually doing.
In the nextest config, I changed the label from 'serial-integration' to
'uses-engine' because the former isn't true, and also doesn't explain
_why_ it's being limited. The new name explains why we're limiting the
number of tests that can run in parallel.
* Refactor line tool and rectangle tool to share same "no points" code path
* Remove console.log
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Re-run CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Use kcl_input! macro
These two lines are equivalent:
`kcl_input!("foo")`
`include_str!("inputs/foo.kcl")`
Simplifies the tests.
* Move more KCL test programs into their own files
* Move twenty-twenty asserts into their own function
* Move more asserts into 'assert_out'
There was already a Reset Scene method which properly cleaned up the
3D modeling scene. I didn't know about it, so I wrote my own. But my own
one didn't call the necessary post-clear hooks, so it didn't recreate
the default planes.
This PR calls the right Reset Scene method, so the default planes get
recreated after the scene is cleared.
* wrap with retry - wait on error in gutter
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)"
This reverts commit 2ca97f90a2.
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
Allow the KCL execution server to choose a local engine, instead of just
the remote engine.
Technically this was already possible, via the $LOCAL_ENGINE_ADDR
environment variable. But it was hard to discover this.
* Add in an `assert` family of functions
This will check values at runtime, allowing for users to ensure computed
values do not violate static constraints.
Signed-off-by: Paul R. Tagliamonte <paul@zoo.dev>
* seperate out artifactmap functions into seperate file, change types quiet a bit with e2e still passing
* more type changes
* another increment
* cull artifact map
* remove excessive parentIds
* rename props
* final clean up
* unused vars
* Basic implementation of rich tooltips
* Break out config to its own file, add a bunch of items
* Better lower right control tooltip sizing
* Add a bunch of sketch tools to the config
* Fix hotkey collisions and UX polish
* Get tests working again
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Re-run CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* We updated how the sidebar buttons' test IDs are generated, fix it post-merge
* fmt
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Re-run CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Re-run CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Re-run CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Rework ribbon to support panes and actions
* Restore nice focus-within highlighting
* A better export icon
* Fix up some issues with tests due to sidebar and tooltip tweaks
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Re-run CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* start of seperating pending message from artifact map
* continue migration to sendCommandVersion2
* mostly massage types
* process artifact after the fact
* clean up
* Fix to allow variable shadowing inside functions
* Implement closures
* Fix KCL test code to not reference future tag definition
* Remove tag declarator from function parameters
This is an example where the scoping change revealed a subtle issue
with TagDeclarators. You cannot bind a new tag using a function
parameter.
The issue is that evaluating a TagDeclarator like $foo binds an
identifier to its corresponding TagIdentifier, but returns the
TagDeclarator. If you have a TagDeclarator passed in as a parameter
to a function, you can never get its corresponding TagIdentifier.
This seems like a case where TagDeclarator evaluation needs to be
revisited, especially now that we have scoped tags.
* Fix to query return, functions, and tag declarator AST nodes correctly
In KCL, arguments to functions are passed in the Args struct. This struct contains a list of args, but each arg could be any KCL type (they're stored in an enum of all possible types). To get args of the correct type, these enums are fallibly converted into the type expected for the matching parameter.
Until now, the fallible conversion was handwritten for nearly each function. This is unnecessary, I've replaced it with composable traits.
* Ensure that isFreezeFrame is reset by isFirstRender, because it can't be a freeze frame if it's the first render
* `restart`-type engine starts should count as first renders
* Ensure we don't see a loading spinner after network is reconnected in test
* Make `waitForPageLoad` robust against if the page has already loaded
and make it actually wait for the Start Sketch button to be enabled
---------
Co-authored-by: 49fl <ircsurfer33@gmail.com>
As @jtran pointed out - I had misunderstood the behavior of
Default::default(), we can instead rely on this syntax to do the same
thing. This won't use each field's default value -- rather, it'll use
the type's Default, and override each field. Neat!
Signed-off-by: Paul Tagliamonte <paul@zoo.dev>
* Convert user menu to a popover from a sidebar
* Move the user menu over to the left menu cluster
* Replace project sidebar with popover-style menu
* Styling tweaks, give export button a proper tooltip when disabled
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Filter orphan breaks, tweak space to remove mouse gaps
* Unify with and without avatar image code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Rerun CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Rerun CI
* Prepare to move UserSidebarMenu over to right
* Revert AppHeader tweaks
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Rerun CI
* Fix typo in README
* Fix export E2E tests that relied on button text
* Missed the data-testid we used to have on the data-testid we had on the settings button
* Dang I missed another testId
* Update snapshots
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Rerun CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* "err" instead of "instanceof Error"
* trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
We use the WebSocket connection to send binary data (in the form of
shapefiles) from the engine to the client. These can very easily get
larger than the default 16MB limit on the max_frame_size. I don't
understand why it won't stich multiple frames together - but given what
I can see when this crashes, the max_message_size isn't the LIMFAC,
max_frame_size is.
That's an issue for future-us.
Signed-off-by: Paul Tagliamonte <paul@zoo.dev>
* Add a close button to sidebar panes
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Rerun CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Fix up dark mode look and feel
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Revert "Compute the AST digest in the LSP (#3037)"
This reverts commit 5e41e382ce.
* Compute the AST digest in the LSP (#3037)
This is a slow-roll to calling this in more places; but this is
non-critical, so if this breaks on some unexpected AST or what have you,
we're not breaking anything except the LSP (which we'll see pretty
quickly) while also testing it on all user input.
If something goes south, please feel free to revert this commit.
Signed-off-by: Paul Tagliamonte <paul@zoo.dev>
---------
Signed-off-by: Paul Tagliamonte <paul@zoo.dev>
This is a slow-roll to calling this in more places; but this is
non-critical, so if this breaks on some unexpected AST or what have you,
we're not breaking anything except the LSP (which we'll see pretty
quickly) while also testing it on all user input.
If something goes south, please feel free to revert this commit.
Signed-off-by: Paul Tagliamonte <paul@zoo.dev>
* Lower threshold for 2020 tests
Now that the tests zoom into the model and center it before taking a
snapshot, they should be less sensitive.
* Genuine, nontrivial changes to the integration test images
* draft: fillet ast mod + test
* Kurt's rejig
* playwright
* update button enable logic
* remove fillet button in production build
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* trigger CI
* fix typo
* give a way to turn on fillets
---------
Co-authored-by: max-mrgrsk <margorskyi@gmail.com>
Co-authored-by: max-mrgrsk <156543465+max-mrgrsk@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Make machine command type names more explicit
* Prepare "change tool" event for command bar
* Make it so that state machine events can each map to multiple command configs
* Make commands with all skippable args possible
* Add back the tools to the command bar
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Update to use new `groupId` property name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Oops didn't save this other instance of `ownerMachine`
* Add a playwright test
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add format code to the command palette
* Fix to use renamed groupId parameter
* Add icon to format code command
* Fix to remove commands during teardown
* Fix dependencies
* Change formatting
* roll you own playwright retries
* tweak
* tweak
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* add retries for ubuntu too
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)"
This reverts commit 327cc196cd.
* Revert "add retries for ubuntu too"
This reverts commit db877748e2.
* add retries for ubuntu too
* whoopsie
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* WIP: Automate tauri updater tests
Fixes#2926
* Same product name
* Tweak uploads
* Add cat
* Fix macos universal builds for updater
* New artifact name
* Revert "New artifact name"
This reverts commit 61defcab18.
* Final check
* Clean up
* After a sketch keep the extrude button active
* add test
* Compare to 0,0 not any x,x or y,y
---------
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
* deleting start of sketch line tool should still work
* add test
* fmt
* put big timout back in
* shotkey test patch
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)"
This reverts commit 6ee690a65a.
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Each AST node contains an Option<Digest> which can be optionally set by running compute_digest() over the AST. This will mutate the AST and set the Digest. Fundamentally, the digest is computed from the digest of AST children nodes (using compute_digest) or the explicit raw underlying value.
The underlying hash is changeable by modifying the macro and Digest type alias, and should enable us to determine when an AST -- or fragment of AST -- is the same.
This won't hash the start/end of the AST fragment, so it's, to some extent, position independent. It will hash newlines, comments, etc, which may change in the future depending on how we wind up using this.
* Cut release v0.24.0
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Trigger CI
---------
Co-authored-by: Frank Noirot <frank@zoo.dev>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix when you comment out it should re-execute
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* copilot being a little shit
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fmt
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* fix
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* turn copilot off
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* fix for realisesi
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* remove footguns
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Rough impl of line lengths, still duplicating
* Make sure the labels get cleared along with the rest of the sketch
* Show current units in segment length indicators
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Re-run CI after snapshots
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Re-run CI
* Make sure `close` segments get insert segment handles
* Skip engine connection tests on Safari with a todo
* Fmt
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add a units indicator with a menu to switch default units
* Add a playwright test, add a SR label
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Re-run CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Re-run CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Just cancel out of 'sketch no face' state
* add test
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* trigger ci
---------
Co-authored-by: Frank Noirot <frank@zoo.dev>
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix core dump screenshot
* make it robust
* test hardening
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* trigger CI
* harden test
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Bump all tauri deps except cli (incl. updater fix)
Fixes#2741
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Trigger CI
* Remove promises from getOsInfo for tauri apis
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add message to toolbar
"click plane to sketch on"
* Add margin and make the message text smaller
Plus, wrapped it in a div. The spacing and alignment is slightly nicer with the div compared to adding the classes to the List Item element.
---------
Co-authored-by: Frank Noirot <frank@zoo.dev>
* Drop unneeded compute indirection in lspAutocompleteKeymapExt
* Dispatch only a single transaction in requestFormatting
Remove addToHistory.of(true), since that is the default.
* Remove old comment and some useless tests
* Just store the view, not the previous viewUpdate, in CompletionRequester
* small codemirror changes from marijnh
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix some flaky tests
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: Marijn Haverbeke <marijn@haverbeke.berlin>
* ctrl-c is copy, we should not bind to copy or paste or any common shit
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix tests
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* inital migration with a couple lingering concerns
* move is stream ready back
* put htmlRef back in useStore
* final tidy of useStore
* test tweaks
* tweak more
* more test tweaks
* fmt
* test tweaks
* attempts at fixing 'Basic default modeling and sketch hotkeys work'
* more tries
* 😭
* try again
* fmt
* Add a setting for showScaleGrid
* Fix up setting persistence, move under modeling
* Make the setting actually do something
* the lamest fmt I've seen in a while
* Fix clippy warnings
* Add snapshot tests for grid (first time using Playwright masks)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Re-run CI after new screenshots added
---------
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Rework zooming
* Adjust sketch mode zoom
* Do not retry failures
* typo
* use sha as file upload id
* again
* again
* again
* again
* Fix camera moving too
* Use virtual fps instead of buffering for mouse
---------
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
* Add coredump to refresh button - this one indicates that there should be something like a core dump that is triggered.
* Added lower right control bug report button - included custom toasts for bug reporting, supports fallback bug reporting when app cannot generate a core dump
* Do not show more than one error toast at a time
* use sha as file upload id
* again
* again
* again
* again
* fmt
* Hopefully fix flakiness
* move to macos-14-large
---------
Co-authored-by: Paul Tagliamonte <paul@zoo.dev>
Co-authored-by: Paul R. Tagliamonte <paul@kittycad.io>
When I originally wrote the walk stuff, I wanted to be able to stop a
traversal by returning false. That didn't get implemented in the first
rev, so this will actually build that out so returning false will stop
the walk.
Signed-off-by: Paul R. Tagliamonte <paul@kittycad.io>
* start to gut and seperate the kcl lint from execute
* fix type signature
* re-add old codepath when not wasm
* also lint in the mock
* fix syntax
* fix message
Previously these functions could not be used with `#[stdlib]` proc-macro:
```rust
fn someFn(data: &'a str) {}
fn someFn<'a>(data: Foo<'a>) {}
```
But now they can.
* Add command configs for sketch tools
* Update Constrain dropdown to be noun
* Update Cargo.lock
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Update E2E test references to "Constraints" button
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Start of basic test (not yet failing)
* Add a little logging to get the lay of the scene object land
* Move test colors to utility, test broken
* Get accurate test that is only broken with highlighted color behavior
* Working implementation but now initial segment color sticks around too long
* Make sure segment base color is always the theme color
* Remove console logs, refactor a couple lines to use if statements instead of inline booleans
* Fix new test
* Make origin color update like the other segment types
* fmt
* Fix issue where initially-selected segments lose highlight after hover
* Undo this tweaking of the selection logic, this is really only about the clientSideEntities
* Remove unused exports
* Remove unnecessary code change from ModelingMachineProvider
* Remove newline
* Update src/clientSideScene/sceneEntities.ts
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
---------
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
* allow for editing a sketch where extrude or revolve is in the same pipe
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* update tests
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* add playwright test for extrude
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* add test for revolve
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* remove log
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* update out of bounds
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* more
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* be in charge of own fate for code mirror versions
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* Revert "be in charge of own fate for code mirror versions"
This reverts commit 796ecfdd8f.
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* Make sure we always reset the code on important steps no matter what the user did to it
* Convert comments in codeManager to JSDoc comments so they appear in diagnostics
* Was using the wrong codeManager callback
* Make sure editorView is available before resetting code
* Add Playwright test that shows the code being reset
* Fix up text that looks like linksÏ
* fmt
* Skip test on MacOS, make test more reliable on Chrome
* Update cargo-clippy to run based on paths on PRs as well
* playw fix
* try keep reports
* add fix me
* try one last thing
* fmt
---------
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
Clear the AST if there was a parse error.
This leads to an unfortunate loop (good -> invalid -> original) that
wouldn't clear the diagnostics from the invalid step.
Adds a new library, the kcl-test-server. It lets you easily start a HTTP server with one endpoint, which accepts JSON. The JSON body contains a KCL program and a test name. The server has a pool of active engine sessions, and when it gets a KCL program, it executes it on one of those engine sessions.
This addresses part of #2580 but currently the sketch-on-face tests don't pass with this new test server yet.
This is a library, not a binary, because I want to use it in both the wasm-lib unit tests and in the zoo CLI.
* WIP: Break the tauri e2e tests apart
Will fix#2658
* Clean up
* Longer before timeout
* Also exclude tauri tests from vitest
* Utils fn back in app.spec.ts
* Remove utils
* Change before back to it
* Remove explicit mocha dep
* Revert other attemps at fixing the browser issues. mocha dep was the issue
* Clean up
* Signin/out sep with auth flows
* Lint
---------
Co-authored-by: Frank Noirot <frank@zoo.dev>
* Remove tab hotkey from selection input
* Add dismiss button to the command bar
* update Cargo.lock
* tweak close button styles
* Switch from padding to margin for positioning without messing up focus outline
* Revert "update Cargo.lock"
This reverts commit 862a6897ba.
* Restore Cargo.lock I hate VSCode sometimes
* Update Cargo.lock in src-tauri, fix clippy
---------
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
Sometimes the `src-tauri/` project gets out of date Cargo.lock. This
adds a CI check to prevent it.
This can happen because `src-tauri` is a separate Cargo project from
`src/wasm-lib`, but the former includes the latter as a dependency. So,
when wasm-lib updates a dep (e.g. bump databake from 1.7 to 1.8), the
former will, upon recompilation, pull in the newer databake dep. But
programmers in the wasm-lib repo don't usually work in the src-tauri repo
and so the src-tauri repo doesn't get updated.
* Add in a prototype KCL linter
This is a fork-and-replce of an experimental project I hacked up called
"kcl-vet", which was mostly the same code. This integrates kcl-vet into
the kcl_lib crate, which will let us use this from the zoo cli, as well
as via wasm in the lsp. this contains the intial integration with the
lsp, adding all lints as informational to start.
I need to go back and clean some of this up (and merge some of this back
into other parts of kcl_lib); but this has some pretty good progress
already.
Co-authored-by: jess@zoo.dev
Signed-off-by: Paul R. Tagliamonte <paul@zoo.dev>
* ty clippy :)
* add in a lint test
* add in some docstrings
* whoops
* sigh
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* uno reverse card
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* wtf stop it robot fuck
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)"
This reverts commit 5b18f3c035.
* hurm
* try harder to type slower
* try harder? this all passes locally.
* try this now
* simplify, add debugging for trace
* fix enter use
* re-order again
* reorder a bit more
* enter
* ok fine no other enters?
* nerd
* wip
* move control of clearing to typescript
* move result out
* err check
* remove log
* remove clear
* remove add to diag
* THERE CAN BE ONLY ONE
* _err
* dedupe
* Revert "dedupe"
This reverts commit f66de88200.
* attempt to dedupe
* clear diagnostics on mock execute, too
* handle dupe diagnostics
* fmt
* dedupe tsc
* == vs ===
* fix dedupe
* return this to the wasm for now
* clear the map every go around
this is different than the old code isnce it won't republish
---------
Signed-off-by: Paul R. Tagliamonte <paul@zoo.dev>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* add bug icon, swap out refresh icon
* remove lame theme color outline from tooltips
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Basic context menu components
* Working context menu!
* Show keyboard shortcuts in file tree context menu
* Add context menu to Gizmo
* Little polish on components
* Add a test for the gizmo, firm up other gizmo tests
* Updated Cargo lock
* Updated Cargo.lock
* Remove zoom throttling
And use the mouse zoom for sketch mode
* test tweaks
* test tweak
---------
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
* Remove debug logging from Engine Connection
Left console.log('connectionstatechange: ' + event.target?.connectionState) intentionally
* Bring that beat back
@lf94 request that we keep this one and also make sure it's in coredump.
* gizmo 2.0
nice and clickable
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* initial mouse position fix
when the scene first loads, mouse position is 0,0, which renders the gizmo selected.
* animation loop / disposal optimization
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* reset camera tweak
* add cam target to debug panel
* test stub
* reset camera position handle removed from gizmo
it is now a button in the debug panel
* gizmo refactoring
* small fix
* reset camera view
bug fix
* nicer updateCameraToAxis
now gizmo rotates around the target instead of world 0,0,0
* micro refactoring
* playwright update
* playwright remove timeout + fmt
* hide gizmo while loading stream
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)"
This reverts commit f0a506d6b9.
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)"
This reverts commit 2781261331.
* try make gizmo test more realiable
* tweak
* refactoring
* increase timeout time
* 1 sec wait after mouse click
* 3 sec timeout
* better clickPosition
* test with 10 sec timeout
* 0.5 sec timeout
* add passive update for gizmo to avoid some edge cases
* default_camera_get_settings after click
* try and remove timeouts
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
* Make sketch and extrude produce separate top-level constants
* Fix most tests
* Add a breaking test for sketch on face AST mod
* Use `extrude` instead of `part`
* Implement @Irev-Dev's branch changes from https://github.com/KittyCAD/modeling-app/pull/2472
* Get extrude on face working
* Update incorrect sketch on face test
* Update unit tests
* Fix up E2E test changes
* fmt
* Fix a couple of goofed up test updates
* More specific names for paths to node sent to modelingMachine
* Bump down playwright workers for now
* Slightly more explicit type coercion
* Update snapshot tests
* Missed one other new flow test that wasn't updated to use "sketch001"
* Typo
* Damn missed one more sorry
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Re-run CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* I think the multiple sketches test reverted from under me
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add keyboard custom icon
* Refactor Settings to be more modular
* Add basic keybindings view to settings
* Add more shortcuts
* Add link to see keyboard shortcuts tab
* Little more bottom padding
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Add keybindings to settings search
* Add a playwright test for opening the the keyboard shortcuts
* fmt
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Reapply "Add ping pong health, remove a timeout interval, fix up netwo… (#1771)
This reverts commit 1913519f68.
* Fix build errors
* Add new error states to network status notification
* Remove unused variable
* Refactor to use Context API for network status
* Don't do any stream events if network is not ok
* Catch LSP errors on bad auth
* Show when authentication is bad (cookie header only)
* Fix formatting
* Fix up types
* Revert awaiting on lsp failure
* Fix tsc
* wip
* wip
* fmt
* Fix typing
* Incorporate ping health; yarn make:dev; faster video stream loss notice
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* run ci pls
* run ci pls
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* run ci pls again
* Remove unused variables
* Add new instructions on running Playwright anywhere
* Please the Playwright. Praise the Playwright.
* Correct a vitest
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* ci again
* Fix tests unrelated to this PR
* Fix flakiness in for segments tests
* Bump to 2 workers
* fmt
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* fmt
* fmt
* Fixups
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* ci
* Set workers to 1
* Wait for network status listeners before connecting
* Fix initial connection requirements and trying 2 workers again
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Update rectangle code gen to use profileStart to close shape
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Re-run CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* WIP: Get existing tauri e2e tests to work on Windows
Will fix#2393
* Enable windows stage (will fail)
* WIP msedge version sync
* Move setup edge before build
* Manual debug build (no action)
* Specify v119 for npm package
* Fixes on auth test
* Working test on win10
* Clean up
* Disable yarn cache to help debug the mismatch issue
* Revert "Disable yarn cache to help debug the mismatch issue"
This reverts commit e6abc7db42.
* Explicit webviewOptions and remove tauri driver fork
* Double \\ workaround for windows
* Clean up
* Clean up and readme
* Quick fix
* Lint
* Clippy fix
* Back to tauri-action and disable windows CI tests for early merge
* Back to 10sec delay
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Timer reset
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Trigger CI
* Back to 1 pw worker
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* migrate one constraint
* typo
* update snap to y, snap to x, horz align, vert align, equal length
* add some e2e tests
* add e2e test for snap to axis contsraits
* remove works for now
* Add loading and success toasts to export engine command
* Move doExport out to a test utility, test visibility of loading spinner
* Add playwright test for export success toast
* Update Cargo.lock
* Remove loading assertion, it flashes too quickly for Playwright to pick up
* Navigate between files with single-click
* Better semantic name for optional event passed into FileTree
* Bug fix: reset modeling state when navigating to a new file
* Add more context to E2E test TODO comment
* Newly-created file tree items are immediately set to renaming mode
* Bug fix: redirect to working file if you delete your current one
* Remove ContextMenu, unrelated branch
* Turn off autocorrect in renaming form
* Gracefully handle renaming a folder that our current file is inside of
* Update cargo.lock
* Fix renaming queue
* Navigate to newly-created files
* Make delete project and delete file/folder share deletion confirmation component
* Bug fix: navigate to project root if we delete our current file's parent directory
* Don't navigate to newly-created directories
* remove semver from snapshots
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* trigger ci
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* start of overlay work
* add new icons
* add constraint symbols
* add three dots
* add primary colours
* refactor how we get constraint info for overlays
* refactor how we get constraint info for overlays
* get symbols working for tangential arc too
* extra data on constraint info
* add initial delete
* fix types and circular dep issue after rebase
* fix quirk with horz vert line overlays
* fix setup and tear down of overlays
* remove overlays that are too small
* throttle overlay updates and prove tests selecting html instead of hardcoded px coords
* initial show overaly on segment hover
* remove overlays when tool is equipped
* dounce overlay updates
* tsc
* make higlighting robust to small changes in source ranges
* replace with variable for unconstrained values, and improve styles for popover
* background tweak
* make overlays unconstrain inputs
* fix small regression
* write query for finding related tag references
* make delete segment safe
* typo
* un used imports
* test deleteSegmentFromPipeExpression
* add getConstraintInfo test
* test removeSingleConstraintInfo
* more tests
* tsc
* add tests for overlay buttons
* rename tests
* fmt
* better naming structure
* more reliablity
* more test tweaks
* fix selection test
* add delete segments with overlays tests
* dependant tag tests for segment delet
* typo
* test clean up
* fix some perf issus
* clean up
* clean up
* make things a little more dry
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* trigger ci
* Make constraint hover popovers readable on light mode
* Touch up the new variable dialog
* Little touch-up to three-dot menu style
* fix highlight issue
* fmt
* use optional chain
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)"
This reverts commit be3d61e4a3.
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* disable var panel in sketch mode
* fix overlay tests after mergi in main
* test tweak
* try fix ubuntu
* fmt
* more test tweaks
* tweak
* tweaks
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Frank Noirot <frank@kittycad.io>
* actually test that we dont exit sketch mode on first escape
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* better test
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* zoom to fit on load
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* lint
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* add zoom to fit calls to the correct places
* update comment
* clean up comment
* add snapshot test zoom to git
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* subscribe to camera updates from zoom to fit
* fix types
* partial test fix
* updatges
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix another test
* remove my enhancements
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Check the winnow ParseError before indexing
From the winnow docs at[1]
> The location in ParseError::input where parsing failed
>
> Note: This is an offset, not an index, and may point to the end of input
> (input.len()) on eof errors.
This will bounds check the index before slicing into the `input` vec,
and return an EOF erorr rather than an unknown token error.
[1]: https://docs.rs/winnow/latest/winnow/error/struct.ParseError.html#method.offset
I have a hunch somewhere something is mixing up bytes and chars (more
specifically, a codepoint or grapheme), which is causing bounds to go
past the end of the list since something is talking byte indexes and
the other is dealing with char/codepoint indexes.
For now this is going to fix the crash, but the EOF error may be masking
an actual bad token error in some cases? Our code looks right, so I'm
not quite sure what is going on in the winnow internals here.
Signed-off-by: Paul R. Tagliamonte <paul@kittycad.io>
* draft #2279
Add client side gizmo #2279, work in progress
* draft #2279
unreliableSubscriptions
* draft #2279
nice Gizmo
* blue ring
give the canvas a round shape and a border, wrapping rounded div element around the canvas
* Refactor Gizmo Component
Extracted reusable constants
Modularized the code
Simplified the useEffect logic
Added TypeScript type annotations
Improved overall code structure and readability
* remove old gizmo
* fmt
* styling and relocation
Add className "pointer-events-none" to gizmo wrapper div (for now to prevent context menu)
Make LowerRightControls container element have these classNames: flex flex-col items-end gap-3
Move gizmo into LowerRightControls.tsx as the first child of the section element
Remove the fixed styling from the gizmo div so it flows in flexbox
* fmt
* fix camera up problem
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* up tweak
* Revert "up tweak"
This reverts commit a53a0ef240.
* test tweak
* tweak test
---------
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Frank Noirot <frank@kittycad.io>
There are many places in the executor codebase which evaluate an AST expression and produce a KCL memory item. They could be deduplicated and put into one central location.
Fixes <https://github.com/KittyCAD/modeling-app/issues/1931>.
Simplify the fuzzer a bit
This is the same code, but we'll offload the string parsing to the fuzz
lib, and we can inline the `if Ok(v)`
Signed-off-by: Paul R. Tagliamonte <paul@kittycad.io>
* Save part images when navigating home
* Load part images in project cards if available
* Polish home page
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Merge branch 'main' into franknoirot/project-images
* Mostly restored link + form functionality
* Working cards with images
* Comment out project image stuff
* Little style tweaks
* Remove unused imports
* More minor styling tweaks
* Merge branch 'main' into franknoirot/project-images
* Was using the wrong imported `Project` type
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Revert any docs changes
* Revert wasm-lib divergences
* Move ProjectCard into its component folder
* Remove unused hook useSaveVideoFrame
* Remove "hideOnLevel" config from theme setting
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
download at [zoo.dev/modeling-app/download](https://zoo.dev/modeling-app/download)
A CAD application from the future, brought to you by the [Zoo team](https://zoo.dev).
@ -57,7 +57,7 @@ yarn install
followed by:
```
yarn build:wasm-dev
yarn build:wasm
```
or if you have the gh cli installed
@ -66,15 +66,15 @@ or if you have the gh cli installed
./get-latest-wasm-bundle.sh # this will download the latest main wasm bundle
```
That will build the WASM binary and put in the `public` dir (though gitignored)
That will build the WASM binary and put in the `public` dir (though gitignored).
finally, to run the web app only, run:
Finally, to run the web app only, run:
```
yarn start
```
If you're not an KittyCAD employee you won't be able to access the dev environment, you should copy everything from `.env.production` to `.env.development` to make it point to production instead, then when you navigate to `localhost:3000` the easiest way to sign in is to paste `localStorage.setItem('TOKEN_PERSIST_KEY', "your-token-from-https://zoo.dev/account/api-tokens")` replacing the with a real token from https://zoo.dev/account/api-tokens ofcourse, then navigate to localhost:3000 again. Note that navigating to localhost:3000/signin removes your token so you will need to set the token again.
If you're not an KittyCAD employee you won't be able to access the dev environment, you should copy everything from `.env.production` to `.env.development` to make it point to production instead, then when you navigate to `localhost:3000` the easiest way to sign in is to paste `localStorage.setItem('TOKEN_PERSIST_KEY', "your-token-from-https://zoo.dev/account/api-tokens")` replacing the with a real token from https://zoo.dev/account/api-tokens ofcourse, then navigate to localhost:3000 again. Note that navigating to `localhost:3000/signin` removes your token so you will need to set the token again.
### Development environment variables
@ -89,46 +89,31 @@ enable third-party cookies. You can enable third-party cookies by clicking on
the eye with a slash through it in the URL bar, and clicking on "Enable
Third-Party Cookies".
## Running tests
## Desktop
First, start the dev server following "Running a development build" above.
Then in another terminal tab, run:
To spin up the desktop app, `yarn install` and `yarn build:wasm` need to have been done before hand then
```
yarn test
yarn tron:start
```
Which will run our suite of [Vitest unit](https://vitest.dev/) and [React Testing Library E2E](https://testing-library.com/docs/react-testing-library/intro/) tests, in interactive mode by default.
This will start the application and hot-reload on changes.
For running the rust (not tauri rust though) only, you can
Devtools can be opened with the usual Cmd/Ctrl-Shift-I.
To build, run `yarn tron:package`.
## Checking out commits / Bisecting
Which commands from setup are one off vs need to be run every time?
The following will need to be run when checking out a new commit and guarantees the build is not stale:
```bash
cd src/wasm-lib
cargo test
yarn install
yarn build:wasm-dev # or yarn build:wasm for slower but more production-like build
yarn start # or yarn build:local && yarn serve for slower but more production-like build
```
## Tauri
To spin up up tauri dev, `yarn install` and `yarn build:wasm-dev` need to have been done before hand then
```
yarn tauri dev
```
Will spin up the web app before opening up the tauri dev desktop app. Note that it's probably a good idea to close the browser tab that gets opened since at the time of writing they can conflict.
The dev instance automatically opens up the browser devtools which can be disabled by [commenting it out](https://github.com/KittyCAD/modeling-app/blob/main/src-tauri/src/main.rs#L92.)
To build, run `yarn tauri build`, or `yarn tauri build --debug` to keep access to the devtools.
Note that these became separate apps on Macos, so make sure you open the right one after a build 😉
Before you submit a contribution PR to this repo, please ensure that:
@ -143,36 +128,73 @@ Before you submit a contribution PR to this repo, please ensure that:
## Release a new version
1. Bump the versions in the .json files by creating a `Cut release v{x}.{y}.{z}` PR, committing the changes from
#### 1. Bump the versions by running `./make-release.sh`
```bash
VERSION=x.y.z yarn run bump-jsons
The `./make-release.sh` script has git commands to pull main but to be sure you can run the following git commands to have a fresh `main` locally.
```
git branch -D main
git checkout main
git pull origin
./make-release.sh
# Copy within the back ticks and paste the stdout of the change log
git push --set-upstream origin <branch name created from ./make-release.sh>
```
Alternatively you can try the experimental `make-release.sh` bash script that will create the branch with the updated json files for you.
run `./make-release.sh` for a patch update
run `./make-release.sh "minor"` for minor
run `./make-release.sh "major"` for major
That will create the branch with the updated json files for you:
-run `./make-release.sh` or `./make-release.sh patch` for a patch update;
-run `./make-release.sh minor` for minor; or
-run `./make-release.sh major` for major.
The PR may serve as a place to discuss the human-readable changelog and extra QA. A quick way of getting PR's merged since the last bump is to [use this PR filter](https://github.com/KittyCAD/modeling-app/pulls?q=is%3Apr+sort%3Aupdated-desc+is%3Amerged+), open up the browser console and paste in the following
After it runs you should just need the push the branch and open a PR.
When you open the PR copy the change log from the output of the `./make-release.sh` script into the description of the PR.
**Important:** Pull request title needs to be prefixed with `Cut release v` to build in release mode and a few other things to test in the best context possible, the intent would be for instance to have `Cut release v1.2.3` for the `v1.2.3` release candidate.
The PR may then serve as a place to discuss the human-readable changelog and extra QA. The `make-release.sh` tool suggests a changelog for you too to be used as PR description, just make sure to delete lines that are not user facing.
#### 3. Manually test artifacts from the Cut Release PR
##### Release builds
The release builds can be found under the `out-{platform}` zip, at the very bottom of the `build-publish-apps` summary page for each commit on this branch.
Manually test against this [list](https://github.com/KittyCAD/modeling-app/issues/3588) across Windows, MacOS, Linux and posting results as comments in the Cut Release PR.
##### Updater-test builds
The other `build-publish-apps` output in Cut Release PRs is `updater-test-{platform}`. As we don't have a way to test this fully automatically, we have a semi-automated process. For macOS, Windows, and Linux, download the corresponding updater-test artifact file, install the app, run it, expect an updater prompt to a dummy v0.255.255, install it and check that the app comes back at that version.
The only difference with these builds is that they point to a different update location on the release bucket, with this dummy v0.255.255 always available. This helps ensuring that the version we release will be able to update to the next one available.
If the prompt doesn't show up, start the app in command line to grab the electron-updater logs. This is likely an issue with the current build that needs addressing (or the updater-test location in the storage bucket).
grab the md list and delete any that are older than the last bump
#### 4. Merge the Cut Release PR
2. Merge the PR
This will kick the `create-release` action, that creates a _Draft_ release out of this Cut Release PR merge after less than a minute, with the new version as title and Cut Release PR as description.
3. Create a new release and tag pointing to the bump version commit using semantic versioning `v{x}.{y}.{z}`
4. A new Action kicks in at https://github.com/KittyCAD/modeling-app/actions, uploading artifacts to the release
#### 5. Publish the release
Head over to https://github.com/KittyCAD/modeling-app/releases, the draft release corresponding to the merged Cut Release PR should show up at the top as _Draft_. Click on it, verify the content, and hit _Publish_.
#### 6. Profit
A new Action kicks in at https://github.com/KittyCAD/modeling-app/actions, which can be found under `release` event filter.
## Fuzzing the parser
@ -195,33 +217,55 @@ $ cargo +nightly fuzz run parser
then replace "your-token" with a dev token from dev.zoo.dev/account/api-tokens
For a portable way to run Playwright you'll need Docker.
then:
run playwright
#### Generic example
After that, open a terminal and run:
```
yarn playwright test
```bash
docker run --network host --rm --init -it playwright/chrome:playwright-x.xx.x
```
run a specific test suite
and in another terminal, run:
```bash
PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:4444/ yarn playwright test --project="Google Chrome" <test suite>
```
yarn playwright test src/e2e-tests/example.spec.ts
#### Specific example
open a terminal and run:
```bash
docker run --network host --rm --init -it playwright/chrome:playwright-1.46.0
```
and in another terminal, run:
```bash
PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:4444/ yarn playwright test --project="Google Chrome" e2e/playwright/command-bar-tests.spec.ts
```
run a specific test change the test from `test('...` to `test.only('...`
(note if you commit this, the tests will instantly fail without running any of the tests)
**Gotcha**: running the docker container with a mismatched image against your `./node_modules/playwright` will cause a failure. Make sure the versions are matched and up to date.
run headed
```
@ -280,6 +324,109 @@ Where `./store` should look like this
However because much of our tests involve clicking in the stream at specific locations, it's code-gen looks `await page.locator('video').click();` when really we need to use a pixel coord, so I think it's of limited use.
### Unit and component tests
If you already haven't, run the following:
```
yarn
yarn build:wasm
yarn start
```
and finally:
```
yarn test:unit
```
For individual testing:
```
yarn test abstractSyntaxTree -t "unexpected closed curly brace" --silent=false
```
Which will run our suite of [Vitest unit](https://vitest.dev/) and [React Testing Library E2E](https://testing-library.com/docs/react-testing-library/intro/) tests, in interactive mode by default.
### Rust tests
```bash
cd src/wasm-lib
KITTYCAD_API_TOKEN=XXX cargo test -- --test-threads=1
```
Where `XXX` is an API token from the production engine (NOT the dev environment).
We recommend using [nextest](https://nexte.st/) to run the Rust tests (its faster and is used in CI). Once installed, run the tests using
```
cd src/wasm-lib
KITTYCAD_API_TOKEN=XXX cargo run nextest
```
### Mapping CI CD jobs to local commands
When you see the CI CD fail on jobs you may wonder three things
- Do I have a bug in my code?
- Is the test flaky?
- Is there a bug in `main`?
To answer these questions the following commands will give you confidence to locate the issue.
#### Static Analysis
Part of the CI CD pipeline performs static analysis on the code. Use the following commands to mimic the CI CD jobs.
The following set of commands should get us closer to one and done commands to instantly retest issues.
```
yarn test-setup
```
> Gotcha, are packages up to date and is the wasm built?
```
yarn tsc
yarn fmt-check
yarn lint
yarn test:unit:local
```
> Gotcha: Our unit tests have integration tests in them. You need to run a localhost server to run the unit tests.
#### E2E Tests
**Playwright Browser**
These E2E tests run in a browser (without electron).
There are tests that are skipped if they are ran in a windows OS or Linux OS. We can use playwright tags to implement test skipping.
Breaking down the command `yarn test:playwright:browser:chrome:windows`
- The application is `playwright`
- The runtime is a `browser`
- The specific `browser` is `chrome`
- The test should run in a `windows` environment. It will skip tests that are broken or flaky in the windows OS.
```
yarn test:playwright:browser:chrome
yarn test:playwright:browser:chrome:windows
yarn test:playwright:browser:chrome:ubuntu
```
**Playwright Electron**
These E2E tests run in electron. There are tests that are skipped if they are ran in a windows, linux, or macos environment. We can use playwright tags to implement test skipping.
```
yarn test:playwright:electron:local
yarn test:playwright:electron:windows:local
yarn test:playwright:electron:macos:local
yarn test:playwright:electron:ubuntu:local
```
> Why does it say local? The CI CD commands that run in the pipeline cannot be ran locally. A single command will not properly setup the testing environment locally.
#### Some notes on CI
The tests are broken into snapshot tests and non-snapshot tests, and they run in that order, they automatically commit new snap shots, so if you see an image commit check it was an intended change. If we have non-determinism in the snapshots such that they are always committing new images, hopefully this annoyance makes us fix them asap, if you notice this happening let Kurt know. But for the odd occasion `git reset --hard HEAD~ && git push -f` is your friend.
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.