batches: make viewing the details of a locally-executed spec less weird
Created by: courier-new
Although we're hiding locally-executed specs from the execution list views, it's still possible (and, in fact, likely) to pull up the details for one such batch spec from the batch changes list page if, for example, a user executes a spec locally but leaves it unapplied. For local specs, the experience in the execution UI was a little weird. This just makes it slightly less disorienting:
- The "Execution" tab will be disabled for locally-executed specs, since there's nothing to view there.
- The workspaces preview panel will be hidden, since there's no workspaces resolution to show.
- The execution stats will be hidden, and the state badge will show a special indicator, "LOCAL", to indicate the state is not really reflected from this page for locally-executed specs.
If someone does manually try to navigate to /execute
, there will just be a message that there is no execution to show for this spec. I suppose I could also just conditionally disable the routes, but I thought this would be slightly more helpful.
Unrelated, but there was apparently an eslint configuration change recently that now requires names for the functions passed to React.memo
, so I updated those places for the SSBC components to get rid of the warning. For that reason I would recommend reviewing with the "don't show whitespace changes" option enabled, since a bunch of stuff got re-indented as a result.
Test plan
Tested locally with specs run from src-cli. Added additional storybook coverage for the components impacted.