Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electron test: (regression) deleting all files, creating multiple untitled files, creating a file with the same name, creating a file and renaming it to an already existing file #3088

Closed
franknoirot opened this issue Jul 22, 2024 · 7 comments
Assignees
Labels
bug Something isn't working desktop-app Issues from the desktop app. high-priority tests Pull requests that update or improve our test suite

Comments

@franknoirot
Copy link
Collaborator

It must be something about our routing logic sending the user to a fallback part that is causing the issue, probably assuming a main.kcl. We should just send the user to the project root because we have Rust-side fallback logic that will go to the first available file or create a main.kcl if no KCL files at all are found.

Demo

Screenshare.-.2024-07-19.5_33_28.PM-compressed.mp4
@franknoirot franknoirot added bug Something isn't working desktop-app Issues from the desktop app. labels Jul 22, 2024
@jessfraz
Copy link
Contributor

we will want a tauri test/electron test/playwright test whatever for this

@jessfraz jessfraz added the tests Pull requests that update or improve our test suite label Aug 13, 2024
@jessfraz jessfraz changed the title Deleting a file when no main.kcl is present leads to app crash Electron test: (regression) Deleting a file when no main.kcl is present leads to app crash Aug 15, 2024
@jessfraz
Copy link
Contributor

be sure to test this as well:

open project -> rename main.kcl to hello.kcl
restart app, go back, try to open settinsg

@jessfraz jessfraz self-assigned this Aug 15, 2024
@jessfraz
Copy link
Contributor

create a new file with the same same; delete all files; create a new file leave it as Untitled, create another, etc

@jessfraz jessfraz removed their assignment Aug 15, 2024
@lf94 lf94 self-assigned this Aug 19, 2024
@lf94
Copy link
Contributor

lf94 commented Aug 22, 2024

delete all files;

This causes the stream to not reload the model, leaving the old model there (but deletes all the code and causes no crashes). main.kcl is recreated when reloading the app.

@lf94
Copy link
Contributor

lf94 commented Aug 22, 2024

create new file with same name

This causes the old file to be overwritten with no warning. (This was not the case when I ported; it would stop you, throwing an EEXISTS error.)

@lf94
Copy link
Contributor

lf94 commented Aug 23, 2024

Both are fixed now in the upcoming PR.

@lf94 lf94 changed the title Electron test: (regression) Deleting a file when no main.kcl is present leads to app crash Electron test: (regression) deleting all files, creating multiple untitled files, creating a file with the same name, creating a file and renaming it to an already existing file Aug 23, 2024
@lf94
Copy link
Contributor

lf94 commented Aug 28, 2024

Resolved by #3679

@lf94 lf94 closed this as completed Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working desktop-app Issues from the desktop app. high-priority tests Pull requests that update or improve our test suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants