Skip to content

Do not reset expanded steps while polling, only extend them#908

Merged
lewisbirks merged 6 commits intojenkinsci:mainfrom
das7pad:stay-open
Jul 24, 2025
Merged

Do not reset expanded steps while polling, only extend them#908
lewisbirks merged 6 commits intojenkinsci:mainfrom
das7pad:stay-open

Conversation

@das7pad
Copy link
Contributor

@das7pad das7pad commented Jul 21, 2025

Closes #905

Hint: Collapsing a step also marks it as "?selected-node".

Previously, any following polling responses would action on the "?selected-node" again and expand the step that was just collapsed. Also, any other steps that were opened in addition to the last "?selected-node" would be collapsed again. When switching stages, all steps would be collapsed again.
Now, steps do not get collapsed eagerly.

Testing done

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'
                        }
                    }
                }
            }
        }
    }
}
  • Select the first stage
  • Expand all the steps
  • Navigate to the second stage
  • Navigate back to the first stage
  • See all steps open

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

Hint: Collapsing a step also marks it as "?selected-node".

Previously, any following polling responses would action on the
"?selected-node" again and expand the step that was just collapsed.
Also, any other steps that were opened in addition to the last
"?selected-node" would be collapsed again. When switching stages, all
steps would be collapsed again.
Now, steps do not get collapsed eagerly.
@das7pad das7pad requested a review from a team as a code owner July 21, 2025 21:44
@lewisbirks
Copy link
Contributor

I'm finding that if I subsequently close a step, on the next poll it will reopen that step. I don't think this is the intended behaviour

@lewisbirks lewisbirks added the bugfix A PR that fixes a bug - used by Release Drafter label Jul 22, 2025
@das7pad
Copy link
Contributor Author

das7pad commented Jul 22, 2025

I'm finding that if I subsequently close a step, on the next poll it will reopen that step. I don't think this is the intended behaviour

Indeed, this is not intuitive. It is logged as a separate bug:

@lewisbirks
Copy link
Contributor

I'm finding that if I subsequently close a step, on the next poll it will reopen that step. I don't think this is the intended behaviour

Indeed, this is not intuitive. It is logged as a separate bug:

My bad, forgot to delete this comment after I had seen the other PR

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 improvements 🚀

das7pad added 2 commits July 23, 2025 20:59
- Reduce polling interval
- Remove rerender hack for "run" poller after merging polling changes
@das7pad das7pad mentioned this pull request Jul 23, 2025
@lewisbirks lewisbirks enabled auto-merge (squash) July 24, 2025 12:30
@lewisbirks lewisbirks merged commit 89f0609 into jenkinsci:main Jul 24, 2025
17 checks passed
@das7pad das7pad deleted the stay-open 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.

Steps get collapsed when navigating back and forth between stages

2 participants