Implement dynamic primary CTA button based on workspace state
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=563083) </details> <!--IssueSummary end--> MR: Pending <!-- NOTE: For context on MR heading, see: https://handbook.gitlab.com/handbook/engineering/devops/dev/create/remote-development/index.html#relationship-of-issues-to-mrs --> ## Description To [improve the workspace failure visibility & troubleshooting](https://gitlab.com/groups/gitlab-org/-/epics/16787), we need to implement dynamic primary CTA buttons on workspace cards that change based on the workspace state so that users can quickly perform the most relevant action for each workspace. ## Before/After | Before | After | |--------|--------| | Before | ![image](/uploads/1ee94ae33fc4f1f401fa05736e1edb79/image.png){width=1267 height=338} | | After | ![image](/uploads/844c76644b87d8305de8304075bc2582/image.png) | ## Acceptance criteria - [ ] Running workspaces display "Open workspace" button (existing functionality) - [ ] `FAILED`/`ERROR` workspaces display "See logs" button that navigates to error logs view created in https://gitlab.com/gitlab-org/gitlab/-/issues/565418+ - [ ] Stopped workspaces display "Start" button that initiates workspace startup - [ ] Button states handle loading/disabled states appropriately during actions - [ ] Button text and functionality updates immediately when workspace state changes - [ ] Loading states prevent multiple simultaneous actions on the same workspace ## TODO: Implementation plan <!-- NOTE: Feel free to expand with more sections and headers as needed --> <!-- DO NOT TOUCH BELOW -->
issue