Repository navigation
feat(hub): clarify build status indicators - #378
Open
lukasoppermann wants to merge 1 commit into
Open
lukasoppermann wants to merge 1 commit into
lukasoppermann wants to merge 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Active issues remain: a deleted BuildStateLabel test leaves the changed state mappings and indicators unprotected, and successful or superseded build options lose their screen-reader status labels.
2 open issues
What changed in this PR
This pull request clarifies Build lifecycle states across Hub pages and the Build selector with softer labels, progress spinners, and failure icons.
Changes:
- Adds soft Build-state styling and state-specific visual indicators.
- Updates Build pages and selector stories for queued, running, failed, and successful states.
- Adds Storybook coverage and removes duplicate narrow-layout stories and the previous component test.
| File | Description |
|---|---|
| hub/app/javascript/pages/builds-show-page/index.tsx | Uses the soft Build-state label appearance on Build pages. |
| hub/app/javascript/features/prototype-workspace-header/stories.tsx | Adds Build selector lifecycle-state stories and removes duplicate narrow-layout stories. |
| hub/app/javascript/features/prototype-workspace-header/index.tsx | Adds spinner and failure indicators to Build selector options. |
| hub/app/javascript/features/prototype-workspace-header-layout/styles.css | Aligns selector content and styles failure indicators. |
| hub/app/javascript/components/build-state-label/types.ts | Adds the label appearance option. |
| hub/app/javascript/components/build-state-label/styles.css | Defines soft label backgrounds, state colors, spacing, sizing, and truncation. |
| hub/app/javascript/components/build-state-label/stories.tsx | Adds Storybook coverage for soft Build-state labels and their state presentations. |
| hub/app/javascript/components/build-state-label/index.tsx | Adds state-specific visuals and appearance classes to Build-state labels. |
| hub/app/javascript/components/build-state-label/index.test.tsx | Removes the previous BuildStateLabel unit test. |
Review effort: Lite (adaptive)
Comment on lines
+257
to
273
| {build.stateLabel && | ||
| (build.state === "queued" || | ||
| build.state === "running" || | ||
| build.state === "failed") ? ( | ||
| <span className="review-shell__build-status" title={build.stateLabel}> | ||
| {build.state === "failed" ? ( | ||
| <XCircleIcon | ||
| aria-hidden="true" | ||
| size={16} | ||
| className="review-shell__build-status-failed" | ||
| /> | ||
| ) : ( | ||
| <HubSpinner decorative size="small" /> | ||
| )} | ||
| <HubVisuallyHidden>{build.stateLabel}</HubVisuallyHidden> | ||
| </span> | ||
| ) : null} |
Comment on lines
+19
to
+30
| export function BuildStateLabel({ label, state, appearance = "outline" }: BuildStateLabelProps) { | ||
| return ( | ||
| <Label color={stateVariants[state]} size="small"> | ||
| <Label | ||
| className={`build-state-label build-state-label--${appearance} build-state-label--${state}`} | ||
| color={stateVariants[state]} | ||
| size="small" | ||
| leadingVisual={ | ||
| state === "running" ? ( | ||
| <HubSpinner decorative size="small" /> | ||
| ) : state === "failed" ? ( | ||
| <StopIcon size={12} /> | ||
| ) : undefined |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
e28862b2a2c06dbe4f94cac61f500467fc6fb8ee↑ Frontend lint, format, tests, build and Storybook build passed.
↓ Full Hub CI was blocked by an npm registry connection reset; authenticated live Hub behavior remains unverified.
Why
Build states need to be easier to recognize on the Build page and in the Build selector.
What changes
Build pages now show softly colored state labels, with a spinner for running Builds and a red icon for failures. The Build selector uses only a spinner for queued and running Builds and a red icon for failed Builds; status text remains available to screen readers.
Added stories for the label appearances and Build selector states. Removed duplicate narrow-width stories; Storybook's viewport controls cover those layouts.
Storybook screenshots
All screenshots use a 1575 × 1232 CSS-pixel viewport.
Build pages
Hub/Pages/Builds/Show / In Progress — light

Hub/Pages/Builds/Show / Failed — light

Hub/Pages/Builds/Show / Successful — light

Hub/Pages/Builds/Index / Multiple — light

Hub/Pages/Prototype Review / Multiple — light

Build labels
Components/Build State Label / Default — light

Components/Build State Label / States — light

Components/Build State Label / Soft Background — light

Components/Build State Label / Soft Background — dark

Components/Content Page Header / With Status — light

Build selector
Hub/Features/Review/Shell Header / Build States — light

Hub/Features/Review/Shell Header / Build States — dark

Hub/Features/Review/Shell Header / Newer Build Failed — light

Hub/Features/Review/Shell Header / Long Build Status — light

Hub/Features/Review/Shell Header / Many Builds — light
