Skip to content

new-log-viewer: Load errors don't clear the data of the currently loaded file but the file no longer exists in the worker. #75

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

Closed
kirkrodrigues opened this issue Sep 19, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@kirkrodrigues
Copy link
Member

kirkrodrigues commented Sep 19, 2024

Bug

After loading a file successfully, trying to load an invalid file (by dragging and dropping) will:

  • clear the previously loaded file from the worker.
  • cause an error to be logged.

This has two issues:

  • Clearing the previously loaded file from the worker is undesirable.
  • It doesn't clear the loaded file from the UI which means any actions (like page switching) will fail with console errors.

Ideally, we should:

  • not invalidate the previously loaded file unless the new file is loaded successfully.
  • upon a fatal error in the worker, clear the previously loaded file from the UI.

HEAD

yscope-log-viewer version

1d5d95e

Environment

  • Browser: Firefox/Chrome
  • OS: Windows

Reproduction steps

  • Drag and drop a file that can be successfully loaded into the log viewer.
  • Drag and drop a file that can't be loaded into the log viewer.
  • Observe the console error.
  • Observe that page switching no longer works.
@kirkrodrigues kirkrodrigues added the bug Something isn't working label Sep 19, 2024
@kirkrodrigues
Copy link
Member Author

Looking more into it, the worker is replaced immediately when trying to load a new file, so keeping the previous file loaded won't be possible without more significant code changes. At least, we should clear the UI's state when we fail to load another file.

@junhaoliao
Copy link
Member

Fixed by #101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants