batches: show actions menu with preview + retry options when spec completes with errors
Created by: courier-new
Closes https://github.com/sourcegraph/sourcegraph/issues/37084.
- Makes
viewerCanRetry
false if there's nothing to retry, aka if the batch spec completed successfully. - Improves tooltip text for batch spec state badge.
- Prevents text wrap on Actions menu.
- Shows Actions menu instead of Preview button with warning when batch spec completes but with errors. The actions menu has options to "Preview with errors", "Retry failed workspaces", and "Edit spec". The preview option takes you to Step 4 as before.
Demo:
https://user-images.githubusercontent.com/8942601/173707813-88955d5a-24d2-4a54-b962-78cc2c08d87a.mov
Test plan
Manually tested behavior, see video above. Component has storybook story coverage, which I also validated.