* 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>
* plumbus fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* Simplify the pentagon test
* Fix up triangle png
* Triangle plumbuses now face the camera
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: Jess Frazelle <github@jessfraz.com>
Port forward to ts-rs 8.1
We're just waiting on a release that includes a PR that we sent[1] for this
to use the cargo version. For now we'll have to use the git release.
[1]: c5109a00e4
* Add keyboard shortcuts for sketch and modeling tools
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Add a playwright test
* skip linux
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fmt fml
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* Give more generous test timeout for worst case engine runs
* Fix up test mouse clicks after zoom bug fixes
---------
Signed-off-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>
Co-authored-by: Jess Frazelle <github@jessfraz.com>
* make rust function with lots of tests
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* pull thru function to tauri and app
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* one more test;
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* Cut release v0.21.6
* 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>
* make sure there is at least one kcl file in the dir to show in list
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* open the correct file not assuming main.kcl
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* add file path tests
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* update settings paths
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* new images
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>
Reset inSequence back to 1 every time we connect to the Engine,
otherwise we'll continue to think the current sequence is a high number
(while the engine has no memory of the last session -- and may even be a
new engine instance!) and ignore messages until we pass that counter
again.
Signed-off-by: Paul Tagliamonte <paul@zoo.dev>
* Add stdlib functions for getting sketch profile start and its components
* Fix it up and actually generate snapshots
* cargo fmt
* Use `.to` instead of `.from`
* Update docs with EXPECTORATE=overwrite
* Add README
* fmt
* Update flow test to account for more autocompletion options when typing "start"
---------
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
* Disable logo link in browser, clean up menu components' organization
* Include the app name in Tauri as screenreader-only text
* Fix tsc issue in component test
* Add a playwright test to ensure logo is never a link in the browser
* Update broken component tests
* Add some JSDocs comments to types, convert some existing comments.
* Add JSDoc comments to EngineCommandManager
* Add deprecation message to `lastArtifactMap`
* fmt
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* 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>
* sketch dies on exit XY sketch
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* trigger ci
* fix test
* fix test
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Set default extrude distance expression to something more sensible, like 5
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Rerun CI
* run CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* CI
* Use old 5 + 7 for highlight test it's touchy
* Same with sketch on face it seems to work better with 5 + 7 and that's fine
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Disable all pane resize handles except right
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Ensure onboarding buttons are visible on shorter screens
* Fix dismiss button hover styling
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Move the command bar out to the right in the AppHeader
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* trigger ci
* trigger ci
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Revert "Revert "client side sketch updating properly with direct changes to t… (#2286)"
This reverts commit e7ab645267.
* rejig out side of xstate
* test tweak
* more test tweak
* refactor some codeManager stuff
* tsc
* try and fix tests
* revert small uneeded change
* fix
* snapshot tweak
* more test tweak
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* small tweak
* disable bad test
* fmt
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Bring back tauri e2e tests
Fixes#2061 once green
* Fix if
* Add bail mocha opt and more cleanup, disable second dir test
* Add mocha types and tsconfig
* Add 10sec delay for auth (worked in 22.04 local docker)
* Add back close settings click
* Disable open file
* Re-enable settings test
* Handle error page
* Back to brower.execute location.href
* Add --force to tauri-driver install (I think because of cache)
---------
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
* Remove tauri.release-macos.conf on debug builds
* BUILD_RELEASE: true
* Back to conditional BUILD_RELEASE for merge
* Remove tauri.release-macos.conf.json
* Search and highlight, no scroll yet
* Tweak toggle look
* Style search, fix state changes
* Separate out settings components
* Include description in results, minor style tweaks
* Fix tsc import
* Remove unused imports in Settings
* fmt
It's not permissible to transition the bundle policy during runtime, so
we need to maintain max-bundle, even if we know there's no ICE and it
won't matter any.
Signed-off-by: Paul R. Tagliamonte <paul@kittycad.io>
* Add test clicking through each onboarding step
* Revert "get rid of code pane shit (#2259)"
This reverts commit d341681c0d.
* Fix the missing #code-pane id
* fmt
* WIP: automate release, get PR info from commit
* Get version from PR title in script
* Add create release script call under comment, will wait for next release to test
* Test with v0.19.0
* Change to draft
* Clean up after v0.19.0 test
* Test for v0.19.1
* Clean up after test
---------
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
* more spped up wasm build
* try download again
* clean up
* rando change to rust to check it builds wasm
* make workflow more grokable/commented
* Revert "rando change to rust to check it builds wasm"
This reverts commit d2d9926b4b.
Pass the ?pool query param through to the backend.
This will slice off the ?pool= param and pass it to the WebSocket
request, which requests that the Zoo API use a particular pool of
engines. This isn't something any users of the zoo api require; but it's
needed for the internal engine Zoo development workflow. This may be
used in the future, but for now this'll be always enabled. Passing any
value in the production servers will result in a "no backend" error for
now.
* adding dark edge lines in light mode + enabling SSAO
* 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>
Co-authored-by: Frank Noirot <frank@zoo.dev>
Co-authored-by: Frank Noirot <frank@kittycad.io>
* use engine animations for sketch on face, but not default planes
* massage things
* fix type issue
* small problem in playwright test<
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* some tests fixes
* more test tweaks
* more test tweaks
* clean up
* more tidy
* tests are a pain
* more test stuff
* test stuff again
* fix micro think axes in sketch mode
* more test shit
* more test shit more
* more test tweaks
* more test tweaks
* more test stuff
* trigger ci
* clean up
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* strongly type all websocket requests to the engine so we cant send a bad one
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* udpates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* use new lib
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates to lint
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* Initial draft rectangle appear on screen
* rectangle tool extra
* Fix draft lines in all quadrants
* Wait for first click to set up draft rectangle
* Working rectangle commit
* Update toolbar icon and disabling logic
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* fmt
* Working tool, one remaining bug around naively updating sketch nodes
* Break out rectangle AST utilities
* Remove unused imports
* Disable Rectangle tool if sketch is not empty
* Use existing tools for generating tag names
* Add snapshot test for tool
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Rerun CI
* Add comments, remove unrelated changes
* fix rectangle bug from bad ast
* Make rectangle tool equippable when the line tool is equipped
* Change snapshot test to check the draft rectangle instead of commited one
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Rerun CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Rerun CI
---------
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add exclamationMark icon
* Add basic LowerRightControls component
* Create a help menu
* Remove NetworkHealthIndicator from AppHeader
* Refactor Tooltip to be able to be corner-anchored
* Add a better flag back to the Tooltip
* Give tooltip a faint theme outline on light mode too
* Fix broken reset onboarding behavior on home page
* Fix bug with isInProject
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add doc comment to getThemeColorForEngine
* Add a user-level setting for highlightEdges
* Add a custom settings action to update the edge line visibility
* Make the settings pane always open to user settings first
* Refactor engineConnectionMananer.start() to take a settings object
* Revert alway open user settings
* Set highlight edges on engine start up
* fmt fml
* Fix tsc error
* WIP: Custom updater modal
Fixes#1663
* First working example with data
* Clean up, moved code to index.tsx
* Clean up
* Nicer dialog
* Add relaunch dialog (macOS)
* max-height in case of a long text
* Clean up
* Add component tests and fix name consistency
* Update styling, re-add md parser
* Clean up
* Quick typo
* Clean up
* Rebase on tauri v2
* Clean up
* Add updater permissions
* Remove dialog from config
* Fix restart after install
* attempt to fix cookie token bullshit in another way
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* format
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* log in prod for now since im going insane
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* Make user avatar 404 in snapshot tests
* Make fallback menu button look better
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Give AppHeader consistent height
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Rerun CI
* 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>
* Fix sketch on face snapshot to click on face instead of default plane
* 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>
* Fix pointer-event logic depending on open panes, etc
* Little KclTextEditorPane style tweaks
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* 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>
* Split ModelingSidebar out into own component
* Consolidate all ModelingPane components and config
* Make ModelingSidebar a directory of components and config
* Remove unused components
* Proper pane styling
* Make tooltip configurable to visually appear on hover only
* Remove debug panel from App
* Fix current tests
* Rename to more intuitive names
* Fix useEffect loop bug with showDebugPanel
* Fix snapshot tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Rerun CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Merge branch 'main' into franknoirot/sidebar
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Rerun CI
* Maybe some flakiness in the validation initScripts?
* Avoid test flakiness by waiting for more signals that loading is completed
* Don't assert, just wait for the element to be enabled
* Don't let users accidentally click the gap between the pane and the side of the window
* Firm up extrude from command bar test
* Get rid of unused imports
* Add setting to disable blinking cursor (#2065)
* Add support for "current" marker in command bar for boolean settings
* Add a cursorBlinking setting
* Rename setting to blinkingCursor, honor it in the UI
* Fix scroll layout bug in settings modal
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Rerun CI
* CSS tweaks
* Allow settings hotkey within KclEditorPane
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Rerun CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Rerun CI
* Ensure the KCL code panel is closed for camera movement test
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Make sure that the camera position inputs are ready to be read from
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Remove repeat awaits
* Make camera position fields in debug pane update when the pane is initialized
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Undo that CameraControls change because it made other things weird
* retry fixing camera move test
* Fix race condition where cam setting cam position parts were overwriting each other
* Rerun CI
* Rerun CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Remove stale linux snapshots
* Update test names to be different in more than just casing to boot
* Just delete all the engine scale snapshots for now so only the correct ones get committed
* 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>
* Fix vite build (tauri build still broken)
* Fix yarn builds with a couple of shortcuts
* Fix file creation
* Fix documentDir behavior
* Got stream with default file
* Clean up
* Clean up
* Use 'unstable'; fix devtools callsite
The API changed a bit here, which forces us to use the unstable crate
feature. The call to open devtools is also new; it's now on the
webview not window.
Signed-off-by: Paul R. Tagliamonte <paul@kittycad.io>
* Bring back read_dir_recursive from v1
* Fix dates
* More fixes, incl. conf files
* cargo fmt
* Add Updater plugin
* Fix types
* Fix isTauri detection and updater bootup
* Schemas
* Clean up
* Disable devtools
* Attempt at fixing builds
* WIP Ubuntu dep
* WIP Ubuntu dep
* WIP keys in debug
* Enable updater only on release builds
* Reenable webtools on debug
* No linux bundles
* Typo
* Attemp at fixing --bundles none
* Manual tauri debug build
* Empty commit to trigger the CI
* Fix settings
* Empty commit to trigger the CI
* Merge branch 'main' into pierremtb/issue1349
* Add allow-create perm
* tauri-driver no cap
* Empty commit to trigger the CI
* Clean up
* Clean up
* Migrate to tauri v2
Fixes#1349
* Fix fmt
* Allow the nightly builds to be installed side-by-side with released builds
Fixes#1867
* Clean up
* Merge branch 'main' into pierremtb/issue1349
* Force BUILD_RELEASE: true
* Bump tauri to new beta
* Merge branch 'main' into pierremtb/issue1349
* Fix linux tests
* Fix types
* Add --verbose to tauri-action
* Move --verbose to front
* Back to tauri-driver@0.1.3 and single \ for win
* Back to latest driver, and windows wip
* Disable release conf temporarily
* Rollback to 2.0.0-beta.2
* Rollback to 2.0.0-beta.1
* Move bundle to root for src-tauri/tauri.release.conf.json
* All packages to latest (add http and shell to package.json)
* Testing latest commit for tauri-action
* Remove tauri action
* Add cat
* WIP
* Update ci.yml
* Disable release conf
* Disable rust cache
* Add tauri-action back for release builds
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Update .codespellrc
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Fix type
* Clean up
* More clean up
* Fix path concatenation with join
* Attempt at fixing linux tests
* Config clean up
* Downgrade to tauri-driver@0.1.3
* Looks like tauri v2 is actually doing better with linux package names ah!
* Change Linux apt packages
* Increase wdio connectionRetryTimeout
* Revert connectionRetryTimeout and bump tauri packages
* Back to latest tauri-driver
* Disable linux e2e tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Trigger CI
* Clean up
* Update snapshots
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Trigger CI
* Remove @sentry/react
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Rename migrated.json to desktop.json
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Trigger CI
* Clean up
* Fix json command
---------
Signed-off-by: Paul R. Tagliamonte <paul@kittycad.io>
Co-authored-by: Paul R. Tagliamonte <paul@kittycad.io>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
* fixing fillet changes
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Trigger CI with empty commit
* 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>
Co-authored-by: Frank Noirot <frank@kittycad.io>
* Revert Playwright tests to use addInitScript to adjust storage state
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Fix tsc
* Rerun CI
* Rerun CI
* Only use page.addInitScript within tests
because technically adding multiple init scripts to the context has an indeterminate run order, per the [Playwright docs](https://playwright.dev/docs/api/class-page#page-add-init-script)
* Rerun CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix vite build (tauri build still broken)
* Fix yarn builds with a couple of shortcuts
* Fix file creation
* Fix documentDir behavior
* Got stream with default file
* Clean up
* Clean up
* Use 'unstable'; fix devtools callsite
The API changed a bit here, which forces us to use the unstable crate
feature. The call to open devtools is also new; it's now on the
webview not window.
Signed-off-by: Paul R. Tagliamonte <paul@kittycad.io>
* Bring back read_dir_recursive from v1
* Fix dates
* More fixes, incl. conf files
* cargo fmt
* Add Updater plugin
* Fix types
* Fix isTauri detection and updater bootup
* Schemas
* Clean up
* Disable devtools
* Attempt at fixing builds
* WIP Ubuntu dep
* WIP Ubuntu dep
* WIP keys in debug
* Enable updater only on release builds
* Reenable webtools on debug
* No linux bundles
* Typo
* Attemp at fixing --bundles none
* Manual tauri debug build
* Empty commit to trigger the CI
* Fix settings
* Empty commit to trigger the CI
* Merge branch 'main' into pierremtb/issue1349
* Add allow-create perm
* tauri-driver no cap
* Empty commit to trigger the CI
* Clean up
* Clean up
* Migrate to tauri v2
Fixes#1349
* Fix fmt
* Merge branch 'main' into pierremtb/issue1349
* Force BUILD_RELEASE: true
* Bump tauri to new beta
* Merge branch 'main' into pierremtb/issue1349
* Fix linux tests
* Fix types
* Add --verbose to tauri-action
* Move --verbose to front
* Back to tauri-driver@0.1.3 and single \ for win
* Back to latest driver, and windows wip
* Disable release conf temporarily
* Rollback to 2.0.0-beta.2
* Rollback to 2.0.0-beta.1
* Move bundle to root for src-tauri/tauri.release.conf.json
* All packages to latest (add http and shell to package.json)
* Testing latest commit for tauri-action
* Remove tauri action
* Add cat
* WIP
* Update ci.yml
* Disable release conf
* Disable rust cache
* Add tauri-action back for release builds
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Update .codespellrc
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Fix type
* Clean up
* More clean up
* Fix path concatenation with join
* Attempt at fixing linux tests
* Config clean up
* Downgrade to tauri-driver@0.1.3
* Looks like tauri v2 is actually doing better with linux package names ah!
* Change Linux apt packages
* Increase wdio connectionRetryTimeout
* Revert connectionRetryTimeout and bump tauri packages
* Back to latest tauri-driver
* Disable linux e2e tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Trigger CI
* Clean up
* Update snapshots
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Trigger CI
* Remove @sentry/react
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Rename migrated.json to desktop.json
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Trigger CI
* Change wasm url to http on Windows
---------
Signed-off-by: Paul R. Tagliamonte <paul@kittycad.io>
Co-authored-by: Paul R. Tagliamonte <paul@kittycad.io>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
* Clean up batch code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Remove 'flush_batch: bool' from send_modeling_cmd
It was always being set with false, and it was
bugged for true. If true was set, the cmd would
never actually be run.
* Fix derive-docs
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Cut release v0.17.3
* 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>
Send a WsMsg::Close before we bail normally.
This will hopefully trigger engine-manager to release the engine back to
the pool faster, allowing us to increase the number of threads we can
run the modeling-app tests with.
Signed-off-by: Paul R. Tagliamonte <paul@zoo.dev>
* Fix project directory setting input
* Remove unused imports
* Almost working Tauri test
* Finish Tauri e2e test
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* fmt
* Try a different Webriver selector
* Update themeColor component to use new updateValue API
* 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>
* Add a setting for themeColor
* Add primary-color to Tailwind, driven by themeColor setting
* Get rid of most uses of "energy" colors
* Change out the rest of the energy colors
* Tweak NetworkHealthIndicator light mode checkmarks
* Handful of other CSS tweaks while I'm here:
- remove the AppHeader bg and border
- pane margins
- better dark mode button styles
* Make Zoo logomark a badge
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Re-run CI post-snapshots
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Retrigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Make it possible to include a setting only on the Settings dialog, not also in the command bar.
* Add web-only setting to permanently dismiss banner
* Honor the dismiss web banner setting
* Remove unused state from useStore
* Make the banner only appear in production builds again
* Print WebSocket errors when we get them
Previously, we eat them and ignore them, but now we'll seek out
and actively print error messages to stderr. We'd previously get a
websocket closed error, but we'll usually get an Error message over the
WebSocket before its closed on us.
Here's some example output during a crash
```
got ws error: WebSocket protocol error: Connection reset without closing handshake
Caused by:
Connection reset without closing handshake
thread 'serial_test_cube_mm' panicked at tests/executor/main.rs:1136:10:
called `Result::unwrap()` on an `Err` value: engine: KclErrorDetails { source_ranges: [SourceRange([180, 188])], message: "Modeling command failed: websocket closed early" }
test serial_test_cube_mm ... FAILED
got error message: {
"error_code": "bad_request",
"message": "Too many active connections, only 2 allowed per user."
}
```
* Rename cargo-criterion to cargo-bench
* Use iai not criterion in CI
We want to benchmark the KCL parser and tokenizer to make sure we don't
accidentally slow them down. Generally Rust projects use Criterion to
benchmark code. Criterion runs your functions a few thousand times to
get reliable wall-clock measurements.
This is good for locally benchmarking but bad for benchmarking in CI.
Why? Because in CI, you're running a container on some shared VM, so
wall-clock time might have a lot of interference from noisy neighbours.
Also, your benchmarks take a long time to run and eat up paid CI minutes.
A better approach for benchmarking in CI is to just count the number of
CPU instructions executed. This correlates with wall-clock time, but it
only needs to run the function once, so it takes much less time. It also
isn't changed by any noisy neighbours running on the same VM or hardware.
This PR adds a new benchmark suite which counts instructions using `iai`,
from the creator of criterion. He says iai and criterion complement each
other nicely. We can run criterion locally and run iai in CI.
* Update image in markdown docs
* Cut release v0.17.2
* 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: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* dynamic cursor depending on mouse scene state
* hover stuff
* bump min length
* clean up
* sketch on face failing randomly
* more time out for extrude snapshots
* Update src/clientSideScene/sceneEntities.ts
Co-authored-by: Frank Noirot <frank@zoo.dev>
* move for profileStart handle, and select when no tool equiped
---------
Co-authored-by: Frank Noirot <frank@zoo.dev>
* get branch up to where it was before
* setup dots properly
* only show extra handle on hover
* use partical texture for plus button
* fix regression
* fix deleted line
* fix sketch on face test
* caluclate segment length in screen-space/in-pixels
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* side small segment handles on resize
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Make sure this works on setup and update of segments
* Add to tangential arcs
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)"
This reverts commit 5dc1adacae.
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)"
This reverts commit b8ceea179c.
* try and fix sketch on face in CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* more test fix
* convert scaling to be based on pixels
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* trigger ci
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)"
This reverts commit 6287c943dd.
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)"
This reverts commit 1baa3819db.
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Update src/clientSideScene/segments.ts
Co-authored-by: Frank Noirot <frank@zoo.dev>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* reduce line thickness
* 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
* try putting init script back in
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Frank Noirot <frank@zoo.dev>
* fix member expression in object expression
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* new renders
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* empty trigger
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* empty
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* BROKEN: start of scopes for each setting
* Clean up later: mostly-functional scoped settings!
Broken command bar, unimplemented generated settings components
* Working persisted project settings in-folder
* Start working toward automatic commands and settings UI
* Relatively stable, settings-menu-editable
* Settings persistence tweaks after merge
* Custom settings UI working properly, cleaner types
* Allow boolean command types, create Settings UI for them
* Add support for option and string Settings input types
* Proof of concept settings from command bar
* Add all settings to command bar
* Allow settings to be hidden on a level
* Better command titles for settings
* Hide the settings the settings from the commands bar
* Derive command defaultValue from *current* settingsMachine context
* Fix generated settings UI for 'options' type settings
* Pretty settings modal 💅
* Allow for rollback to parent level setting
* fmt
* Fix tsc errors not related to loading from localStorage
* Better setting descriptions, better buttons
* Make displayName searchable in command bar
* Consolidate constants, get working in browser
* Start fixing tests, better types for saved settings payloads
* Fix playwright tests
* Add a test for the settings modal
* Add AtLeast to codespell ignore list
* Goofed merge of codespellrc
* Try fixing linux E2E tests
* Make codespellrc word lowercase
* fmt
* Fix data-testid in Tauri test
* Don't set text settings if nothing changed
* Turn off unimplemented settings
* Allow for multiple "execution-done" messages to have appeared in snapshot tests
* Try fixing up snapshot tests
* Switch from .json to .toml settings file format
* Use a different method for overriding the default units
* Try to force using the new common storage state in snapshot tests
* Update tests to use TOML
* fmt and remove console logs
* Restore units to export
* tsc errors, make snapshot tests use TOML
* Ensure that snapshot tests use the basicStorageState
* Re-organize use of test.use()
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Update snapshots one more time since lighting changed
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Fix broken "Show in folder" for project-level settings
* Fire all relevant actions after settings reset
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Properly reset the default directory
* Hide settings by platform
* Actually honor showDebugPanel
* Unify settings hiding logic
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* fix first extrusion snapshot
* another attempt to fix extrustion snapshot
* Rerun test suite
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* trigger CI
* more extrusion stuff
* Replace resetSettings console log with comment
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
* set selection as top level event only
* target quirk fix
* fix old bug
* 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>
Bug: You can see here that the two programs under tests/ are equivalent, just one uses
pipelines and one always assigns to a new sketchgroup. However, the pipeline
produces weird visual bugs. Jess did a git bisect to figure out this was the problem that
Mike was experiencing, around weird visual artifacts with filleting.
Ultimately the bug was that my rewritten `execute_pipe_body` function was executing
the first expression of the pipeline body twice! In most unit tests this didn't matter,
because the first expression in a pipeline was startSketchAt. No big deal to run that
twice. However, in Mike's program, the first expression was `make_circle` or `pentagon`,
user-defined functions that sent a lot of API calls. This meant the pipeline duplicated a lot
of geometry, causing Z-fighting and weird artifacts.
./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:
@ -68,7 +74,13 @@ finally, to run the web app only, run:
yarn start
yarn start
```
```
## Developing in Chrome
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
The Copilot LSP plugin in the editor requires a Zoo API token to run. In production, we authenticate this with a token via cookie in the browser and device auth token in the desktop environment, but this token is inaccessible in the dev browser version because the cookie is considered "cross-site" (from `localhost` to `dev.zoo.dev`). There is an optional environment variable called `VITE_KC_DEV_TOKEN` that you can populate with a dev token in a `.env.development.local` file to not check it into Git, which will use that token instead of other methods for the LSP service.
### Developing in Chrome
Chrome is in the process of rolling out a new default which
Chrome is in the process of rolling out a new default which
@ -77,45 +89,32 @@ 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
the eye with a slash through it in the URL bar, and clicking on "Enable
Third-Party Cookies".
Third-Party Cookies".
## Running tests
## Desktop
First, start the dev server following "Running a development build" above.
To spin up the desktop app, `yarn install` and `yarn build:wasm-dev` need to have been done before hand then
Then in another terminal tab, run:
```
```
yarn test
yarn electron: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 changed.
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 electron: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
```bash
cd src/wasm-lib
yarn install
cargo test
yarn wasm-prep
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:
Before you submit a contribution PR to this repo, please ensure that:
@ -130,35 +129,40 @@ Before you submit a contribution PR to this repo, please ensure that:
## Release a new version
## 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` and create a Cut Release PR
```bash
That will create the branch with the updated json files for you:
VERSION=x.y.z yarn run bump-jsons
- 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.
Alternatively you can try the experimental `make-release.sh` bash script that will create the branch with the updated json files for you.
After it runs you should just need the push the branch and open a PR.
run `./make-release.sh` for a patch update
run `./make-release.sh "minor"` for minor
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
**Important:** It 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.
```typescript
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.
grab the md list and delete any that are older than the last bump
2. Merge the PR
#### 2. Smoke test artifacts from the Cut Release PR
3. Create a new release and tag pointing to the bump version commit using semantic versioning `v{x}.{y}.{z}`
The release builds can be find under the `artifact` zip, at the very bottom of the `ci` action page for each commit on this branch.
We don't have a strict process, but click around and check for anything obvious, posting results as comments in the Cut Release PR.
The other `ci` output in Cut Release PRs is `updater-test`, because we don't have a way to test this fully automated, we have a semi-automated process. Download updater-test zip file, install the app, run it, expect an updater prompt to a dummy v0.99.99, install it and check that the app comes back at that version (on both macOS and Windows).
#### 3. Merge the Cut Release 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.
#### 4. 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_.
#### 5. Profit
A new Action kicks in at https://github.com/KittyCAD/modeling-app/actions, which can be found under `release` event filter.
4. A new Action kicks in at https://github.com/KittyCAD/modeling-app/actions, uploading artifacts to the release
## Fuzzing the parser
## Fuzzing the parser
@ -181,39 +185,51 @@ $ cargo +nightly fuzz run parser
PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:4444/ yarn playwright test --project="Google Chrome" <test suite>
```
An example of a `<test suite>` is: `e2e/playwright/flow-tests.spec.ts`
YOU WILL NEED A PLAYWRIGHT-SECRETS.ENV FILE:
```bash
# ./e2e/playwright/playwright-secrets.env
token=<your-token>
snapshottoken=<your-snapshot-token>
```
```
then replace "your-token" with a dev token from dev.zoo.dev/account/api-tokens
then replace "your-token" with a dev token from dev.zoo.dev/account/api-tokens
then:
run playwright
```
yarn playwright test
```
run a specific test suite
```
yarn playwright test src/e2e-tests/example.spec.ts
```
run a specific test change the test from `test('...` to `test.only('...`
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)
(note if you commit this, the tests will instantly fail without running any of the tests)
run headed
run headed
```
```
yarn playwright test --headed
yarn playwright test --headed
```
```
run with step through debugger
run with step through debugger
```
```
PWDEBUG=1 yarn playwright test
PWDEBUG=1 yarn playwright test
```
```
However, if you want a debugger I recommend using VSCode and the `playwright` extension, as the above command is a cruder debugger that steps into every function call which is annoying.
However, if you want a debugger I recommend using VSCode and the `playwright` extension, as the above command is a cruder debugger that steps into every function call which is annoying.
With the extension you can set a breakpoint after `waitForDefaultPlanesVisibilityChange` in order to skip app loading, then the vscode debugger's "step over" is much better for being able to stay at the right level of abstraction as you debug the code.
With the extension you can set a breakpoint after `waitForDefaultPlanesVisibilityChange` in order to skip app loading, then the vscode debugger's "step over" is much better for being able to stay at the right level of abstraction as you debug the code.
@ -258,9 +274,39 @@ Where `./store` should look like this
</details>
</details>
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.
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:nowatch
```
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
cargo test
```
#### Some notes on CI
#### 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.
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.