PromucFlow_constructor/app/client
Rahul Barwal ec9d6f756e
feat: enhance navigation state handling in PageEntity and saga (#41081)
## Description
<ins>Problem</ins>

Navigation state was not included when dispatching the
navigateToAnotherPage action, causing the invokedBy property to be unset
and leading to flakiness in the cypress spec:

`app/client/cypress/e2e/Regression/ClientSide/IDE/Canvas_Context_Selected_Widgets_spec.js`

<ins>Root cause</ins>

The PageEntity component did not pass navigation state, and the
NavigateActionSaga’s pushToHistory function did not effectively handle
navigation with state, leading to incomplete navigation data.

<ins>Solution</ins>

This PR handles updating the PageEntity component to include navigation
state when dispatching the navigateToAnotherPage action, ensuring the
invokedBy property is set to NavigationMethod.EntityExplorer. It also
refactors the pushToHistory function in the NavigateActionSaga to better
support navigation with state, preserving backward compatibility. The
NavigateToAnotherPagePayload type is updated to make state and query
optional for greater flexibility.

Fixes a regression introduced here:
https://github.com/appsmithorg/appsmith/pull/41074
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.All"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/16065286850>
> Commit: 548dd7e404761c1f7bfcc71ad285843c83caf8b6
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=16065286850&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Fri, 04 Jul 2025 05:06:13 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Improved navigation behavior to include additional context about the
source of navigation within the app.

* **Bug Fixes**
* Enhanced compatibility for navigation actions, ensuring consistent
handling of various navigation payload types.

* **Documentation**
* Added detailed comments to clarify supported navigation patterns and
their handling.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-04 10:38:40 +05:30
..
.husky chore: adds depandabot.yml (#40521) 2025-05-01 05:44:04 +00:00
.yarn
config fix: Suppress webpack-dev-server ResizeObserver loop development runtime error (#40968) 2025-06-18 11:16:53 +05:30
cypress feat: integrates on page unload behavior with backend for deployed mode of the app (#41036) 2025-07-02 18:40:44 +05:30
docker/templates chore: add grafana faro sdk (CE) (#38301) 2024-12-26 10:37:41 +05:30
generators chore: decouple formControl registry from the main chunk (#40939) 2025-06-17 17:20:23 +05:30
packages chore: add workflows setting for agents CE (#40988) 2025-06-19 18:44:22 +05:30
public chore: add maximum-scale to avoid zoom on inputs in iOS (#40171) 2025-04-08 19:16:31 +05:30
scripts fix: Upgrade packages (#40935) 2025-06-16 12:12:55 +05:30
src feat: enhance navigation state handling in PageEntity and saga (#41081) 2025-07-04 10:38:40 +05:30
test chore: decouple formControl registry from the main chunk (#40939) 2025-06-17 17:20:23 +05:30
typings
.babelrc chore: Eject CRA (#39264) 2025-02-14 14:24:41 +05:30
.dockerignore
.editorconfig
.eslintrc.base.json feat: add react-compiler eslint plugin (#37139) 2024-10-31 16:40:18 +01:00
.eslintrc.js
.fork-ts-checkerrc
.gitignore
.lintstagedrc.json chore: update import of AppState to DefaultReduxState (#40494) 2025-05-01 15:53:37 +05:30
.nvmrc
.prettierignore
.prettierrc
.sentryclirc
.yarnrc.yml
build.sh fix: sourcemaps (#39301) 2025-02-16 20:05:50 +03:00
cypress_ci_custom.config.ts chore: Remove Airtable tests from being excluded from CI runs (#40932) 2025-06-17 10:00:06 +05:30
cypress_ci_hosted.config.ts chore: Remove Airtable tests from being excluded from CI runs (#40932) 2025-06-17 10:00:06 +05:30
cypress_ci.config.ts chore: Remove Airtable tests from being excluded from CI runs (#40932) 2025-06-17 10:00:06 +05:30
cypress-add-tags.js
cypress.config.ts
download-assets.js
jest.config.js fix: Upgrade packages (#40935) 2025-06-16 12:12:55 +05:30
knip.json chore: Eject CRA (#39264) 2025-02-14 14:24:41 +05:30
package.json fix: upgrade tinymce to latest MIT licensed version (#41003) 2025-06-20 16:02:25 +05:30
README.md
README.old.md
start-caddy.sh
start-https.sh chore: convert consolidated api etag to a weak one (#38939) 2025-01-31 16:35:20 +05:30
tailwind.config.js
tsconfig.json
tsconfig.path.json
vercel.json
yarn.lock chore(deps): bump pbkdf2 from 3.1.2 to 3.1.3 in /app/client (#41026) 2025-06-30 09:49:18 +05:30

Appsmith Client

This project was bootstrapped with Create React App.

For details on setting up your development machine, please refer to the Setup Guide