Improve how config changes are handled
See original GitHub issueCurrently, when cypress.json file is changed, we re-open the project and close the browser if it is currently open and running a spec. We do this because a config option like modifyObstructiveCode or chromeWebSecurity could have changed, which requires restarting the project and/or browser. The downside is that the currently running spec is ‘lost’ and the user has to manually re-select it to run their tests again.
When the plugins file is changed, we reload the plugins file and it automatically takes effect without re-opening the project or closing the browser. This is arguably wrong because the user could have changed options that affect the project or the browser. New events coming in 4.0 (run:start, spec:start, etc) will also necessitate the need to ‘restart’ the run (re-open the project). It’s also an issue because it’s not clear to the user that anything has happened when they change their plugins file, so they might think they need to completely quit and re-open Cypress for their changes to take effect.
We should make this consistent and improve the user experience for both these cases by doing the following:
- On cypress.json/plugins file updates, notify user in the browser that changes have occurred, noting where they occurred (cypress.json, plugins file, etc). These changes will not be loaded yet.
- In that notification, give the user a button with the option to restart the browser and project. It will re-open the browser with the current spec.
Tasks:
- Research/design
- Add change UI to Desktop GUI
- Add change UI to reporter
- Reload specs on config change events
- Review tests, make sure they’re comprehensive
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9 (9 by maintainers)

Top Related StackOverflow Question
I feel like the user knows that they’ve made changes, so we just need to gently remind them that their changes will not be applied until they restart. Some phrasing like: “cypress.json has been modified since starting Cypress. Changes will not take effect until you restart Cypress.”
Looks good in the reporter pane!
Think we’ve got to direct folks to actually click the restart button, maybe something like this?