Skip to content

fix(ui): resolve back button redirect loop on execution pages#14412

Open
mohitjeswani01 wants to merge 20 commits intokestra-io:developfrom
mohitjeswani01:fix/execution-back-button-loop
Open

fix(ui): resolve back button redirect loop on execution pages#14412
mohitjeswani01 wants to merge 20 commits intokestra-io:developfrom
mohitjeswani01:fix/execution-back-button-loop

Conversation

@mohitjeswani01
Copy link
Contributor

@mohitjeswani01 mohitjeswani01 commented Feb 3, 2026

✨ Description

This PR resolves a navigation issue where users were trapped in a redirect loop when using the browser's Back button from an execution detail page.

Previously, navigating back would land users on an intermediate “untabbed” execution URL, which immediately redirected forward again — effectively trapping the user.

Key changes include:

  • Router-level redirection by moving default tab logic from the component onMounted hook to a beforeEnter guard in routes.js.
  • History management using replace: true during the initial redirect so the base execution URL (without a tab) is overwritten in browser history, allowing a single Back click to return to the Execution List.
  • Dead code cleanup by removing the unused router instance and useRouter import in useExecutionRoot.ts to satisfy ESLint.

🔗 Related Issue

Closes #14285


🎨 Frontend Checklist

  • Code builds without errors (npm run build)
  • All existing E2E tests pass (npm run test:e2e)
  • Screenshots or video recordings attached showing the UI changes
    (See attached kestra_back_button_routefix.mp4)

📝 Additional Notes

The fix was verified locally by checking the browser history stack.

Previously, the stack recorded an intermediate “untabbed” URL which triggered a forward redirect upon back-navigation. The new implementation ensures the history stack remains clean.


demo

kestra.button.fix.-.Made.with.Clipchamp.mp4

@MilosPaunovic MilosPaunovic added area/frontend Needs frontend code changes kind/external Pull requests raised by community contributors labels Feb 3, 2026
@MilosPaunovic
Copy link
Member

Can you resolve the merge conflict here @mohitjeswani01?

@MilosPaunovic MilosPaunovic moved this from To review to On hold in Pull Requests Feb 3, 2026
@mohitjeswani01
Copy link
Contributor Author

Hi @MilosPaunovic, I have resolved the merge conflicts in routes.js

@MilosPaunovic MilosPaunovic moved this from On hold to To review in Pull Requests Feb 3, 2026
@mohitjeswani01
Copy link
Contributor Author

hi @MilosPaunovic do i need to make any changes in this ?

@MilosPaunovic
Copy link
Member

Hi @mohitjeswani01,

This pull request will be reviewed at our earliest convenience.

Thanks for all the efforts so far! 🍀

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

Labels

area/frontend Needs frontend code changes kind/external Pull requests raised by community contributors

Projects

Status: To review

Development

Successfully merging this pull request may close these issues.

Execution home page prevent to use back buttons

2 participants