We already do everything we can to do this, we use a library that supposedly does this, however:
- this only works on MacOS
- it uses appleScript
- it's effectively a bit of a security issue
- It doesn't work for all browsers
Normally applications are isolated from each other. 1 application might make a request together, but no direct control.
Browsers (for privacy and security reasons) do not allow other applications to ask which tabs are open, or give the ability to change the URL of 1 of the tabs.
So the script that makes this happen makes use of a loophole, where the OS automation tool (which has access to all sorts of things to be able to automate user's tasks) effectively acts on the user's behalf and searches for the right tab and forces it to refresh.
This is incredibly convenient, I know.
But it has it's caveats.
I think the combo that is supposed to work is MacOS + Chrome.
If you don't want storybook to open the page at all (and manually refresh) add --ci flag to the command.