* Fix orbit style setting not updating in camControls
* Break apart camera movement tests, add trackball to orbit one
* I don't think zoom was actually testing changes, this fixes that
* test refactor: pass in expected cam pos, not its inverse
* Lints
* Lint fix broke the test, fix fix
* Gah biome whyyy did you format other test names like that?
* fix bug of not saving project when dragging a segment, add a test
* Update e2e/playwright/projects.spec.ts
Co-authored-by: Jace Browning <jacebrowning@gmail.com>
---------
Co-authored-by: Jace Browning <jacebrowning@gmail.com>
* Don't use WEAK and yellow
* fmt && lint && tsc
* Fix up the rebase & dark mode colors
* Update src/hooks/useNetworkStatus.tsx
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* Change Weak to Ok
* Change Connected to Strong
* fmt
* Sync selectors for start sketch
* Remove unused test-util brought back in a rebase
* Align the other OKs
* Add an else statement to overallState
---------
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* first step of UI using trelative angentialArc
* use tangentialArcTo when snapping to one of the axes
* remove duplications via tangentialArcHelpers
* update test: snapToProfile start only works for current profile
* add test: Can add multiple profiles to a sketch (all tool types)
* update test: Straight line snapping to previous tangent
* fixes for removing individual constraints (should keep endAbsolute for lines, tangentialArcs)
* fix fnNameToToolTipFromSegment arcTo
* update snapshot test to use relative tangentialArc
* stabilize some snapshot tests
* stabilize and update Inch snapshot test on ubuntu
* fix tsc
* stabilize and update Millimeter scale snapshot test on ubuntu
* update snapshot for Inch scale test
* Update snapshots
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Move some sketch functions to KCL
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Move asserts to KCL
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* sweep, loft -> KCL
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Move pattern transforms to KCL
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Fix the black screen of death
* fmt
* make check
* Clean up
* Fix up zoom to fit
* Change how emulateNetworkConditions work
* Do NOT use browser's offline/online mechanisms
* Fix test
* Rename desktop e2e scripts and tags for consistency
* Show local command in main test step
* Restore 'e2e' prefix to clarify GitHub UI
* Add web script to contributor guide
* Fix error of not showing errors when reopening KCL code pane
* add test for errors not shown after reopening code pane
* rename test
* typo in e2e/playwright/editor-tests.spec.ts
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* lint
* fmt
* fix test: Opening and closing the code pane will consistently show error diagnostics
* PR feedback: use catch(reportRejection) for safeParse
* no need for lint rule
---------
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Before, the LSP snippet for `startProfile` was
```
startProfile(%, at = [3.14, 3.14])
```
Now it's
```
startProfile(%, at = [0, 0])
```
This is configured by adding a `snippet_value=` field to the stdlib macro. For example:
```diff
#[stdlib {
name = "startProfile",
keywords = true,
unlabeled_first = true,
args = {
sketch_surface = { docs = "What to start the profile on" },
- at = { docs = "Where to start the profile. An absolute point." },
+ at = { docs = "Where to start the profile. An absolute point.", snippet_value = "[0, 0]" }, tag = { docs = "Tag this first starting point" },
},
tags = ["sketch"]
}]
```
## Work for follow-up PRs
- Make this work for KCL functions defined in KCL, e.g. [`fn circle`](36c8ad439d/rust/kcl-lib/std/sketch.kcl (L31-L32)) -- something like `@(snippet_value = "[0, 0]")` perhaps
- Go through the stdlib and change defaults where appropriate
* fix: saving off code
* fix: saving off progress
* chore: implemented kcl sample assembly unique sub dir creation
* fix: removing testing console logs
* fix: cleaning up old comment
* fix: add to file always does subdir/main.kcl now for single files
* fix: auto fmt
* fix: delete project and folder from ttc
* fix: fixed deleting projects and subdirs
* fix: if statement logic fixed for deleting project or subdir
* fix: TTC isProjectNew makes main.kcl not a subdir.
* fix: fixing e2e test
* fix: this should pass now
* pierremtb/make-insert-take-over-the-import-world
* Add test that doesn't work locally yet :(
* Fix test 🤦
* Change splice for push
* Fix up windows path
---------
Co-authored-by: Kevin Nadro <kevin@zoo.dev>
Co-authored-by: Kevin Nadro <nadr0@users.noreply.github.com>
* fix: saving off code
* fix: saving off progress
* chore: implemented kcl sample assembly unique sub dir creation
* fix: removing testing console logs
* fix: cleaning up old comment
* fix: add to file always does subdir/main.kcl now for single files
* fix: auto fmt
* fix: delete project and folder from ttc
* fix: fixed deleting projects and subdirs
* fix: if statement logic fixed for deleting project or subdir
* fix: TTC isProjectNew makes main.kcl not a subdir.
* fix: fixing e2e test
* fix: this should pass now
* Revert "Update failing E2E tests with new behavior, which allows skip with preselection"
This reverts commit d72bee8637.
* Fix: Can't go back to Profiles step in sweep commands
Fixes#7080
* Make it better but still not quite there
* I think I got it: this was likely the real bug making submit fire twice
* Bring timemouts back
* use effect for focus of command palette submit button, not autoFocus
autoFocus is being overridden by the Headless UI Dialog component's
focus management here
https://headlessui.com/v1/react/dialog#focus-management (we do not have
access to pass back initialFocus in this case). So we can use an effect
to imperatively focus the button when this component is mounted.
* Update sweep tests to submit the command with Enter
* Add backtrace to errors
* Add display of backtraces with hints
* Change pane badge to only show count of errors
* Fix property name to not collide with Error superclass
* Increase min stack again
* Add e2e test that checks that the diagnostics are created in CodeMirror
* Remove unneeded code
* Change to the new hotness
* Submit selection to command on unmount of selection arg input
This fixes#7024 by saving the user's selection to the command even if
they click another argument in the command palette's header. It does no
harm to save the selection to the argument, even if it's being torn down
because the user dismissed it has no negative effect.
* Refactor to not auto-submit before selection is cleared on mount
Thanks E2E test suite
* Update failing E2E tests with new behavior, which allows skip with preselection
---------
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Disallow segment selection in sweep, plus displayName: Profiles for clarity
Fixes#7044
* Change selection hints for solid2d to be profile instead of face
* Update tests
* More fixes
* Fix tests following behavior change: we don't select segments in code anymore but profiles
* Remove Create with Text-to-CAD from the toolbar
* Remove "prompt-to-edit" wording, call commands "create" and "edit"
* Use sparkles for the ML feature, not chat
* lints
* Start fixing up tests, there are probably more though
* Fix up a few more tests
* Fix up prompt-to-edit tests (yay using fixtures!)
* Fix native file menu tests
* Update snapshots
* Fix menu test
* Fix snaps
---------
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* fix: when creating a t2c in a new project make the file name main.kcl
* fix: when creating a sample in a new project and there is only 1 file make the filename main.kcl
* fix: auto fixes
* fix: share links generate main.kcl
* fix: codespell typoe
* fix: fixing E2E tests
* Fix 3 more tests
* fix: share url link e2e file name fix
---------
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Frank Noirot <frank@zoo.dev>
* Improve url sharing for orgs and pros
* Remove sharing via menu item
* fmt
* Not sure what's different but it is
* fmt & lint
* whoops
* Update snapshots
* Typos from codespell
* Fix alignment
* Update snapshots
* Prune
---------
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* Make "skip = false" non-required args appear in header
* Make non-required, unskippable selection args work
* Make prompt-to-edit's selection arg optional but non-skippable
* Update src/components/CommandBar/CommandBarSelectionInput.tsx
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* Fix dumb logic bug
Thanks for user testing @Irev-dev
* Update mixed input to show selection
Feel free to revert @Irev-Dev if this is the wrong move, but I found it
odd that this component doesn't show the current selection in the text
like the other selection input does, so I copied that over.
* Merge branch 'main' into franknoirot/adhoc/optional-selection-args
* Merge branch 'main' into franknoirot/adhoc/optional-selection-args
* Merge remote-tracking branch 'origin' into franknoirot/adhoc/optional-selection-args
* fix tests
* change copy again
* Update src/components/CommandBar/CommandBarSelectionMixedInput.tsx
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
1. Remove all `waitFor` hidden states for the post-dismiss toast:
something about Playwright is making toasts hang in a way I've never
seen in real use. Not something I'm worried about, and we still test
that the toast fires the first time we dismiss.
2. Remove all `scene.connectionEstablished()` calls. This has me more
worried because some of the flakiness on this front seems like we're not
able to handle the rapid machine-speed navigation and overwriting that
this test does when it doesn't have to `waitFor` toasts to disappear.
But that is not the point of this test, which is just to ensure the
onboarding plays correctly and initiates correctly.
* Helix can't be selected as path arg in point-and-click sweep
Fixes#6966
* Remove old dry-run validations on Sweep, Loft, Revolve, and Shell
* Base on dry-run validation remove branch
* Add test
* First pass at consistency in modelingMachine codemods
* Add 'no kcl errors' guard instead of if check for all the existing ones
* Add more commands and improve consistency
* Add comments
* Fix test with old kcl that was showcasing the very behavior we're trying to fix
https://kittycadworkspace.slack.com/archives/C07A80B83FS/p1747231832870739?thread_ts=1747231178.515289&cid=C07A80B83FS
* Add test for sketch and helix
* Remove guard use and move hasErrors check closer to updateAst calls
* Revert "Remove guard use and move hasErrors check closer to updateAst calls"
This reverts commit 868ea4b605.
* Remove toasts from guards
* Remove some scene.settled calls
* Lint
* More shaky fixes
* Clean up and more test fixes
---------
Co-authored-by: Frank Noirot <frankjohnson1993@gmail.com>
* Add a Stop command that does a bit of cleanup in the engineStateMachine
* Major network code startup refactor; backoff reconnect; many more logs for us
* Save camera state after every user interaction in case of disconnection and restoral
* Translate basic WebSocket error numbers into useful text
* Add a RestartRequest event to the engineCommandManager
* Adjust for a rebase
* Add E2E test for stream pause behavior
* Fix snapshot test
* fmt, lint
* small issue
* Fix tests
* Fix up idle test
* One last fix
* fixes
* Remove circ dep
* fix test
* use a const for time
* TEST -> isPlaywright instead
* whoops
* Keep test toast messages around for longer
* Check for at least two locators
I wasn't able to reproduce, but it's possible one stuck around from a previous test.
* Restore the native file menu tests
* fix: saving off progress
* chore: making progress cleaning up these verbose tests and improving app logic for e2e
* chore: rewriting tests
* fix: reworking application logic for file menu in the scene and e2e scene file menu test
* chore: updating more e2e tests
* fix: updated all the tests, auto fixers
* fix: trying to improve tests within E2E, they aren't failing locally even with --repeat-each=10
* fix: application logic has a bug that you can navigate instantly but the scroll to view code will not trigger which breaks end to end tests
* fix: improving E2E tests
* fix: fixing clipboard typo
* fix: porting test() for each native file menu to a test.step to speed it up
* fix: auto fixes and console log helper function for playwright runtimes
* fix: more cleanup
* fix: trying to fix these...
* fix: got the tests working
* fix: addressing PR comments
* fix: trying to stablize the tests
* fix: auto fixes
* fix: trying to make it the command name and not arg? could be a source of race condition if the input is not written fast enough?
* fix: maybe because this close locator was running too quickly?
* fix: panic timeout, classic
* fix: these are gone
* fix: shorter waits
---------
Co-authored-by: Kevin Nadro <kevin@zoo.dev>
Co-authored-by: Kevin Nadro <nadr0@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>