Skip to content

fix(web): prevent active stage selection from being overridden on pol… - #7121

Open
kunaldevsahu wants to merge 1 commit into
pipe-cd:masterfrom
kunaldevsahu:fix/active-stage-override
Open

fix(web): prevent active stage selection from being overridden on pol…#7121
kunaldevsahu wants to merge 1 commit into
pipe-cd:masterfrom
kunaldevsahu:fix/active-stage-override

Conversation

@kunaldevsahu

Copy link
Copy Markdown

What this PR does

This PR fixes an issue in the Deployment Details page where the selected stage was reset during live polling.

The implementation introduces intelligent default stage tracking using a React useRef to distinguish between users who are following the default active stage and users who have manually selected a different stage. This preserves manual stage selections while still allowing the UI to automatically advance when the user is following the deployment's default progression.

Why we need it

The deployment details page polls for updates every 4 seconds while a deployment is running. Each polling update refreshes the deployment object, causing the initialization effect to run repeatedly and reset the selected stage to the default active stage.

As a result, users are unable to inspect logs or details of another stage because their selection is overwritten on every polling cycle.

With this change:

  • Users who manually select a stage keep their selection across polling updates.
  • Users who are following the default active stage continue to automatically advance as the deployment progresses.
  • Navigating to a different deployment still initializes the appropriate default active stage.

Which issue(s) this PR fixes

Fixes #7119

Does this PR introduce a user-facing change?

Yes

How are users affected by this change?

Users can inspect logs and details for any stage on the Deployment Details page without their selection being reset during live polling.

Is this a breaking change?

No.

How to migrate (if breaking change)

N/A.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

👋 Hi @kunaldevsahu, welcome to PipeCD and thanks for opening your first pull request!

We’re really happy to have you here

Before your PR gets merged, please check a few important things below.


Helpful resources


DCO Sign-off

All commits must include a Signed-off-by line to comply with the Developer Certificate of Origin (DCO).

In case you forget to sign-off your commit(s), follow these steps:

For the last commit:

git commit --amend --signoff
git push --force-with-lease

For multiple commits:

git rebase --signoff origin/master
git push --force-with-lease

Run checks locally

Before pushing updates, please run:

make check

This runs the same checks as CI and helps catch issues early.


💬 Need help?

If anything is unclear, feel free to ask in this PR or join us on the CNCF Slack in the #pipecd channel.
You can get your Slack invite from: https://communityinviter.com/apps/cloud-native/cncf

Thanks for contributing to PipeCD! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deployment details page resets selected stage during live polling

1 participant