Skip to content

Introduce experimental API for adding actions to experimental Run UI#11204

Merged
timja merged 44 commits into
jenkinsci:masterfrom
janfaracik:run-app-bar
Mar 23, 2026
Merged

Introduce experimental API for adding actions to experimental Run UI#11204
timja merged 44 commits into
jenkinsci:masterfrom
janfaracik:run-app-bar

Conversation

@janfaracik

@janfaracik janfaracik commented Oct 15, 2025

Copy link
Copy Markdown
Member

This PR introduces an experimental API for adding actions to the experimental Run UI - actions are visible in the app bar and its overflow menu.

Screenshot 2025-10-29 at 16 36 37

WIP screenshot

I've been wanting to get this done for a long (long) time now, the intention is to provide a simple to use API for developers to add simple and complex actions to our Actionable objects.

An action can be as simple as taking the user to a new page, or it can be as complex as executing arbitrary JS or displays dialogs and modals.

Testing done

  • No regressions in legacy UI

Proposed changelog entries

  • Introduce experimental API for adding actions to experimental Run UI

Proposed changelog category

/label web-ui,rfe

Proposed upgrade guidelines

N/A

Submitter checklist

  • The Jira issue, if it exists, is well-described.
  • The changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developers, depending on the change) and are in the imperative mood (see examples). Fill in the Proposed upgrade guidelines section only if there are breaking changes or changes that may require extra steps from users during upgrade.
  • There is automated testing or an explanation as to why this change has no tests.
  • New public classes, fields, and methods are annotated with @Restricted or have @since TODO Javadocs, as appropriate.
  • New deprecations are annotated with @Deprecated(since = "TODO") or @Deprecated(forRemoval = true, since = "TODO"), if applicable.
  • New or substantially changed JavaScript is not defined inline and does not call eval to ease future introduction of Content Security Policy (CSP) directives (see documentation).
  • For dependency updates, there are links to external changelogs and, if possible, full differentials.
  • For new APIs and extension points, there is a link to at least one consumer.

Desired reviewers

@jenkinsci/sig-ux @daniel-beck

Before the changes are marked as ready-for-merge:

Maintainer checklist

  • There are at least two (2) approvals for the pull request and no outstanding requests for change.
  • Conversations in the pull request are over, or it is explicit that a reviewer is not blocking the change.
  • Changelog entries in the pull request title and/or Proposed changelog entries are accurate, human-readable, and in the imperative mood.
  • Proper changelog labels are set so that the changelog can be generated automatically.
  • If the change needs additional upgrade steps from users, the upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the pull request title (see example).
  • If it would make sense to backport the change to LTS, a Jira issue must exist, be a Bug or Improvement, and be labeled as lts-candidate to be considered (see query).

@comment-ops-bot comment-ops-bot Bot added web-ui The PR includes WebUI changes which may need special expertise rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted labels Oct 15, 2025
Comment thread core/src/main/java/hudson/model/Action.java Outdated
@janfaracik janfaracik added the squash-merge-me Unclean or useless commit history, should be merged only with squash-merge label Oct 17, 2025
return null;
}

default Group getGroup() {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Should this be part of Action? Or into its own interface?

return null;
}

default Group getGroup() {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Is this the best way of grouping/ordering items?

@janfaracik
janfaracik marked this pull request as ready for review October 29, 2025 16:38
@@ -106,102 +111,56 @@ public void generateResponse(StaplerRequest2 req, StaplerResponse2 rsp, Object o
}

public ContextMenu add(String url, String text) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This file needs validating (maybe a clean up if possible without breaking plugins...)

@timja
timja requested review from a team October 30, 2025 21:59
import jenkins.model.TransientActionFactory;
import jenkins.model.menu.Group;
import jenkins.security.stapler.StaplerNotDispatchable;
import org.apache.commons.lang.StringUtils;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Usage of deprecated commons-lang2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Its used in 2 other places in core, should be banned via e.g checkstyle if we don't want it reintroduced.

@timja timja left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Given the new APIs are marked as Beta lets proceed so we can evolve the API as required.

Any feedback on the API is welcomed, this has been open for comment for long enough though.


/label ready-for-merge


This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback.

Thanks!

@comment-ops-bot comment-ops-bot Bot added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Mar 23, 2026
@timja
timja merged commit 611294d into jenkinsci:master Mar 23, 2026
14 of 17 checks passed
Comment thread core/src/main/java/jenkins/model/ModelObjectWithContextMenu.java
@timja
timja deleted the run-app-bar branch March 23, 2026 21:41
@timja

timja commented Mar 24, 2026

Copy link
Copy Markdown
Member

FYI seeing this when opening context menu in build history widget (endlessly spins):

image

We noticed this locally sometimes when working on this PR but weren't able to track it down and it seemed to disappear.
Can either just add a null check or try track it down more.

Json response is:

{
    "_class": "jenkins.model.ModelObjectWithContextMenu$ContextMenu",
    "items": [
        {
            "badge": null,
            "displayName": "Edit build information",
            "event": {
                "_class": "jenkins.model.menu.event.LinkEvent",
                "type": "GET",
                "url": "configure"
            },
            "group": {
                "order": 3
            },
            "icon": "symbol-edit",
            "iconXml": "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" height=\"512px\" version=\"1.1\" viewBox=\"0 0 512 512\" width=\"512px\">    <title/>    <g fill=\"none\" fill-rule=\"evenodd\" stroke=\"none\" stroke-width=\"1\">        <path d=\"M399.608914,57 C413.784791,57 427.960684,62.4078333 438.776426,73.2235621 C449.592141,84.0392638 455,98.2149574 455,112.390686 C455,126.566468 449.592105,140.742274 438.776426,151.558078 L438.776426,151.558078 L191.040603,399.293596 C182.232434,408.101755 171.575528,414.840664 159.841736,419.022244 L159.841736,419.022244 L58.9309718,454.983885 C58.3980325,455.005817 57.9083807,454.793595 57.5574476,454.442654 C57.2063668,454.091565 56.9941379,453.601684 57.0161199,453.068522 L57.0161199,453.068522 L92.977296,352.157786 C97.1588787,340.423838 103.897856,329.766792 112.706129,320.958529 L112.706129,320.958529 L360.441401,73.2235621 C371.257143,62.4078333 385.433036,57 399.608914,57 Z\" fill-rule=\"nonzero\" stroke=\"currentColor\" stroke-width=\"32\"/>        <polyline fill=\"currentColor\" points=\"308.192388 138.192388 359.945436 138.192388 417.192388 138.192388 417.192388 170.192388 360.652543 170.192388 308.192388 170.192388\" transform=\"translate(362.692388, 154.192388) rotate(45.000000) translate(-362.692388, -154.192388) \"/>    </g></svg>",
            "message": null,
            "post": false,
            "requiresConfirmation": false,
            "semantic": null,
            "subMenu": null,
            "type": "ITEM",
            "url": null
        },
        {
            "badge": null,
            "displayName": "Keep build forever",
            "event": {
                "_class": "jenkins.model.menu.event.LinkEvent",
                "type": "POST",
                "url": "toggleLogKeep"
            },
            "group": {
                "order": 3
            },
            "icon": "symbol-lock-open",
            "iconXml": "<svg xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" viewBox=\"0 0 512 512\"><path d=\"M336 112a80 80 0 00-160 0v96\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"32\"/><rect fill=\"none\" height=\"272\" rx=\"48\" ry=\"48\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"32\" width=\"320\" x=\"96\" y=\"208\"/></svg>",
            "message": null,
            "post": false,
            "requiresConfirmation": false,
            "semantic": null,
            "subMenu": null,
            "type": "ITEM",
            "url": null
        },
        {
            "badge": null,
            "displayName": "Cause",
            "event": {
                "_class": "jenkins.model.menu.event.LinkEvent",
                "type": "GET",
                "url": "cause"
            },
            "group": {
                "order": 100
            },
            "icon": null,
            "iconXml": null,
            "message": null,
            "post": false,
            "requiresConfirmation": false,
            "semantic": null,
            "subMenu": null,
            "type": "ITEM",
            "url": null
        },
        {
            "badge": null,
            "displayName": "Git Build Data",
            "event": {
                "_class": "jenkins.model.menu.event.LinkEvent",
                "type": "GET",
                "url": "git"
            },
            "group": {
                "order": 100
            },
            "icon": "symbol-git-icon plugin-git",
            "iconXml": "<svg xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" height=\"92pt\" viewBox=\"0 0 92 92\" width=\"92pt\"><path d=\"M90.156 41.965 50.036 1.848a5.913 5.913 0 0 0-8.368 0l-8.332 8.332 10.566 10.566a7.03 7.03 0 0 1 7.23 1.684 7.043 7.043 0 0 1 1.673 7.277l10.183 10.184a7.026 7.026 0 0 1 7.278 1.672 7.04 7.04 0 0 1 0 9.957 7.045 7.045 0 0 1-9.961 0 7.038 7.038 0 0 1-1.532-7.66l-9.5-9.497V59.36a7.04 7.04 0 0 1 1.86 11.29 7.04 7.04 0 0 1-9.957 0 7.04 7.04 0 0 1 0-9.958 7.034 7.034 0 0 1 2.308-1.539V33.926a7.001 7.001 0 0 1-2.308-1.535 7.049 7.049 0 0 1-1.516-7.7L29.242 14.273 1.734 41.777a5.918 5.918 0 0 0 0 8.371L41.855 90.27a5.92 5.92 0 0 0 8.368 0l39.933-39.934a5.925 5.925 0 0 0 0-8.371\" fill=\"currentColor\"/></svg>",
            "message": null,
            "post": false,
            "requiresConfirmation": false,
            "semantic": null,
            "subMenu": null,
            "type": "ITEM",
            "url": null
        },
        {
            "badge": null,
            "displayName": "Git Build Data",
            "event": {
                "_class": "jenkins.model.menu.event.LinkEvent",
                "type": "GET",
                "url": "git-2"
            },
            "group": {
                "order": 100
            },
            "icon": "symbol-git-icon plugin-git",
            "iconXml": "<svg xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" height=\"92pt\" viewBox=\"0 0 92 92\" width=\"92pt\"><path d=\"M90.156 41.965 50.036 1.848a5.913 5.913 0 0 0-8.368 0l-8.332 8.332 10.566 10.566a7.03 7.03 0 0 1 7.23 1.684 7.043 7.043 0 0 1 1.673 7.277l10.183 10.184a7.026 7.026 0 0 1 7.278 1.672 7.04 7.04 0 0 1 0 9.957 7.045 7.045 0 0 1-9.961 0 7.038 7.038 0 0 1-1.532-7.66l-9.5-9.497V59.36a7.04 7.04 0 0 1 1.86 11.29 7.04 7.04 0 0 1-9.957 0 7.04 7.04 0 0 1 0-9.958 7.034 7.034 0 0 1 2.308-1.539V33.926a7.001 7.001 0 0 1-2.308-1.535 7.049 7.049 0 0 1-1.516-7.7L29.242 14.273 1.734 41.777a5.918 5.918 0 0 0 0 8.371L41.855 90.27a5.92 5.92 0 0 0 8.368 0l39.933-39.934a5.925 5.925 0 0 0 0-8.371\" fill=\"currentColor\"/></svg>",
            "message": null,
            "post": false,
            "requiresConfirmation": false,
            "semantic": null,
            "subMenu": null,
            "type": "ITEM",
            "url": null
        },
        {
            "badge": null,
            "displayName": "Git Build Data",
            "event": {
                "_class": "jenkins.model.menu.event.LinkEvent",
                "type": "GET",
                "url": "git-3"
            },
            "group": {
                "order": 100
            },
            "icon": "symbol-git-icon plugin-git",
            "iconXml": "<svg xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" height=\"92pt\" viewBox=\"0 0 92 92\" width=\"92pt\"><path d=\"M90.156 41.965 50.036 1.848a5.913 5.913 0 0 0-8.368 0l-8.332 8.332 10.566 10.566a7.03 7.03 0 0 1 7.23 1.684 7.043 7.043 0 0 1 1.673 7.277l10.183 10.184a7.026 7.026 0 0 1 7.278 1.672 7.04 7.04 0 0 1 0 9.957 7.045 7.045 0 0 1-9.961 0 7.038 7.038 0 0 1-1.532-7.66l-9.5-9.497V59.36a7.04 7.04 0 0 1 1.86 11.29 7.04 7.04 0 0 1-9.957 0 7.04 7.04 0 0 1 0-9.958 7.034 7.034 0 0 1 2.308-1.539V33.926a7.001 7.001 0 0 1-2.308-1.535 7.049 7.049 0 0 1-1.516-7.7L29.242 14.273 1.734 41.777a5.918 5.918 0 0 0 0 8.371L41.855 90.27a5.92 5.92 0 0 0 8.368 0l39.933-39.934a5.925 5.925 0 0 0 0-8.371\" fill=\"currentColor\"/></svg>",
            "message": null,
            "post": false,
            "requiresConfirmation": false,
            "semantic": null,
            "subMenu": null,
            "type": "ITEM",
            "url": null
        },
        {
            "badge": null,
            "displayName": "Pipeline Steps",
            "event": {
                "_class": "jenkins.model.menu.event.LinkEvent",
                "type": "GET",
                "url": "flowGraphTable"
            },
            "group": {
                "order": 100
            },
            "icon": "symbol-build-steps",
            "iconXml": "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" height=\"580px\" version=\"1.1\" viewBox=\"0 0 580 580\" width=\"580px\">    <g fill=\"none\" fill-rule=\"evenodd\" stroke=\"none\" stroke-width=\"1\">        <path d=\"M47.265625,85.0076715 L47.265625,163.898578 C47.265625,168.642915 51.8902644,171.657091 55.6987909,169.382857 L123.136915,129.020637 C126.43401,127.048364 126.43401,121.857886 123.136915,119.885613 L55.6987909,79.5233933 C51.8902644,77.2491588 47.265625,80.2633356 47.265625,85.0076715 Z\" stroke=\"currentColor\" stroke-width=\"26\"/>        <path d=\"M239.866777,84.75 L494.508223,84.75 C507.09031,84.75 512.181981,85.9876748 517.147259,88.3117694 C522.112536,90.6358639 526.009316,94.0463783 528.664775,98.3920572 C531.320235,102.737736 532.734375,107.194036 532.734375,118.206051 L532.734375,131.293949 C532.734375,142.305964 531.320235,146.762264 528.664775,151.107943 C526.009316,155.453621 522.112536,158.864136 517.147259,161.18823 C512.181981,163.512325 507.09031,164.75 494.508223,164.75 L239.866777,164.75 C227.28469,164.75 222.193019,163.512325 217.227741,161.18823 C212.262464,158.864136 208.365684,155.453621 205.710225,151.107943 C203.054765,146.762264 201.640625,142.305964 201.640625,131.293949 L201.640625,118.206051 C201.640625,107.194036 203.054765,102.737736 205.710225,98.3920572 C208.365684,94.0463783 212.262464,90.6358639 217.227741,88.3117694 C222.193019,85.9876748 227.28469,84.75 239.866777,84.75 Z\" stroke=\"currentColor\" stroke-width=\"32.5\"/>        <path d=\"M47.265625,250.554547 L47.265625,329.445453 C47.265625,334.18979 51.8902644,337.203966 55.6987909,334.929732 L123.136915,294.567511 C126.43401,292.595239 126.43401,287.404761 123.136915,285.432489 L55.6987909,245.070268 C51.8902644,242.796034 47.265625,245.81021 47.265625,250.554547 Z\" stroke=\"currentColor\" stroke-width=\"26\"/>        <path d=\"M239.866777,250.296875 L494.508223,250.296875 C507.09031,250.296875 512.181981,251.53455 517.147259,253.858645 C522.112536,256.182739 526.009316,259.593254 528.664775,263.938932 C531.320235,268.284611 532.734375,272.740911 532.734375,283.752926 L532.734375,296.840824 C532.734375,307.852839 531.320235,312.309139 528.664775,316.654818 C526.009316,321.000496 522.112536,324.411011 517.147259,326.735105 C512.181981,329.0592 507.09031,330.296875 494.508223,330.296875 L239.866777,330.296875 C227.28469,330.296875 222.193019,329.0592 217.227741,326.735105 C212.262464,324.411011 208.365684,321.000496 205.710225,316.654818 C203.054765,312.309139 201.640625,307.852839 201.640625,296.840824 L201.640625,283.752926 C201.640625,272.740911 203.054765,268.284611 205.710225,263.938932 C208.365684,259.593254 212.262464,256.182739 217.227741,253.858645 C222.193019,251.53455 227.28469,250.296875 239.866777,250.296875 Z\" stroke=\"currentColor\" stroke-width=\"32.5\"/>        <path d=\"M47.265625,416.101422 L47.265625,494.992328 C47.265625,499.736665 51.8902644,502.750841 55.6987909,500.476607 L123.136915,460.114386 C126.43401,458.142114 126.43401,452.951636 123.136915,450.979364 L55.6987909,410.617143 C51.8902644,408.342909 47.265625,411.357085 47.265625,416.101422 Z\" stroke=\"currentColor\" stroke-width=\"26\"/>        <path d=\"M239.866777,415.84375 L494.508223,415.84375 C507.09031,415.84375 512.181981,417.081425 517.147259,419.40552 C522.112536,421.729614 526.009316,425.140129 528.664775,429.485807 C531.320235,433.831486 532.734375,438.287786 532.734375,449.299801 L532.734375,462.387699 C532.734375,473.399714 531.320235,477.856014 528.664775,482.201693 C526.009316,486.547371 522.112536,489.957886 517.147259,492.28198 C512.181981,494.606075 507.09031,495.84375 494.508223,495.84375 L239.866777,495.84375 C227.28469,495.84375 222.193019,494.606075 217.227741,492.28198 C212.262464,489.957886 208.365684,486.547371 205.710225,482.201693 C203.054765,477.856014 201.640625,473.399714 201.640625,462.387699 L201.640625,449.299801 C201.640625,438.287786 203.054765,433.831486 205.710225,429.485807 C208.365684,425.140129 212.262464,421.729614 217.227741,419.40552 C222.193019,417.081425 227.28469,415.84375 239.866777,415.84375 Z\" stroke=\"currentColor\" stroke-width=\"32.5\"/>    </g></svg>",
            "message": null,
            "post": false,
            "requiresConfirmation": false,
            "semantic": null,
            "subMenu": null,
            "type": "ITEM",
            "url": null
        },
        {
            "badge": null,
            "displayName": "Replay",
            "event": {
                "_class": "jenkins.model.menu.event.LinkEvent",
                "type": "GET",
                "url": "replay"
            },
            "group": {
                "order": 100
            },
            "icon": "symbol-arrow-redo-outline plugin-ionicons-api",
            "iconXml": "<svg xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" viewBox=\"0 0 512 512\"><title/><path d=\"M448 256L272 88v96C103.57 184 64 304.77 64 424c48.61-62.24 91.6-96 208-96v96z\" fill=\"none\" stroke=\"currentColor\" stroke-linejoin=\"round\" stroke-width=\"32\"/></svg>",
            "message": null,
            "post": false,
            "requiresConfirmation": false,
            "semantic": null,
            "subMenu": null,
            "type": "ITEM",
            "url": null
        },
        {
            "badge": null,
            "displayName": "Restart from Stage",
            "event": {
                "_class": "jenkins.model.menu.event.LinkEvent",
                "type": "GET",
                "url": null
            },
            "group": {
                "order": 100
            },
            "icon": null,
            "iconXml": null,
            "message": null,
            "post": false,
            "requiresConfirmation": false,
            "semantic": null,
            "subMenu": null,
            "type": "ITEM",
            "url": null
        },
        {
            "badge": null,
            "displayName": "Timings",
            "event": {
                "_class": "jenkins.model.menu.event.LinkEvent",
                "type": "GET",
                "url": "timings"
            },
            "group": {
                "order": 100
            },
            "icon": "symbol-stopwatch-outline plugin-ionicons-api",
            "iconXml": "<svg xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" viewBox=\"0 0 512 512\"><title/><path d=\"M256 232v-80\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"32\"/><path d=\"M256 88V72M132 132l-12-12\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"48\"/><circle cx=\"256\" cy=\"272\" fill=\"none\" r=\"32\" stroke=\"currentColor\" stroke-miterlimit=\"10\" stroke-width=\"32\"/><path d=\"M256 96a176 176 0 10176 176A176 176 0 00256 96z\" fill=\"none\" stroke=\"currentColor\" stroke-miterlimit=\"10\" stroke-width=\"32\"/></svg>",
            "message": null,
            "post": false,
            "requiresConfirmation": false,
            "semantic": null,
            "subMenu": null,
            "type": "ITEM",
            "url": null
        },
        {
            "badge": null,
            "displayName": "Workspaces",
            "event": {
                "_class": "jenkins.model.menu.event.LinkEvent",
                "type": "GET",
                "url": "ws"
            },
            "group": {
                "order": 100
            },
            "icon": "symbol-folder",
            "iconXml": "<svg xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" viewBox=\"0 0 512 512\"><title/><path d=\"M440 432H72a40 40 0 01-40-40V120a40 40 0 0140-40h75.89a40 40 0 0122.19 6.72l27.84 18.56a40 40 0 0022.19 6.72H440a40 40 0 0140 40v240a40 40 0 01-40 40zM32 192h448\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"32\"/></svg>",
            "message": null,
            "post": false,
            "requiresConfirmation": false,
            "semantic": null,
            "subMenu": null,
            "type": "ITEM",
            "url": null
        },
        {
            "badge": null,
            "displayName": "Delete build",
            "event": {
                "_class": "jenkins.model.menu.event.ConfirmationEvent",
                "description": "Are you sure you want to delete this build?",
                "postTo": "doDelete",
                "title": "Delete build"
            },
            "group": {
                "order": 2147483647
            },
            "icon": "symbol-trash",
            "iconXml": "<svg xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" viewBox=\"0 0 512 512\"><title/><path d=\"M112 112l20 320c.95 18.49 14.4 32 32 32h184c17.67 0 30.87-13.51 32-32l20-320\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"32\"/><path d=\"M80 112h352\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" stroke-width=\"32\"/><path d=\"M192 112V72h0a23.93 23.93 0 0124-24h80a23.93 23.93 0 0124 24h0v40M256 176v224M184 176l8 224M328 176l-8 224\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"32\"/></svg>",
            "message": null,
            "post": false,
            "requiresConfirmation": false,
            "semantic": "DESTRUCTIVE",
            "subMenu": null,
            "type": "ITEM",
            "url": null
        }
    ]
}

@janfaracik

janfaracik commented Mar 25, 2026

Copy link
Copy Markdown
Member Author

FYI seeing this when opening context menu in build history widget (endlessly spins):

image We noticed this locally sometimes when working on this PR but weren't able to track it down and it seemed to disappear. Can either just add a null check or try track it down more.

Investigating this ... it's a little fiddly.

@daniel-beck

Copy link
Copy Markdown
Member

Likely cause of #26639.

*
* @return the group of this item
*/
default Group getGroup() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If the new API is “experimental”, should the new signatures not be marked with @Restricted(Beta.class)?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

could be, the new classes have been marked as beta.

return semantic;
}

public MenuItem(String url, String icon, String displayName) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Similar to #11204 (comment). FYI this broke a CloudBees CI plugin. @jenkinsci/company-cloudbees-developers (the membership is outdated BTW) ought to be checking proposed incompatible API changes against CloudBees CI as noted here.

rsandell pushed a commit to jenkinsci/gerrit-trigger-plugin that referenced this pull request Jul 21, 2026
With jenkinsci/jenkins#11204 a new method was
added to Action with name `getEvent`. This clashes with the getEvent
method in BadgeAction.
As the getEvent in BadgeAction is not used outside of tests and there
are no users of BadgeAction in other plugins it should be safe to rename
the method.
Also rename the setter to by in sync, which is also not used anywhere.
Persistence via XStream doesn't rely on the methods but works directly
with the fields.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted squash-merge-me Unclean or useless commit history, should be merged only with squash-merge web-ui The PR includes WebUI changes which may need special expertise

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants