Skip to content

feat(apollo-react): collapse stage-node task execution to one line with runs/rework icons#965

Merged
BenNormann merged 4 commits into
mainfrom
feat/mst-12724-stage-node-single-line
Jul 24, 2026
Merged

feat(apollo-react): collapse stage-node task execution to one line with runs/rework icons#965
BenNormann merged 4 commits into
mainfrom
feat/mst-12724-stage-node-single-line

Conversation

@BenNormann

@BenNormann BenNormann commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

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

Screenshot 2026-07-24 at 10 00 35 AM image image image

Changes

  • TaskContent.tsx: rewrote the two-row Column into a single Row (removed the
    hasSecondRowContent second-row branch).
  • Runs → compact amber Badge with a Redo2 (↱) icon + total-run count (retryCount + 1);
    tooltip "Ran N times" / "Running again" (localised).
  • Rework → compact amber Badge with a RotateCcw (↺) icon, shown when there is rework time;
    tooltip "Reworked (+{duration})" — this is where the old inline (+25m) moved.
  • Removed the never-used plain consumer-badge text chip (e.g. "Action needed").
  • Ad-hoc tasks no longer render the required *; entry-condition diamond kept.
  • Play button unified to a single far-right render with the status icon to its left.
  • New i18n message stage-node.task-badge.rework-time.
  • Existing 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]
Loading

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)
  • biome (lint + format) clean; tsc --noEmit clean
  • Manual: verified in Storybook (Execution Status, Ad hoc Tasks) — single-line rows with
    amber runs/rework icons matching the Figma
  • Type-safe (no as any / suppressions added)

Copilot AI review requested due to automatic review settings July 24, 2026 00:32
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Apollo Coded App preview deployments are ready.

Project Status Preview Updated (PT)
apollo-design Ready Preview · Logs Jul 24, 2026, 11:23:07 AM
apollo-docs Ready Preview · Logs Jul 24, 2026, 11:23:07 AM
apollo-landing Ready Preview · Logs Jul 24, 2026, 11:23:07 AM
apollo-vertex Ready Preview · Logs Jul 24, 2026, 11:23:07 AM

@github-actions github-actions Bot added the size:L 100-499 changed lines. label Jul 24, 2026
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Dependency License Review

  • 1950 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1720
ISC 89
Apache-2.0 55
BSD-3-Clause 27
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 4
MIT-0 3
CC0-1.0 3
MIT OR Apache-2.0 2
(MIT OR Apache-2.0) 2
Unlicense 2
LGPL-3.0-or-later 1
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
Unknown 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.3.2 LGPL-3.0-or-later LGPL pre-built binary, not linked
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 TaskContent from 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.

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage + size by package

Per-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.

Package Coverage New-line coverage Packed (gzip) Unpacked vs main
@uipath/apollo-core 9.0% 43.84 MB 57.45 MB ±0
@uipath/apollo-react 38.7% 100.0% (8/8) 7.45 MB 28.55 MB −98 B
@uipath/apollo-wind 41.5% 401.6 KB 2.60 MB +40 B
@uipath/ap-chat 85.8% 43.44 MB 55.94 MB ±0

"Coverage" is each package's own coverage.include scope (e.g. apollo-core instruments only scripts/). "Packed"/"Unpacked" come from npm pack --dry-run and only cover built packages — "—" means not measured this run (package not affected / not built). "vs main" is the packed (gzipped) delta against the last successful main build (the package-sizes artifact from the Release workflow); "—" there means no main baseline was available this run. The baseline is main's latest build, not this PR's exact merge-base, so it includes any drift since the branch diverged. Packages with no vitest config are omitted.

Copilot AI review requested due to automatic review settings July 24, 2026 15:04
@BenNormann

Copy link
Copy Markdown
Contributor Author

Thanks @Copilot — both addressed in 3e0b19f:

1. API contract mismatch. Corrected the StageTaskExecution docs to match the new semantics:

  • retryCount JSDoc rewritten — it's the number of re-runs; the runs chip (↱) shows total runs (retryCount + 1) with a localized "Ran N times" / "Running again" tooltip. No longer references badge.
  • badge / badgeStatus marked @deprecated (no longer rendered; execution now derives runs/rework chips from retryCount / retryDuration). Kept in the type to stay non-breaking rather than force a major bump.
  • Removed the now-redundant badge/badgeStatus values from the StageNode stories (they already drive the chips via retryCount/retryDuration), so the examples match the contract. Existing tests still assert a supplied badge is ignored.

2. Runs-chip a11y. Added aria-label={runsTooltip} to the runs Badge so screen readers announce "Ran 3 times" / "Running again" instead of just the number (the rework chip already had one).

192 StageNode tests, biome, and tsc all green.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings July 24, 2026 16:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Badge renders a <div> and the icon is aria-hidden, there is no accessible text, and the tooltip is hover-only. Add an explicit role (e.g. role="img") so the aria-label provides 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 retryDuration references a Reworked (+{retryDuration}) placeholder, but the actual localized message uses Reworked (+{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.
   */

Copilot AI review requested due to automatic review settings July 24, 2026 18:14
@BenNormann
BenNormann enabled auto-merge (rebase) July 24, 2026 18:14
@BenNormann
BenNormann disabled auto-merge July 24, 2026 18:14
…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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  • retryCount is now interpreted as “number of re-runs” and the UI displays retryCount + 1 as 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 keeping retryCount as 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/badgeStatus are marked @deprecated but 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';

Copilot AI review requested due to automatic review settings July 24, 2026 18:19
@BenNormann
BenNormann force-pushed the feat/mst-12724-stage-node-single-line branch from 546b878 to 5a2dab7 Compare July 24, 2026 18:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

@BenNormann
BenNormann enabled auto-merge (rebase) July 24, 2026 18:26
@BenNormann
BenNormann merged commit db43e29 into main Jul 24, 2026
45 checks passed
@BenNormann
BenNormann deleted the feat/mst-12724-stage-node-single-line branch July 24, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg:apollo-react size:L 100-499 changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants