Skip to content

Keep track of collapsed steps and avoid expanding them automatically#903

Merged
lewisbirks merged 7 commits intojenkinsci:mainfrom
das7pad:822-stay-closed
Jul 24, 2025
Merged

Keep track of collapsed steps and avoid expanding them automatically#903
lewisbirks merged 7 commits intojenkinsci:mainfrom
das7pad:822-stay-closed

Conversation

@das7pad
Copy link
Contributor

@das7pad das7pad commented Jul 21, 2025

Fixes #822

Any user action that collapsed steps is persisted now.
This affects the collapsed state when navigating back and forth between
stages and refreshes from the steps polling while the job is running.

Testing done

Details
pipeline {
    agent any

    stages {
        stage('Hello') {
            steps {
                script {
                    for(int i=1; i<=10; i++) {
                        stage("Stage - ${i}") {
                            sh 'for i in 1 2 3; do sleep 1; echo "Slept ${i} times"; done'
                            sh 'for i in 4 5 6; do sleep 1; echo "Slept ${i} times"; done'
                        }
                    }
                }
            }
        }
    }
}
  • Trigger a build
  • Select a step and collapse it. It does not get re-opened as the build progresses.
  • Select a previous stage and collapse the last step. Switch back and forth between another stage, the last step remains collapsed.
  • Expand the step again; switch back and forth, the last step is expanded.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

Any user action that collapsed steps is persisted now.
This affects the collapsed state when navigating back and forth between
stages and refreshes from the steps polling while the job is running.
@das7pad das7pad requested a review from a team as a code owner July 21, 2025 21:18
@lewisbirks lewisbirks added the bugfix A PR that fixes a bug - used by Release Drafter label Jul 22, 2025
@das7pad das7pad mentioned this pull request Jul 23, 2025
Copy link
Contributor

@lewisbirks lewisbirks left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the contributions 🚀

@lewisbirks lewisbirks enabled auto-merge (squash) July 24, 2025 09:03
@lewisbirks lewisbirks merged commit f10d6af into jenkinsci:main Jul 24, 2025
16 of 17 checks passed
@nre-ableton
Copy link

Thanks for fixing this, it was driving me crazy 😅 ❤️

@das7pad das7pad deleted the 822-stay-closed branch July 28, 2025 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix A PR that fixes a bug - used by Release Drafter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Step gets re-opened even if manually closed while build is running

4 participants