feat(apollo-react): collapse stage-node task execution to one line with runs/rework icons#965
Conversation
|
Apollo Coded App preview deployments are ready.
|
Dependency License Review
License distribution
Excluded packages
|
There was a problem hiding this comment.
Pull request overview
This PR updates the StageNode task row rendering in apollo-react to keep execution details on a single line (duration inline, and runs/rework shown as compact amber icon-chips with tooltip text), preventing stage nodes from growing taller during execution.
Changes:
- Refactored
TaskContentfrom a two-row layout into a single-row layout and introduced runs/rework icon-chips. - Unified play button placement to the far right of the row.
- Updated/expanded unit tests to cover the new chip behaviors, required-marker rules, and placement changes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/apollo-react/src/canvas/components/StageNode/TaskContent.tsx | Collapses task execution UI to a single row; adds runs/rework chips and updates required marker + play button layout. |
| packages/apollo-react/src/canvas/components/StageNode/TaskContent.test.tsx | Rewrites badge-related tests to validate new runs/rework chip behavior and the updated layout rules. |
📊 Coverage + size by packagePer-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.
"Coverage" is each package's own |
|
Thanks @Copilot — both addressed in 3e0b19f: 1. API contract mismatch. Corrected the
2. Runs-chip a11y. Added 192 StageNode tests, biome, and |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (2)
packages/apollo-react/src/canvas/components/StageNode/TaskContent.tsx:199
- The rework chip is icon-only. Since
Badgerenders a<div>and the icon isaria-hidden, there is no accessible text, and the tooltip is hover-only. Add an explicit role (e.g.role="img") so thearia-labelprovides an accessible name.
<CanvasTooltip content={reworkTooltip} placement="top" hide={isDragging}>
<Badge
variant="warning"
aria-label={reworkTooltip}
className="h-[14px] rounded-full px-1 py-0 [&>svg]:size-3"
>
<RotateCcw aria-hidden />
</Badge>
</CanvasTooltip>
packages/apollo-react/src/canvas/components/StageNode/StageNode.types.ts:119
- The JSDoc for
retryDurationreferences aReworked (+{retryDuration})placeholder, but the actual localized message usesReworked (+{duration}). Consider updating the comment to match the real placeholder/text to avoid confusion for consumers.
/**
* Total time spent re-working/re-running this task (e.g. `"25m"`). When set, a "rework" icon-chip
* (↺) is shown; the value is surfaced as `Reworked (+{retryDuration})` in the chip's tooltip.
*/
…th runs/rework icons Collapses each stage-node task's execution state onto a single row: duration inline, runs and rework as compact amber icon-chips with detail in tooltips, instead of wrapping to a second row. Keeps the entry-condition diamond, drops the ad-hoc required "*", and moves the added-rework time into the rework icon's tooltip. Ref: MST-12724
…ge/retryCount docs
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (2)
packages/apollo-react/src/canvas/components/StageNode/StageNode.types.ts:135
retryCountis now interpreted as “number of re-runs” and the UI displaysretryCount + 1as the run count. Previously (per the old interface doc) it represented the total run count; this semantic change can cause an off-by-one in consumers that already pass total runs. Consider keepingretryCountas total runs for backwards compatibility, or introduce a new field (e.g.retryAttempts/rerunCount) while preserving the existing meaning.
/**
* Number of re-runs (retries) of this task — i.e. total runs minus one. When `> 0`, a "runs"
* icon-chip (↱) is shown displaying the total run count (`retryCount + 1`), with a localized
* "Ran N times" tooltip (or "Running again" when `status` is `'InProgress'`).
*/
retryCount?: number;
packages/apollo-react/src/canvas/components/StageNode/StageNode.types.ts:129
badge/badgeStatusare marked@deprecatedbut TaskContent no longer renders them at all. Deprecation usually implies a transition period where the old behavior still works; if this removal is intentional, consider either (1) keeping a fallback render when there are no runs/rework chips, or (2) removing these fields entirely as a breaking change (with appropriate versioning) to avoid implying partial support.
/**
* @deprecated No longer rendered. Execution now shows dedicated "runs" and "rework" icon-chips
* derived from `retryCount` and `retryDuration`; consumer-supplied badge text is ignored.
*/
badge?: string;
/**
* @deprecated No longer rendered. See `badge`.
*/
badgeStatus?: 'warning' | 'info' | 'error';
546b878 to
5a2dab7
Compare
Summary
Collapses each stage-node task's execution state onto a single line so stage nodes stop
growing tall during execution (Maestro Case Management). Per Carl Schultze's Figma
("Debug on single line", node 19687-68917): duration moves inline, and runs/rework become
compact amber icon-chips with detail in tooltips instead of full-text badges wrapping to a
second row.
This is the apollo-ui side of MST-12724. PO.Frontend consumes it via a later version bump
(no PO.Frontend change required — it already supplies the data props).
Demo
Changes
TaskContent.tsx: rewrote the two-rowColumninto a singleRow(removed thehasSecondRowContentsecond-row branch).Badgewith aRedo2(↱) icon + total-run count (retryCount + 1);tooltip "Ran N times" / "Running again" (localised).
Badgewith aRotateCcw(↺) icon, shown when there is rework time;tooltip "Reworked (+{duration})" — this is where the old inline
(+25m)moved.badgetext chip (e.g. "Action needed").*; entry-condition diamond kept.stage-node.task-badge.rework-time.data-testids (stage-task-*,stage-task-play-*) unchanged.Flow
flowchart LR D[StageTaskExecution] --> R[Single Row] D -->|duration| Dur[duration text] D -->|retryCount > 0| Runs["↱ runs chip + count<br/>tooltip: Ran N times"] D -->|retryDuration| Rew["↺ rework chip<br/>tooltip: Reworked +time"] D -->|status| St[status icon] Dur --> R Runs --> R Rew --> R St --> R R --> P[play button · far right]E2E Impact
N/A for this repo (the E2E-impact check is a PO.Frontend tool). Change is a visual refactor of an
existing component; all
data-testids are preserved, so consumer/E2E selectors are unaffected.Testing
vitest— StageNode suite green (192 tests, incl. rewritten TaskContent runs/rework/required-marker/badge-suppression suites)
tsc --noEmitcleanamber runs/rework icons matching the Figma
as any/ suppressions added)