You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated the StageNode task badge to render a human-readable, localized label for retried executions instead of the cryptic x2 suffix. When retryCount > 1, the badge now reads "Ran N times" (or "Running again" while the task is in progress) using the consumer app's Lingui catalog.
Key Changes
Replaced the inline generateBadgeText helper with a memoized badgeText derived inside TaskContent so it can resolve translations via useSafeLingui
Added stage-node.task-badge.ran-n-times to canvas/locales/en.json with ICU plural form {count, plural, one {Ran # time} other {Ran # times}}
Added stage-node.task-badge.running-again to canvas/locales/en.json for the InProgress variant
When retryCount > 1, the localized label fully overrides the consumer-supplied badge string. When retryCount is 1 or absent, the consumer's badge string is rendered as-is (must be pre-localized)
Documented the new contract on StageTaskExecution.retryCount in StageNode.types.ts
Added a TaskContent - badge test suite covering InProgress vs other statuses, plural interpolation, override behavior when retryCount > 1, pass-through when retryCount is 1 or absent, and no-badge cases
Implementation Details
Badge rendering is gated on the resolved badgeText instead of taskExecution.badge, so the second row collapses correctly when no label is produced
hasSecondRowContent now reads from badgeText to stay consistent with what actually renders
useSafeLingui is used so the component degrades gracefully when no I18nProvider is mounted
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the StageNode task badge behavior in apollo-react so retried executions show a human-readable label (via Lingui) rather than appending a cryptic xN suffix, and adds tests/docs to lock in the new contract.
Changes:
Compute a localized badgeText inside TaskContent (using useSafeLingui) to render “Running again” (InProgress) or “Ran N times” (pluralized) when retryCount > 1.
Add new canvas i18n message IDs and document the new StageTaskExecution.retryCount contract.
Add a dedicated TaskContent badge test suite covering override/pass-through/no-badge scenarios.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File
Description
packages/apollo-react/src/canvas/locales/en.json
Adds new message IDs for retry badge labels (plural + in-progress variant).
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.82 MB
57.31 MB
±0
@uipath/apollo-react
34.8%
100.0% (10/10)
7.27 MB
27.60 MB
+396 B
@uipath/apollo-wind
40.1%
—
392.4 KB
2.55 MB
−2 B
@uipath/ap-chat
85.8%
—
43.41 MB
55.85 MB
+8 B
"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.
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
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.
Description
Updated the StageNode task badge to render a human-readable, localized label for retried executions instead of the cryptic x2 suffix. When retryCount > 1, the badge now reads "Ran N times" (or "Running again" while the task is in progress) using the consumer app's Lingui catalog.
Key Changes
Implementation Details