feat(web): confirm before closing a terminal (#7592)