* 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.
On `main`, the new test program in `tests/executor` causes a stack overflow. Running a flamegraph via `sudo cargo flamegraph --test executor -- serial_test_mike_stress_lines` shows that the problem: `fn execute_pipe_body` is very recursive.
When there's a long pipe, `execute_pipe_body` executes the next child expression, which is always a CallExpression. So `execute_pipe_body` calls `CallExpression::execute`. Which then calls `execute_pipe_body` again.
Fix is simple: `execute_pipe_body` now iterates over pipe subexpressions instead of recursing. This fixes the stack overflow, and is much faster too.
Closes https://github.com/KittyCAD/modeling-app/issues/1891.
* Bump ts lib
* Make engine background color driven by theme setting
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Force snapshots to dark mode, fix theme init
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Don't assume we have engineCommandManager in CameraControls,
because for some reason it's being loaded before engineConnection in test environments?
* Merge branch 'main' into change-bg-color
* Replace optional chaining with this.engineCommandManager
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Okay now all snapshot tests are actually in dark mode
* 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>
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
* always enter edit mode
* initial blocking of extra code-mirror updates
* dry out code
* rejig selections
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* clean up
* stream clean up
* update export
* sketch mode can be entered and exited for extrude faces
But has bugs
* startSketchOn working in some cases, editsketch animation working but not orientation of instersection plane etc
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)"
This reverts commit 406fca4c55.
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* remove comment
* add sketch on face e2e test
* tweenCamToNegYAxis should respect reduced motion
* initial sketch on face working with test
* remove temporary toolbar button and xState flow
* un-used vars
* snapshot test tweak
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* type tidy up
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)"
This reverts commit c39b8ebf95.
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)"
This reverts commit fecf6f490a.
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* rename
* sketch on sketch on sketch
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* typo
* startSketchOn Endcaps
end works, start is weird still
* clear selections for entity_ids that are not recognised
* fix sketch on end cap of second order extrustion
* tiny clean up
* fix sketch on close segment/face
* clean up 'lastCodeMirrorSelectionUpdatedFromScene'
* add code mode test for sketchOnExtrudedFace
* make end cap selection more robust
* update js artifacts for extrudes
* update kcl docs
* clean up
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* add workflow
* 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>
It's now a required job before merge is allowed. Unfortunately GitHub now blocks any non-Rust PR, because they require cargo clippy but don't trigger it to run.
Solution is simple, just always run cargo clippy, so it can pass, so that merge is allowed.
We shouldn't actually need `cargo build` CI checks. Because we're not building any binaries. Just `cargo check` should be enough. WASM builds are tested elsewhere.
CI is currently broken [logs here](https://github.com/KittyCAD/modeling-app/actions/runs/8349085118/job/22852456873?pr=1765#step:9:1046). Trying to fix.
OK I've fixed it. Process to fix was:
1. Revert be3fed8427 ("Add support for line, xLine, yLine, xLineTo, yLineTo (#1754)")
2. Restore that commit without any of its changes to Cargo.lock (it had, IMO, a lot of unnecessary changes)
3. `cargo update -p kittycad-execution-plan` (redoing only the necessary changes)
* Make tag last optional param
* Update all test assertions with correct tag format
* Format ts
* Some progress on tests and code mods
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* More sketch fixes
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Only 1 test left
* Clean up console.log
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Fix last ts test
* Clean up fmt
* Fix clippy too
* Update docs and fix small oversight on angled lines
* Fix more rust tests
* Make typescript happy
* Fmt
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
* Rename GlobalStateContext to SettingsAuthContext
* Naive initial impl of settings persistence to file system
* Update app identifier in tauri config
* Add "show in folder" tauri command
* Load from and save to file system in Tauri app
* Add documents drive to tauri permission scope
* Add recursive prop to default dir selection dialog
* Add success toast to web restore defaults action
* Add a way to validate read-in settings
* Update imports to use separate settings lib file
* Validate localStorage-loaded settings, combine error message
* Add a e2e test for validation
* Clean up state state bugs
* Reverse validation looping so new users don't error
* update settingsMachine typegen to remove conflicts
* Fmt
* Fix TS errors
* Fix import paths, etc post-merge
* Make default length units `mm` and 'metric'
* Rename to SettingsAuth*
* cargo fmt
* Revert Tauri config identifier change
* Update clientSideInfra's baseUnits from settings
* Break apart CommandBar and CommandBarProvider
* Bugfix: don't validate defaultValue when it's not configured
* Allow some TauriFS functions to no-op from browser
* Sidestep circular deps by loading context and kclManager only from React-land
* Update broken import paths
* Separate loaders from Router, load settings on every route
* Break apart settings types, utils, and constants
* Fix Jest tests by decoupling reliance on useLoaderData from SettingsAuthProvider
* Fix up Router loader data with "layout routes"
https://reactrouter.com/en/main/route/route#layout-routes
* Move settings validation and toast to custom hook so the toast renders
* fmt
* Use forks for Vitest
https://vitest.dev/guide/common-errors.html#failed-to-terminate-worker
* $APPCONFIG !== $APPDATA only on Linux
+ change the identifier back since it really doesn't seem to affect app signing
* Debugging on Linux
* Better directory validation, fix reset settings button
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* defaultDirectory can be empty in browser
* fmt
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* re-trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Only run cargo-test GH Action when wasm-lib is updated
Because we don't care about src-tauri's Rust code in this action
* $APPDATA !== $APPCONFIG on Linux
+ change the bundle identifier back
* Undo that commit, wrong branch
* Change approach to ignore the Tauri Rust files instead
* Switch back to only check wasm-lib
* Add ping pong health, fix up network events
* Change the default connection state for test
---------
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
* Handle many files as a zip archive
* Hopefully fix the test
* Try again
* Use latest kittycad/cli version
* update gitignore and push gltf-standard into snapshot array
* Extract zipped gltf; use 8 cores for CI
* Ignore unzipped files
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
---------
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Make onboarding links underlined and a different color
* Override underlined links that shouldn't be
* Update "KittyCAD" to "Zoo" camera controls, copy edits
* Copy edits through CodeEditor step, add counter to onboarding
* Notes through ParametricModeling step
* Notes through UserMenu step
* Add three-dots icon, separate Zoo logo link from project button
* Feedback through end of onboarding
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Fix ESLint warnings
* Revert cameraControls to 'KittyCAD', ensure we get type errors if that isn't correct in the future
* fmt
* Missed a reverted "Zoo" cameraControls item
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* try and make test more robust
* unused import
* add logging
* fix bug in export test
* Revert "unused import"
This reverts commit 0fb7090eca.
* revert more
* more fixes
* fix
* ultra snapshot test
* Revert "ultra snapshot test"
This reverts commit 17a883727e.
* Add new exportFile icon
* Isolate exportFromEngine command
* Naive initial export command
* Update types to accept functions for arg defaultValue, required, and options
* Make existing helper functions and configs work with new types
* Make UI components work with new types
support resolving function values and conditional logic
* Add full export command to command bar
* Replace ExportButton with thin wrapper on cmd bar command
* fmt
* Fix stale tests and bugs found by good tests
* fmt
* Update src/components/CommandBar/CommandArgOptionInput.tsx
* Update snapshot tests and onboarding wording
* Move the panel open click into doExport
* Don't need to input storage step in export tests anymore
* Remove console logs, fmt, select options if we need to
* Increase test timeout
---------
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* refactor mouse event interfaces
Importantly returning multiple intersections from raycastRing, but other clean up
* refactor enter exit args interface
* type tweak
* implement dual camer sync direction
The existance of the client side scene requires two cameras to stay in sync, really these need to be a master-slave relationship, intitial this was implemented with the client side scene taking the lead and sending updates to the server using the endpoint (as it didn't require an new endpoints), but even though we added a sequence property to this endpoint and sent it over udp, it was still an abuse of this endpoint as the engine didn't have this endpoint setup with a fload of messages and low-latency in mind.
Now we have migrated back to sending mouse events to the engine instead, but with the engine replying with camera details on drag_end etc so that we can keep the client camera in sync.
The client side camera still does take the master role in sketch mode as it makes sense to keep the low latency benfits of the local camera for the locallay rendered assets in sketch mode, moving the camera in this mode already did hide the engine camera while the camera is moving so as to avoid ghoasting so this works well.
The camera controls now work by syncing in either direction depending on what's appropiate
* fmt
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* update default plane extrude numbers
* 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>
Finish removing Sentry
Following Frank's PR in 8f5034f997, I'm
sending up a PR to finish pulling Sentry out of the codebase, rather
than just disabling it via configuration.
F
Signed-off-by: Paul R. Tagliamonte <paul@kittycad.io>
* client side sketch scene not respecting base-unit-scale
* test tweak
* remove dead code
* fix test
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* test fix up
* 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>
* Grackle: implement StartSketchAt stdlib function
* Move startsketchAt into a new 'sketch' module
* Further divide module
* Write SketchGroup to EP memory
* short term cam fix
* fix
* 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>
* pull out network indicator logic
* rename callbacks
* re-execute on reconnection
* make sure tool bar is disabled on start up
* clean up
* node safety
* disable toolbar buttons properly
* grey scale action icon icons dodgy
* test tweaks
* Revert "grey scale action icon icons dodgy"
This reverts commit c3d12a0f05.
* Disable modeling commands when network is bad (#1486)
* Disable modeling commands when network is bad
* disabel on execute too
* fmt
---------
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
* disable playwright snapshots temporarily
* disable export test instead
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
---------
Co-authored-by: Frank Noirot <frank@zoo.dev>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* solve a couple of scene scale bugs
* Some cam fixes (#1520)
* rotate and zoom basics working
* intergrate mouse guards, and add pan
* implement orthographic camera again
* implement switch to perspective camera again
* migrate dollyzoom
* make pan robust for differnt FOV and orthographic cam
* tween to quaternion and default plane selection working with quirks
* fix pan
It the up and right was derived from the camera's up, which is a static [0,0,1] not the camera's current cameras real up, which aligns itself as best to [0,0,1] but is not that especially when looking straight up or down, and the pan felt very awkward in these vertical look sintuations
* fix raycastRing to use new camera
* fix tween to quaternion for camera lock situations
And get all playwright tests passing
* fix up CamToggle, even thought this component is not setup properly to use react properties from our scene class
* add animation to cameras back in
* first big clean up of sceneInfra
* move more cam stuff out of sceneInfra
* clean up mouse guard logic
* clean up camera change callbacks
* fix some sitations where animation to xy doesn't work great
* needs to take the target into consideration
* last bits of clean up
* more clean up
* make vitest happ
* fix up remaining interaction guards
* make scrolling less sensative for trackpads
* remove debug cube
* fix snapshot tests
* Rename useCalc
* Move CommandBar so it has access to settings and kcl
* Create codemirror variable mention extension
* Make project path a dep of TextEditor useMemo
* Add incomplete KCL input for CommandBar
to replace current number arg type
* Add previous variables autocompletion to kcl input
* Fix missed typos from merge
* Working AST mods, not working variable additions
* Add ability to create a new variable
* Add icon and tooltip to command arg tag if a variable is added
* Polish variable naming logic, preserve when going back
* Allow stepping back from KCL input
* Don't prevent keydown of enter, it's used by autocomplete
* Round the variable value in cmd bar header
* Add Playwright test
* Formatting, polish TS types
* More type wrangling
* Needed to fmt after above type wrangling
* Update snapshot tests to account for new variable name autogeneration
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Merge branch 'main' into cmd-bar-make-variable
* Update all test instances of var name with number index after merge with main
* Partial revert of "Polish variable naming logic, preserve when going back"
This reverts commit dddcb13c36.
* Revert "Update all test instances of var name with number index after merge with main"
This reverts commit 8c4b63b523.
* Revert "Update snapshot tests to account for new variable name autogeneration"
This reverts commit 11bfce3832.
* Retry a refactoring of findUniqueName
* minor feedback from @jgomez720
- better highlighting of kcl input
- consistent hotkeys
- disallow invalid var names
* Polish stepping back state logic
* Fix tests now that keyboard shortcut changed
* Remove unused imports
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Fix tests
* Trigger CI
* Update src/components/ProjectSidebarMenu.test.tsx
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* re-trigger CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Trim space off the return type before continuing
My nightly compiler has a space at the end that the stable compiler
doesn't. This will trim space, if it exists, before removing the generic
bracket, which will work for both stable and current nightly, future
stable.
In the future this may be worth doing a trim on "> " but I don't reckon
today is that day.
Signed-off-by: Paul R. Tagliamonte <paul@kittycad.io>
* add make release bash script
* read me details
* uncomment git uncommited changes
* typo
* tweaks
* use package.json as source of truth, not git tags
* add modulo and power operators
* format
* point to main instead of serena branch
* reset cargo lock
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
---------
Co-authored-by: gserena <serena@zoo.dev>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add icons for arc and settings
* Update arc icon in toolbar
* Use settings icon instead of gear for settings
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* test that fails for when to enable extrude and sketch features
* add fix to make test pass
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* draft line snapshots
Make sure they don't get broken at some point, visual regression is only way to test these really
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* snapshot extrude on each default plane
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* respect camera target
* make default planes scale
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Rename GlobalStateContext to SettingsAuthContext
* Naive initial impl of settings persistence to file system
* Update app identifier in tauri config
* Add "show in folder" tauri command
* Load from and save to file system in Tauri app
* Add documents drive to tauri permission scope
* Add recursive prop to default dir selection dialog
* Add success toast to web restore defaults action
* Add a way to validate read-in settings
* Update imports to use separate settings lib file
* Validate localStorage-loaded settings, combine error message
* Add a e2e test for validation
* Clean up state state bugs
* Reverse validation looping so new users don't error
* update settingsMachine typegen to remove conflicts
* Fmt
* Fix TS errors
* rename for clarity
* typo
* make coverage happ+
somewhat pointless since we don't use coverage because its not complete with both vitest and playwright
* local storage issue
* fmt
* fix
* Update playwright readme, and snaps
Will fix#1340
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Pass engine connection state to NetworkHealthIndicator
* Create the basis for styling and further work
* Add icons
* Update styles on network health indicator
* Cleanup styles and unused state
* Rename State to NetworkHealthState
* Update tests
* fmt
---------
Co-authored-by: 49lf <ircsurfer33@gmail.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* make tsc happ
* better error msg
* fix control point issue
* basic code gen working for tangentialArc
* partical fix for move with arcs
* tangential arc move
* fix
* make eslint rules less annoying
* inital refactor of some xstate stuff
* more old tangential arc clean up stuff
* more tweaks
* add testing
* tweak xstate inspect
* temp remove test
* update formating for less conflicts
* fix state machine layout after merge
* shrug, something weird with xstate typegen
* renaming some xstate events
* tweak numbers to make CI playwright happ
* CI hacks
* more CI hacks
* more CI hacks
* new hack strategy
* run tests agian
* make cmd bar less flaky
* ci hacks
* CI hacks
* CI hacks
* CI hacks
* clean up
* fix
* still have constraint stuff to deal with
* progress on move rules
* update source ranges after no execute code-mod
* typo
* mvp working
* hide show sketch overlay
* match scaling
* update arrow head style
* animate line tool
* bypass xstate for animations, much smoother
* add new segment working with refactor needed for setup paper sketch
* refactor setup paper sketch
* tangantialArcTo drag animations working
* tangential arc polish
* cargo fmt
* clippy
* more clippy
* mock canvas
* last of clippy?
* typo
* more clippy stuff
* move util function so they are shareable with typescript
* migrate a bunch to rust and only rust
* add arc center point for draft tangential ac
* clippy tweak
* delete uneeded test
* Rough start to scaling arrow heads.
The tangent arrow heads are basically nuked and replaced while the
straight line sections are just rotated and repositioned, this means they
miss out on updating scaling number after a screen size changes.
Needs fixing
* fix bug with tool tips
* fix draft line start position
Having drag the end of teh path before selecting a tooltip would result in the draft line starting where the path used to end, stale data
* some progress with pan maybe
* fmt
* inital camera sync working
For perspective camera at least
* change three.js to use z-up
* add grid
* orthographic camera working with polish items TODO
* fix zoom level when swapping camera
* fix up camera/orbit changing on cam change (pan wasn't being respected)
* tidy up
* use orbit target instead of assuming scene center
* dynamic fov working
* animate orthographic to perspective and reverse
* fix import
* temp fix for batch commands
* initial client side scene sketch working
* remove hover log
* FOV adjust fix
* fix comment
* tear down sketch and small tweaks
* some progress with camera tweening
* combine dollyZoom engine commands
see
https://github.com/KittyCAD/modeling-api/compare/kurt-perspective-settings?expand=1
and
https://github.com/KittyCAD/engine/compare/kurt-perspective-settings?expand=1
* make tests happy (mocks)
* fix tween to vertical/camera-up bug
* tween to each axis with hacky solutions in there
* fix startSketchOn planes
* tidy startSketchOn
* tweening okay for now I think
* get sketching on default planes working
* allow editing on all default planes
* clean up enter and exit sketch logic
* tidy
* tidy
* remove more default plane stuff
* start of draft line
* remove some annoying parts of the paper.js implementation
* fix drag than equip line bug
* comment
* don't animate on skech tear down since it's used for draft line
* remove more default plane shit
* style draft line
* refine dashed line
* draft line set up and tear down mostly happy
* add on click logic ready for draft lines
* sketch mode with drag and draft mode working solidly now, straight segments only
* default planes match colors, hover and select still TODO
* hover and click logic working for default planes
Now just need the code mode to fire to 'startSketchOn(...)'
* select default planes
* remove some logs
* fix update infinite loop
* start of orbitControls port to Franks control guards
* hiding scenes at different times
* scene hide on camera move should be respected by scroll zoom
* basic hover working
* Hook up user camera settings to ClientSideScene (#1334)
* Refactor to not import utilities from Router.tsx
* Stop tracking changes or formatting *.typegen.ts
* Hook up cameraControls to ClientSideScene
* Remove camera controls toggle from temp debug panel
---------
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
* add select segment moves cursor
* highlight segments yellow on hover
* cursor ranges effect 2d line colors
* fix constrainst i.e. make sure the sketch is rejiged
* selecting nothing should remove selections
* remove hardcoded strings
* update get_tangential_arc_to_info rust util
* initial drawing of tangential arcs in client scene
* fix tangentialArc arrow head direction
* correct userData types for tangential arcs
* get tangential arc updates working
Doesn't include draging the head of the tangential arc itself yet
* spot of clean up
* make selections work with tangential arcs
* get draft tangential segment animated
* fix initial click weirdness for adding new tangential line
* couple tweaks
* add grace pixels /threshold to raycast
* redo arc dashes so that they spawn from the ccenter of the arc
* fix multi drag bug
* fmt
* add temp solution for close
* add default axis hover colors, still needs select logic
* selection of axis works, just with out selection color
* get axis selection colors working
* fix outdate source ranges after drag problem
* update moreNodePathFromSourceRange
* fix ts-rs issue/workaround
* fix default plane weirdness
* fix tangential arc rounding issue
* review clean up part 1
* review clean up part 2
Big state-diagram cull
* clippy
* typo
* clippy
* fix xstate types with typegen
* fix types
* clippy
* catch error
* fix test import issue
Not sure exactly what was happening but guessing circular import that vite didn't like
* add axis/plane info to sketch group tests
* case changes because of rs-ts bug, can probably revert this later
* start of playwright test fixes
* reduce geo complexity for straight segments
* fix cam adjust tests
* Revert "Clean up vite build warnings (#1332)"
This reverts commit c1f661ab52.
* selection e2e test fixed<
* remove camToggle to allow playwright tests to pass
* remove drag test
too brittle and needs to be redone from the ground up anyway
* trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* fix last test
* clean up part 3
* clean up part 4
* clean up part 5
* clean up sketch enter exit logic
* fix engine side selections
* default plane should not be selected form 'onDragEnd'
i.e. rotating the camera should not mean the user acidently selects a plane
* clean up state diagram around animating to sketch mode
Embracing that the animation is async and puting the interdiate steps in the state diagram clean up some logic and solved some bugs at the same time
* add test for multiple sketches
* typo
* make highlight more robust
* type tweak
* scale segmenst with distance from camera so they have a consistent pixel size/ screenspace size
* Jess's advice
* tsc and fmt
* clean up part 6
remove integer from xstate names
* clean up part 7
* integrate sequency in to camera moves
* fix tests
* update snapshot e2e
* small snapshot change
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* trigger ci
* Fix HomeLoaderData types
* update std stuff
* update kittycad rs client lib
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: Frank Noirot <frank@kittycad.io>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Make commands able to be configured as 'skippable'
* Make command machine able to skip arguments
* Add support for skippable selections, which are not known until within input component
* Update extrude command config to skippable
* Use defaultValue to seed initial arg values, not payload
* Remove unused `payload` command config prop
* Make skip and defaultValue types more exact
* Remove console logs
* fmt
* Revert type tightening, not worth the headache
* Revert "add kcl-samples menu item (#1352)"
This reverts commit a5879ceeda.
* Reapply "add kcl-samples menu item (#1352)"
This reverts commit 1c0ab6c8a2.
* Fix broken attempt at having tauri-driver part of Cargo.toml
* Make package version available in app code
* Show app version in settings page with link
* fmt
* Replace Vite define with Vite plugin
* Don't use import.meta.env in bare TS file
Previously, Grackle could compile a single computed property like `array[x]`. But it couldn't handle:
- Nested properties like `array[x][y]`
- Nested objects like `obj[x][y]`
- Arrays nested in objects, like `{x: [1,2,3]}`
- Objects in arrays like `[{a: 1}]`
It was quite difficult to find a way to handle this, which is why I started the EP Debugger project. The debugger helped me understand the VM much better and figure out a better way to handle these cases (the two new instructions AddrOfMember and CopyLen). Now Grackle can compile those cases!
Grackle can now compile |> pipelines. This means that these two programs compile to identical execution plans:
```kcl
fn double = (x) => { return x * 2 }
fn triple = (x) => { return x * 3 }
let x = 1 |> double(%) |> triple(%) // should be 6
```
```kcl
fn double = (x) => { return x * 2 }
fn triple = (x) => { return x * 3 }
let x = triple(double(1)) // should be 6
```
This required adding passing "what should % actually resolve to" through the program. This required modifying every call site of `plan_to_bind` and `plan_to_compute` to pass the data. To avoid doing this again, I wrapped that data into a struct called `Context` so that when we have more data like it, we can just add a new field and won't need to change every call site.
* Grackle: compile KCL function definitions
Definitions like `fn x = () => { return 1 }` can now be compiled. These functions can't be _called_ yet, but just defining them and mapping them to names works now.
* Failing test for executing a user-defined function
* Refactor: KclFunction is now an enum, not a trait
It's a pain in the ass to work with trait objects in Rust, so I'm refactoring to avoid needing traits at all. We can just use enums. This simplifies future work.
* Zero-parameter functions can be called
Finally, Grackle can actually run user-defined KCL functions! It basically treats them as a new, separate program (with its own scope of variables, nested within the existing parent scope).
* Failing test for multi-param KCL functions
* Execute user-defined functions which declare parameters
Previous commits in this PR got user-defined functions working, but only if they had zero parameters. In this commit, call arguments are bound to function parameters, so you can now compile functions with params.
* Users get a compile error if they try to pass more args to a function than it has parameters
This will help users get clear error messages.
* More test coverage
Among other things, this verify that Grackle compiles KCL functions which themselves either return or accept functions
* Start Grackle (KCL-to-EP compiler)
This begins work on a second, different executor. The old executor is a tree-walk interpreter, this executor compiles the KCL programs into the Execution Plan virtual machine defined in its [own crate](https://github.com/KittyCAD/modeling-api/tree/main/execution-plan). This executor is called "Grackle", after an Austin bird, and it's got its own module in wasm-lib so that I can keep merging small PRs and developing incrementally, rather than building a complete executor which replaces the old executor in one PR.
Grackle's "Planner" walks the AST, like the tree-walk executor. But it doesn't actually execute code. Instead, as it walks each AST node, it outputs a sequence of Execution Plan instructions which, when run, can compute that node's value. It also notes which Execution Plan virtual machine address will eventually contain each KCL variable.
Done:
- Storing KCL variables
- Computing primitives, literals, binary expressions
- Calling native (i.e. Rust) functions from KCL
- Storing arrays
Todo:
- KCL functions (i.e. user-defined functions)
- Member expressions
- Port over existing executor's native funtions (e.g. `lineTo`, `extrude` and `startSketchAt`)
* Create a file and expect stream to fail on Linux
Fixes#1190
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Try to add @franknoirot's suggestion
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Check settings first
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Working test
* Clean up
* Linux fix
* Linux fix attempt #2
* BUILD_RELEASE true temporarily
* Revert "BUILD_RELEASE true temporarily"
This reverts commit 42b2d5f6bb.
* Better comment
* Home checks, and proj name check
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Open proj
* Fix defaultDir in test
* WIP signout
* Workaround to recover from error
* Typo
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Naming tweaks
* Update heading font to be owners
* Update app icon
* Update Tauri App title
* Fix sign in page (#1232)
* Change to Zoo Modeling App, CI fixes (#1238)
* Replace website urls for dl.zoo.dev
---------
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
# Problem
This is my proposal for fixing #1107 . I've only done it for one stdlib function, `tangentialArcTo` -- if y'all like it, I'll apply this idea to the rest of the stdlib.
Previously, if users want to put a tag on the arc, the function's parameters change type.
```
// Tag missing: first param is array
tangentialArcTo([x, y], %)
// Tag present: first param is object
tangentialArcTo({to: [x, y], tag: "myTag"}, %)
```
# Solution
My proposal in #1006 is that KCL should have optional values. This means we can change the stdlib `tangentialArcTo` function to use them. In this PR, the calls are now like
```
// Tag missing: first param is array
tangentialArcTo([x, y], %)
// Tag present: first param is array still, but we now pass a tag at the end.
tangentialArcTo([x, y], %, "myTag")
```
This adds an "option" type to KCL typesystem, but it's not really revealed to users (no KCL types are revealed to users right now, they write untyped code and only interact with types when they get type errors upon executing programs). Also adds a None type, which is the default case of the Optional enum.
* Add new logomarks
* Replace KittyCAD and KCMA with Zoo and ZMA anywhere it's safe
* fmt
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Make README logo a PNG instead of an SVG
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* delete old exports
* update test
* tweaks and assets
* install kittycad cli
* fix weird typo
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Put a proper overlay behind the web app warning banner
Resolves#1197
* Add outline to kcma logo in readme
Resolves#1159
* 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>
* Tweak toaster look and feel
* Add icons, tweak plus icon names
* Rename commandBarMeta to commandBarConfig
* Refactor command bar, add support for icons
* Create a tailwind plugin for aria-pressed button state
* Remove overlay from behind command bar
* Clean up toolbar
* Button and other style tweaks
* Icon tweaks follow-up: make old icons work with new sizing
* Delete unused static icons
* More CSS tweaks
* Small CSS tweak to project sidebar
* Add command bar E2E test
* fumpt
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* fix typo in a comment
* Fix icon padding (built version only)
* Update onboarding and warning banner icons padding
* Misc minor style fixes
* Get Extrude opening and canceling from command bar
* Iconography tweaks
* Get extrude kind of working
* Refactor command bar config types and organization
* Move command bar configs to be co-located with each other
* Start building a state machine for the command bar
* Start converting command bar to state machine
* Add support for multiple args, confirmation step
* Submission behavior, hotkeys, code organization
* Add new test for extruding from command bar
* Polish step back and selection hotkeys, CSS tweaks
* Loading style tweaks
* Validate selection inputs, polish UX of args re-editing
* Prevent submission with multiple selection on singlular arg
* Remove stray console logs
* Tweak test, CSS nit, remove extrude "result" argument
* Fix linting warnings
* Show Ctrl+/ instead of ⌘K on all platforms but Mac
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Add "Enter sketch" to command bar
* fix command bar test
* Fix flaky cmd bar extrude test by waiting for engine select response
* Cover both button labels '⌘K' and 'Ctrl+/' in test
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Tweak toaster look and feel
* Add icons, tweak plus icon names
* Rename commandBarMeta to commandBarConfig
* Refactor command bar, add support for icons
* Create a tailwind plugin for aria-pressed button state
* Remove overlay from behind command bar
* Clean up toolbar
* Button and other style tweaks
* Icon tweaks follow-up: make old icons work with new sizing
* Delete unused static icons
* More CSS tweaks
* Small CSS tweak to project sidebar
* Add command bar E2E test
* fumpt
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* fix typo in a comment
* Fix icon padding (built version only)
* Update onboarding and warning banner icons padding
* Misc minor style fixes
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* update default plane size after grid update
* use similar scale
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* fix test numbers
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
KCEP's memory model stores 'values', which can be either numbers or strings. But we'll need to support storing complex objects like points, lines, sketchgroups, etc in memory too.
This PR adds a trait for KCEP composite types, which are laid out in KCEP memory as a consecutive series of values, one for each field.
Part of https://github.com/KittyCAD/modeling-app/issues/993
We want to be able to extract the execution plan (EP) from a KCL program, copy it, and paste it into an engine unit test. Therefore they must be de/serializable.
* update select logic for axis
* add abs Y and X constraints
* make selection tests much more thorough including axis selections
* fmt
* tweak
* tweak
* add snap to XY constraints
* side just for screenshot diffs
* update angle constraint to allow axis seleciton
* fix bux in absY constraint
* add sorting to constraintns
* add issue to TODO
* Revert "side just for screenshot diffs"
This reverts commit aae7874859.
* fix number because something must have updated in the engine
* typo
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Revert "add sorting to constraintns"
This reverts commit 36054a4069.
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* triggre CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* more e2e export fixes
* fixes
* fmt
* 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>
* WIP: Add tauri e2e test for auth on Linux
Fixes#968
* WIP
* WIP
* Working of through /tmp file for user code sharing
* rust int
* User code only in /tmp, fixes
* Longer timeout for github actions
* Remove timeout
* Fmt
* Fmt, 30sec timeout
* Test BUILD_RELEASE true
* Revert "Test BUILD_RELEASE true"
This reverts commit d3b59d4a6c.
* Disable concurrency limit for faster iterations on this PR
* Add logs for responses
* Test manual tauri build before e2e
* WIP
* Catch error on tauri::api:🐚:open
* Clean up
* Clean up
* timeout
* Force BUILD_RELEASE: true
* Back to debug, longer timeout
* Print if url opens ok too
* Check default browser in actions
* Remote shell call on linux (aka e2e for now)
* Fix fmt
* Move to data-testid, clean up
* Add log out section
* Clean up
* Fix typo
* Fix text detection
* Test AppImage
* Revert "Test AppImage"
This reverts commit cf126b1aa6.
* Add comments
* Change to env var
* Clean up
* Fmt fix
* Better package json name
* Add import @wdio/globals
* Back to require
* Update wdio, fix globals
* Move to typescript
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix ply and stl exports
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* trigger ci
* explanation comment
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* selections e2e test
* .only
* adde test
* make invalid kcl test pass on macos runner
* further attempt to solve invalid code test on macos
* add comment
* initial playwright setup and test
* try verbose logging
* double check resolution
* double check token
* remove logs
* try running on ubuntu and macos
* move e2e tests
* vitest ignores playwright tests
* add a series of tests
* tweak yarn setup
* typo
* update fmt
* action typo
* rust toolchain?
* remove .only from playwright test
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* add pan and zoom back
* try puting os in commit message
* A snapshot a day keeps the bugs away! 📷🐛 .os
* A snapshot a day keeps the bugs away! 📷🐛 .os
* fix commit message
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-latest)
* add command logs to UI for axis tests
* typo
* fmt
* remove .only
* add auto complete test
* remove .only
* update queries to be more playwright recommended
* move test utils
* remove waits from first test
* remove old snapshots
* re-arrange files and tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* trigger CI
* refactor plane test
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* remove .only
* try longer wait
* try snap shoting
* fmt
* better CI names
* fix
* fix linux
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* try make executes on load a bit more robust
* fix
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* stabilise snapshots
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-latest)
* make tests run linearly
* update naming
* tidy
* .only
* update readme
* trigger CI
* add set tool
* util clean up
* update readme
* readme tweaks
* self-review clean up
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* tweak
* update readme
* Ensure Vite preview server is running before running any Playwright tests (#1114)
* Ensure that Vite is serving before tests run
* Don't break secrets if developer has extra blank line in env file
* @mxschmitt's suggestions
* fix
* add wait-on types
* tsconfig fix
* update readme
* code template for sktech on each plane test
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Frank Noirot <frank@kittycad.io>
live at [app.kittycad.io](https://app.kittycad.io/)
live at [app.zoo.dev](https://app.zoo.dev/)
A CAD application from the future, brought to you by the [KittyCAD team](https://kittycad.io).
A CAD application from the future, brought to you by the [Zoo team](https://zoo.dev).
The KittyCAD modeling app is our take on what a modern modelling experience can be. It is applying several lessons learned in the decades since most major CAD tools came into existence:
Modeling App is our take on what a modern modelling experience can be. It is applying several lessons learned in the decades since most major CAD tools came into existence:
- All artifacts—including parts and assemblies—should be represented as human-readable code. At the end of the day, your CAD project should be "plain text"
- This makes version control—which is a solved problem in software engineering—trivial for CAD
- All GUI (or point-and-click) interactions should be actions performed on this code representation under the hood
- This unlocks a hybrid approach to modeling. Whether you point-and-click as you always have or you write your own KCL code, you are performing the same action in KittyCAD Modeling App
- This unlocks a hybrid approach to modeling. Whether you point-and-click as you always have or you write your own KCL code, you are performing the same action in Modeling App
- Everything graphics _has_ to be built for the GPU
- Most CAD applications have had to retrofit support for GPUs, but our geometry engine is made for GPUs (primarily Nvidia's Vulkan), getting the order of magnitude rendering performance boost with it
- Make the resource-intensive pieces of an application auto-scaling
@ -19,9 +19,9 @@ The KittyCAD modeling app is our take on what a modern modelling experience can
We are excited about what a small team of people could build in a short time with our API. We welcome you to try our API, build your own applications, or contribute to ours!
KittyCAD Modeling App is a _hybrid_ user interface for CAD modeling. You can point-and-click to design parts (and soon assemblies), but everything you make is really just [`kcl` code](https://github.com/KittyCAD/kcl-experiments) under the hood. All of your CAD models can be checked into source control such as GitHub and responsibly versioned, rolled back, and more.
Modeling App is a _hybrid_ user interface for CAD modeling. You can point-and-click to design parts (and soon assemblies), but everything you make is really just [`kcl` code](https://github.com/KittyCAD/kcl-experiments) under the hood. All of your CAD models can be checked into source control such as GitHub and responsibly versioned, rolled back, and more.
The 3D view in KittyCAD Modeling App is just a video stream from our hosted geometry engine. The app sends new modeling commands to the engine via WebSockets, which returns back video frames of the view within the engine.
The 3D view in Modeling App is just a video stream from our hosted geometry engine. The app sends new modeling commands to the engine via WebSockets, which returns back video frames of the view within the engine.
## Tools
@ -59,6 +59,10 @@ followed by:
```
yarn build:wasm-dev
```
or if you have the gh cli installed
```
./get-latest-wasm-bundle.sh # this will download the latest main wasm bundle
```
That will build the WASM binary and put in the `public` dir (though gitignored)
@ -68,7 +72,13 @@ finally, to run the web app only, run:
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
@ -94,7 +104,6 @@ For running the rust (not tauri rust though) only, you can
cd src/wasm-lib
cargo test
```
but you will need to have install ffmpeg prior to.
## Tauri
@ -137,7 +146,12 @@ Before you submit a contribution PR to this repo, please ensure that:
VERSION=x.y.z yarn run bump-jsons
```
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 past in the following
Alternatively you can try the experimental `make-release.sh` bash script that will create the branch with the updated json files for you.
run `./make-release.sh` for a patch update
run `./make-release.sh "minor"` for minor
run `./make-release.sh "major"` for major
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
```typescript
console.log(
@ -176,3 +190,112 @@ $ cargo +nightly fuzz run parser
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('...`
(note if you commit this, the tests will instantly fail without running any of the tests)
run headed
```
yarn playwright test --headed
```
run with step through debugger
```
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.
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.
If you want to limit to a single browser use `--project="webkit"` or `firefox`, `Google Chrome`
Or comment out browsers in `playwright.config.ts`.
note chromium has encoder compat issues which is why were testing against the branded 'Google Chrome'
You may consider using the VSCode extension, it's useful for running individual threads, but some some reason the "record a test" is locked to chromium with we can't use. A work around is to us the CI `yarn playwright codegen -b wk --load-storage ./store localhost:3000`
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.
#### 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.
How to interpret failing playwright tests?
If your tests fail, click through to the action and see that the tests failed on a line that includes `await page.getByTestId('loading').waitFor({ state: 'detached' })`, this means the test fail because the stream never started. It's you choice if you want to re-run the test, or ignore the failure.
We run on ubuntu and macos, because safari doesn't work on linux because of the dreaded "no RTCPeerConnection variable" error. But linux runs first and then macos for the same reason that we limit the number of parallel tests to 1 because we limit stream connections per user, so tests would start failing we if let them run together.
If something fails on CI you can download the artifact, unzip it and then open `playwright-report/data/<UUID>.zip` with https://trace.playwright.dev/ to see what happened.
#### Getting started writing a playwright test in our app
Besides following the instructions above and using the playwright docs, our app is weird because of the whole stream thing, which means our testing is weird. Because we've just figured out this stuff and therefore docs might go stale quick here's a 15min vid/tutorial
For formats lacking unit data (STL, OBJ, PLY), the default import unit is millimeters. Otherwise you can specify the unit by passing in the options parameter. If you import a gltf file, we will try to find the bin file and import it as well.
Import paths are relative to the current project directory. This only works in the desktop app not in browser.
*`options`: `ImportFormat` - Import format specifier (OPTIONAL)
```js
{
type:"fbx",
}|
{
type:"gltf",
}|
{
// Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system.
coords:{
// Axis the front face of a model looks along.
forward:{
// Axis specifier.
axis:"y"|"z",
// Specifies which direction the axis is pointing.
direction:"positive"|"negative",
},
// Axis pointing up and away from a model.
up:{
// Axis specifier.
axis:"y"|"z",
// Specifies which direction the axis is pointing.
direction:"positive"|"negative",
},
},
type:"obj",
// The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters.
units:"cm"|"ft"|"in"|"m"|"mm"|"yd",
}|
{
// Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system.
coords:{
// Axis the front face of a model looks along.
forward:{
// Axis specifier.
axis:"y"|"z",
// Specifies which direction the axis is pointing.
direction:"positive"|"negative",
},
// Axis pointing up and away from a model.
up:{
// Axis specifier.
axis:"y"|"z",
// Specifies which direction the axis is pointing.
direction:"positive"|"negative",
},
},
type:"ply",
// The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters.
units:"cm"|"ft"|"in"|"m"|"mm"|"yd",
}|
{
type:"sldprt",
}|
{
type:"step",
}|
{
// Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system.
coords:{
// Axis the front face of a model looks along.
forward:{
// Axis specifier.
axis:"y"|"z",
// Specifies which direction the axis is pointing.
direction:"positive"|"negative",
},
// Axis pointing up and away from a model.
up:{
// Axis specifier.
axis:"y"|"z",
// Specifies which direction the axis is pointing.
direction:"positive"|"negative",
},
},
type:"stl",
// The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters.
units:"cm"|"ft"|"in"|"m"|"mm"|"yd",
}
```
### Returns
`ImportedGeometry` - Data for an imported geometry.
excerpt: "Computes the logarithm of the number with respect to an arbitrary base."
layout: manual
---
Computes the logarithm of the number with respect to an arbitrary base.
The result might not be correctly rounded owing to implementation details; `log2()` can produce more accurate results for base 2, and `log10()` can produce more accurate results for base 10.
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.