Skip to content

workflows: add is_retry and is_held indicators#2378

Merged
wxtim merged 8 commits intocylc:masterfrom
oliver-sanders:ui-2350
Jan 5, 2026
Merged

workflows: add is_retry and is_held indicators#2378
wxtim merged 8 commits intocylc:masterfrom
oliver-sanders:ui-2350

Conversation

@oliver-sanders
Copy link
Member

@oliver-sanders oliver-sanders commented Dec 11, 2025

Requires:

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg (and conda-environment.yml if present).
  • Tests are included (or explain why tests are not needed).
  • Changelog entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

Comment on lines +33 to +34
export const taskRetry = 'm14.7 2.5c-0.179-0.0044-0.358-0.0037-0.538 0.0021-0.958 0.031-1.92 0.208-2.86 0.539-3.3 1.17-5.65 4.05-6.2 7.44l-5.13-1.23 6.86 9.23 6.86-9.23-5.35 1.19c0.511-2.02 2-3.69 4.02-4.41 2.5-0.886 5.28-0.124 6.98 1.91 1.7 2.04 1.95 4.91 0.625 7.21-1.32 2.3-3.93 3.53-6.54 3.09a1.58 1.58 0 0 0-1.82 1.3 1.58 1.58 0 0 0 1.3 1.82c3.91 0.661 7.84-1.19 9.81-4.63 1.98-3.44 1.6-7.76-0.938-10.8-1.79-2.14-4.39-3.35-7.07-3.41z'
export const taskHeld = 'm12 0.5c-6.34 0-11.5 5.17-11.5 11.5-1.9e-7 6.33 5.16 11.5 11.5 11.5 6.34 0 11.5-5.17 11.5-11.5 0-6.33-5.16-11.5-11.5-11.5zm0 2.74c4.85 0 8.76 3.9 8.76 8.76 0 4.85-3.9 8.76-8.76 8.76-4.85 0-8.76-3.9-8.76-8.76 0-4.85 3.9-8.76 8.76-8.76zm-3.2 2.36a2.05 2.05 0 0 0-2.05 2.05v8.7a2.05 2.05 0 0 0 2.05 2.05 2.05 2.05 0 0 0 2.05-2.05v-8.7a2.05 2.05 0 0 0-2.05-2.05zm6.4 0a2.05 2.05 0 0 0-2.05 2.05v8.7a2.05 2.05 0 0 0 2.05 2.05 2.05 2.05 0 0 0 2.05-2.05v-8.7a2.05 2.05 0 0 0-2.05-2.05z'
Copy link
Member Author

Choose a reason for hiding this comment

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

These are icons derived directly from the task modifiers in the SVGTask component which were transformed into the Vuetify icon format (single path, 24px square dimensions).

For info, quick runthrough of how to do this:

  • Extract SVG as start point, save as file.
  • Open in Inkscape.
  • Apply configured CSS to objects.
  • Convert objects to paths.
  • Unify all paths into a single path.
  • Rescale down to 24x24px.
  • Export as optimised CSS.
  • Reduce the sig fig precision until it breaks (3 in this case).
  • Copy path (the d="..." bit) out of exported SVG.

I did export the transformed retry modifier pre-scaling.

This diff applies it to the `SVGTask`:
diff --git a/src/components/cylc/SVGTask.vue b/src/components/cylc/SVGTask.vue
index 43b6f1db..e5eca12c 100644
--- a/src/components/cylc/SVGTask.vue
+++ b/src/components/cylc/SVGTask.vue
@@ -231,10 +231,18 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
         Circular arrow representing a retry.
       -->
        <g class="retry">
-        <!-- An arc describing the arrow -->
-        <path d="m25, 50 a30 30 1 1 1 25 30 "/>
-        <!-- The arrowhead -->
-        <polygon points="0,40 26,75 52,40, 25,46"/>
+         <path d="m55.8 14.4c-0.679-0.0166-1.36-0.0142-2.04 0.00781-3.63 0.117-7.28 0.787-10.8 2.04-12.5 4.43-21.4 15.4-23.5 28.2l-19.5-4.67 26 35 26-35-20.3 4.5c1.94-7.65 7.57-14 15.2-16.7 9.49-3.36 20-0.471 26.4 7.26 6.44 7.73 7.39 18.6 2.37 27.3-5.01 8.72-14.9 13.4-24.8 11.7a6 6 0 0 0-6.92 4.92 6 6 0 0 0 4.92 6.92c14.8 2.51 29.7-4.51 37.2-17.6 7.5-13 6.07-29.4-3.56-41-6.77-8.13-16.6-12.7-26.8-12.9z"/>
+         <!--
+           The path above is an optimised reuduction of:
+
+           An arc describing the arrow:
+           <path d="m25, 50 a30 30 1 1 1 25 30 " style="stroke-linecap="round"; stroke: 12px;" />
+           The arrowhead:
+           <polygon points="0,40 26,75 52,40, 25,46"/>
+
+           Created by converting both objects to paths, combining them, then
+           optmising.
+         -->
       </g>
 
       <!-- Wallclock
@@ -542,12 +550,6 @@ const modifierTransform = _getModifierTransform()
 
     &.retry .modifier {
       .retry path {
-        stroke: $foreground;
-        stroke-width: 12px;
-        stroke-linecap: round;
-      }
-      .retry polygon {
-        stroke: none;
         fill: $foreground;
       }
     }

However, I didn't include that in this PR because:

  • Unnecessary change right now!
  • Less maintainable (although it's pretty static, so maybe that doesn't matter).
  • Profiling required to determine whether this is more efficient (what takes longer, the DOM or bezier maths?).

Copy link
Member

Choose a reason for hiding this comment

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

You can check these on https://www.svgviewer.dev/ or similar:

image image

@wxtim
Copy link
Member

wxtim commented Dec 16, 2025

Nice!
image

@wxtim
Copy link
Member

wxtim commented Dec 16, 2025

I've made a PR to this PR oliver-sanders#123 containing a test.

Copy link
Member

@wxtim wxtim left a comment

Choose a reason for hiding this comment

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

@oliver-sanders oliver-sanders marked this pull request as ready for review December 16, 2025 11:05
oliver-sanders and others added 2 commits December 16, 2025 11:06
* Closes cylc#2350
* Adds workflow indicator icons which appear if the workflow contains
  any tasks in the retry and held states.
@MetRonnie

This comment was marked as resolved.

@oliver-sanders

This comment was marked as resolved.

@oliver-sanders

This comment was marked as resolved.

@wxtim

This comment was marked as resolved.

@oliver-sanders

This comment was marked as resolved.

@MetRonnie
Copy link
Member

Ah, dang, this breaks things for pre-8.6.2 workflows

Never mind, it turned out I needed to pull 8.6.x to bring in cylc/cylc-flow#7138 and restart my UI server

@oliver-sanders
Copy link
Member Author

(phew)

Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com>
@MetRonnie MetRonnie requested a review from wxtim December 19, 2025 14:24
@MetRonnie

This comment was marked as resolved.

@MetRonnie
Copy link
Member

@wxtim some changes since your last review

@wxtim wxtim merged commit 6f4724d into cylc:master Jan 5, 2026
7 checks passed
@oliver-sanders oliver-sanders deleted the ui-2350 branch January 5, 2026 12:53
oliver-sanders added a commit to oliver-sanders/cylc-uiserver that referenced this pull request Jan 7, 2026
* Ensures that new data elements added in cylc/cylc-flow#7138
  are available for the bundled UI version which will include cylc/cylc-ui#2378
MetRonnie pushed a commit to cylc/cylc-uiserver that referenced this pull request Jan 7, 2026
* Ensures that new data elements added in cylc/cylc-flow#7138
  are available for the bundled UI version which will include cylc/cylc-ui#2378
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

workflows: indicate held and retrying tasks

3 participants