chore: Accept app mode param in fetch environment action (#38786)

## Description
Adds mode as a a param to the fetchingEnvironmentConfigs action to
handle the environment resolution on page load. The extended code is in
EE where this change is leveraged.

EE PR https://github.com/appsmithorg/appsmith-ee/pull/5977

## Automation

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

### 🔍 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/12926385771>
> Commit: 980841c6ae8a3d34f9ea23e0373d9e41813343c3
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12926385771&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Thu, 23 Jan 2025 10:53:11 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**
- Enhanced environment configuration fetching with optional application
mode parameter
	- Improved workspace ID setting to include application mode context

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Ashit Rath 2025-01-23 16:58:44 +05:30 committed by GitHub
parent 9c632b5a68
commit 72251cba2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,5 @@
import type { APP_MODE } from "entities/App";
// Redux action to show the environment info modal before deploy
export const showEnvironmentDeployInfoModal = () => ({});
@ -11,12 +13,14 @@ export const setCurrentEditingEnvironmentID = (currentEditingId: string) => ({
export const fetchingEnvironmentConfigs = ({
editorId,
fetchDatasourceMeta = false,
mode,
workspaceId,
}: {
editorId: string;
fetchDatasourceMeta: boolean;
workspaceId: string;
mode?: APP_MODE;
}) => ({
type: "",
payload: { workspaceId, editorId, fetchDatasourceMeta },
payload: { workspaceId, editorId, fetchDatasourceMeta, mode },
});

View File

@ -293,6 +293,7 @@ export function* fetchAppAndPagesSaga(
payload: {
workspaceId: response.data.workspaceId,
editorId: response.data.application?.id,
mode: request.mode,
},
});