OWASP / threat-dragon

An open source threat modeling tool from OWASP
https://owasp.org/www-project-threat-dragon/
Apache License 2.0
902 stars 244 forks source link

Desktop should show indication when loading #823

Open jgadsden opened 9 months ago

jgadsden commented 9 months ago

Describe what problem your feature request solves: The desktop application can take a long time to load, and the spinner in App.vue does not show while loading

Describe the solution you'd like: Desktop app shows indication of loading

Additional context: steps to reproduce:

  1. download the installer for a new version of Threat Dragon
  2. install the new version
  3. invoke the new version and wait up to 30s before getting a window appearing
raghav1030 commented 9 months ago

Hey @jgadsden, can you please provide some more information as when is the spinner supposed to show up? when does the loading occur?

jgadsden commented 9 months ago

When the desktop application is loaded, it can take up to a minute for the application to show the welcome window. This is a relatively long time, and due to the large size of some of the components (probably can do something about that) and not displaying an initial 'wait for it' window

raghav1030 commented 9 months ago

I am still failing to understand where is it taking time to load. I started the desktop application in couple of ways but I didn't find any wait for it or its corresponding screen.

here is how I tested :

In development mode :

https://github.com/OWASP/threat-dragon/assets/94848646/eebb0f12-3db7-4f72-b528-4ff3598fc9c2

Using desktop application :

https://github.com/OWASP/threat-dragon/assets/94848646/ac1121bd-82c7-4b88-962f-9effae205d1b

raghav1030 commented 9 months ago

I am still failing to understand where is it taking time to load. I started the desktop application in couple of ways but I didn't find any wait for it or its corresponding screen.

here is how I tested :

In development mode :

2024-01-07.16-02-03.mp4 Using desktop application :

2024-01-07.16-00-24.mp4

Please guide me through it so I can have a better understanding of what the actually the issue is. A nice walkaround with a video of it from your side could sort things up?

Thanks.

jgadsden commented 9 months ago

When you install the released application installer and then invoke threat dragon, rather than running from the npm/pnpm command line, there is a delay before displaying the welcome screen as shown in your video for 'Using desktop application'

It is not a big deal, and varies from computer to computer, but it can be a little bit too long to be comfortable

raghav1030 commented 9 months ago

Hey @jgadsden! I have implemented a loading screen that pops up until the actual window loads. Is this what you were talking about?

https://github.com/OWASP/threat-dragon/assets/94848646/7be9a857-5798-433e-bba5-002d96be3171

jgadsden commented 8 months ago

Hello @raghav1030 ; yes, that is the sort of solution in mind. Thanks for working on this

raghav1030 commented 8 months ago

So shall we proceed with this loader only or do you have any suggestions regarding the ui or something else?

jgadsden commented 8 months ago

whatever you think is best, it can be done just for the loader but if you have other ideas then that is all good - ideas gratefully received!

raghav1030 commented 8 months ago

I can submit a pull request with this update for the loading screen. If we receive any future updates for the UI, we can easily incorporate them. Until then, this looks good ig?

jgadsden commented 8 months ago

yes, please go with it @raghav1030 and create the pull request

jgadsden commented 7 months ago

reopening this because the current solution does not work