PromucFlow_constructor/app/client/src/workers/Evaluation/evalTreeWithChanges.test.ts

570 lines
17 KiB
TypeScript
Raw Normal View History

import type { WidgetEntityConfig } from "ee/entities/DataTree/types";
import { DataTreeDiffEvent } from "ee/workers/Evaluation/evaluationUtils";
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
import { RenderModes } from "constants/WidgetConstants";
chore: add grafana faro sdk (CE) (#38301) ## Description - Remove new relic browser agent - Add faro sdk to capture frontend perf metrics and traces. Fixes #`Issue Number` _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" ### :mag: 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/12490844984> > Commit: c9d4264027467bf33e1de519eb69c7762b6e7f75 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12490844984&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Wed, 25 Dec 2024 09:33:26 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit - **New Features** - Introduced new environment variable `APPSMITH_HOSTNAME` for dynamic hostname configuration in HTML files. - Enhanced telemetry capabilities with new imports and updated types for better observability. - Added `tracingUrl` under the observability section in configuration files for improved telemetry tracking. - **Bug Fixes** - Adjusted telemetry data handling to utilize new `Attributes` type for improved consistency. - **Documentation** - Updated import paths for various telemetry-related components to reflect new module organization. - **Chores** - Removed deprecated telemetry configurations and streamlined build processes. - Updated Nginx configuration to reflect new telemetry parameters. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-12-26 05:07:41 +00:00
import { ENTITY_TYPE } from "ee/entities/DataTree/types";
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
import type { ConfigTree } from "entities/DataTree/dataTreeTypes";
import { generateDataTreeWidget } from "entities/DataTree/dataTreeWidget";
chore: bypass immer for first evaluation, fixed cloneDeep issue and using mutative instead of immer (#38993) ## Description - Using mutative instead of immer, this has reduced the main thread scripting by about 1 second. - Removed a cloneDeep during table onMount which saves about 70ms in main thread scripting. - Bypassed mutative when applying the first tree to reduce the overhead associated to mutative. Fixes #`Issue Number` _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" ### :mag: 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/13164792224> > Commit: 4cb821723d10198c9db70312a9604df5aa5f80c1 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13164792224&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Thu, 06 Feb 2025 04:21:41 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 Dependency** - Integrated a new library to enhance overall state management. - **Refactor** - Updated state update mechanisms across interactive components and data flows. - Improved table widget processing for more consistent behavior. - **Chore** - Removed legacy development-only configuration settings. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-06 05:50:08 +00:00
import { create } from "mutative";
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
import type { WidgetEntity } from "plugins/Linting/lib/entity/WidgetEntity";
import type { UpdateDataTreeMessageData } from "sagas/EvalWorkerActionSagas";
import DataTreeEvaluator from "workers/common/DataTreeEvaluator";
import * as evalTreeWithChanges from "./evalTreeWithChanges";
chore: cache dependencyMap computation on client (#35965) ## Description This PR includes the changes to enable browser side caching of dependency map in published mode. Fixes #`Issue Number` _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" ### :mag: 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/11338708443> > Commit: af545a2309e259bd2b44533b6572a2cfbb53b51d > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11338708443&attempt=3" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Tue, 15 Oct 2024 07:42:33 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes - **New Features** - Introduced asynchronous profiling for web worker operations, enhancing telemetry capabilities. - Updated handling of the `EVAL_TREE` action to support asynchronous processing, improving performance. - Added a caching mechanism for computation results, optimizing data retrieval and management. - **Bug Fixes** - Improved accuracy of `applicationId` extraction for fetching published page resources. - **Tests** - Enhanced test cases for `DataTreeEvaluator` and caching mechanisms to reflect realistic application states. - **Chores** - Updated various components to support new asynchronous logic and caching properties. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Rishabh-Rathod <rishabh.rathod@appsmith.com>
2024-10-15 15:35:39 +00:00
import { APP_MODE } from "entities/App";
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
export const BASE_WIDGET = {
widgetId: "randomID",
widgetName: "randomWidgetName",
bottomRow: 0,
isLoading: false,
leftColumn: 0,
parentColumnSpace: 0,
parentRowSpace: 0,
renderMode: RenderModes.CANVAS,
rightColumn: 0,
topRow: 0,
type: "SKELETON_WIDGET",
parentId: "0",
version: 1,
ENTITY_TYPE: ENTITY_TYPE.WIDGET,
meta: {},
} as unknown as WidgetEntity;
export const BASE_WIDGET_CONFIG = {
logBlackList: {},
widgetId: "randomID",
type: "SKELETON_WIDGET",
ENTITY_TYPE: ENTITY_TYPE.WIDGET,
} as unknown as WidgetEntityConfig;
const WIDGET_CONFIG_MAP = {
TEXT_WIDGET: {
defaultProperties: {},
derivedProperties: {
value: "{{ this.text }}",
},
metaProperties: {},
},
};
const configTree: ConfigTree = {
Text1: generateDataTreeWidget(
{
...BASE_WIDGET_CONFIG,
...BASE_WIDGET,
widgetName: "Text1",
text: "Label",
type: "TEXT_WIDGET",
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
} as any,
{},
new Set(),
).configEntity,
Text2: generateDataTreeWidget(
{
...BASE_WIDGET_CONFIG,
...BASE_WIDGET,
widgetName: "Text2",
text: "{{Text1.text}}",
dynamicBindingPathList: [{ key: "text" }],
type: "TEXT_WIDGET",
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
} as any,
{},
new Set(),
).configEntity,
};
const unEvalTree = {
Text1: generateDataTreeWidget(
{
...BASE_WIDGET_CONFIG,
...BASE_WIDGET,
widgetName: "Text1",
text: "Label",
type: "TEXT_WIDGET",
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
} as any,
{},
new Set(),
).unEvalEntity,
Text2: generateDataTreeWidget(
{
...BASE_WIDGET_CONFIG,
...BASE_WIDGET,
widgetName: "Text2",
text: "{{Text1.text}}",
dynamicBindingPathList: [{ key: "text" }],
type: "TEXT_WIDGET",
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
} as any,
{},
new Set(),
).unEvalEntity,
};
describe("evaluateAndPushResponse", () => {
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
let pushResponseToMainThreadMock: any;
chore: add blank line eslint rule (#36369) ## Description Added ESLint rule to force blank lines between statements. Fixes #`Issue Number` _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" ### :mag: Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!CAUTION] > 🔴 🔴 🔴 Some tests have failed. > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10924926728> > Commit: 34f57714a1575ee04e94e03cbcaf95e57a96c86c > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10924926728&attempt=1&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank">Cypress dashboard</a>. > Tags: @tag.All > Spec: > The following are new failures, please fix them before merging the PR: <ol> > <li>cypress/e2e/Regression/ClientSide/Anvil/AnvilModal_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCheckboxGroupWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCurrencyInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilIconButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInlineButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilParagraphWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilPhoneInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilStatsWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchGroupWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilTableWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilToolbarButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilZoneSectionWidgetSnapshot_spec.ts</ol> > <a href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master" target="_blank">List of identified flaky tests</a>. > <hr>Wed, 18 Sep 2024 16:33:36 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No --------- Co-authored-by: Valera Melnikov <valera@appsmith.com>
2024-09-18 16:35:28 +00:00
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
beforeAll(() => {
pushResponseToMainThreadMock = jest
.spyOn(evalTreeWithChanges, "pushResponseToMainThread")
.mockImplementation(() => {}); // spy on foo
});
beforeAll(() => {
jest.clearAllMocks();
});
test("should call pushResponseToMainThread when we evaluate and push updates", () => {
evalTreeWithChanges.evaluateAndPushResponse(
undefined,
{
unEvalUpdates: [],
evalOrder: [],
jsUpdates: {},
},
[],
[],
);
// check if push response has been called
expect(pushResponseToMainThreadMock).toHaveBeenCalled();
});
});
describe("getAffectedNodesInTheDataTree", () => {
test("should merge paths from unEvalUpdates and evalOrder", () => {
const result = evalTreeWithChanges.getAffectedNodesInTheDataTree(
[
{
event: DataTreeDiffEvent.NOOP,
payload: {
propertyPath: "Text2.text",
value: "",
},
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
} as any,
],
["Text1.text"],
);
chore: add blank line eslint rule (#36369) ## Description Added ESLint rule to force blank lines between statements. Fixes #`Issue Number` _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" ### :mag: Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!CAUTION] > 🔴 🔴 🔴 Some tests have failed. > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10924926728> > Commit: 34f57714a1575ee04e94e03cbcaf95e57a96c86c > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10924926728&attempt=1&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank">Cypress dashboard</a>. > Tags: @tag.All > Spec: > The following are new failures, please fix them before merging the PR: <ol> > <li>cypress/e2e/Regression/ClientSide/Anvil/AnvilModal_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCheckboxGroupWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCurrencyInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilIconButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInlineButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilParagraphWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilPhoneInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilStatsWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchGroupWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilTableWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilToolbarButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilZoneSectionWidgetSnapshot_spec.ts</ol> > <a href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master" target="_blank">List of identified flaky tests</a>. > <hr>Wed, 18 Sep 2024 16:33:36 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No --------- Co-authored-by: Valera Melnikov <valera@appsmith.com>
2024-09-18 16:35:28 +00:00
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
expect(result).toEqual(["Text2.text", "Text1.text"]);
});
test("should extract unique paths from unEvalUpdates and evalOrder", () => {
const result = evalTreeWithChanges.getAffectedNodesInTheDataTree(
[
{
event: DataTreeDiffEvent.NOOP,
payload: {
propertyPath: "Text1.text",
value: "",
},
},
],
["Text1.text"],
);
chore: add blank line eslint rule (#36369) ## Description Added ESLint rule to force blank lines between statements. Fixes #`Issue Number` _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" ### :mag: Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!CAUTION] > 🔴 🔴 🔴 Some tests have failed. > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10924926728> > Commit: 34f57714a1575ee04e94e03cbcaf95e57a96c86c > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10924926728&attempt=1&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank">Cypress dashboard</a>. > Tags: @tag.All > Spec: > The following are new failures, please fix them before merging the PR: <ol> > <li>cypress/e2e/Regression/ClientSide/Anvil/AnvilModal_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCheckboxGroupWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCurrencyInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilIconButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInlineButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilParagraphWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilPhoneInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilStatsWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchGroupWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilTableWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilToolbarButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilZoneSectionWidgetSnapshot_spec.ts</ol> > <a href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master" target="_blank">List of identified flaky tests</a>. > <hr>Wed, 18 Sep 2024 16:33:36 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No --------- Co-authored-by: Valera Melnikov <valera@appsmith.com>
2024-09-18 16:35:28 +00:00
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
expect(result).toEqual(["Text1.text"]);
});
});
describe("evaluateAndGenerateResponse", () => {
let evaluator: DataTreeEvaluator;
const UPDATED_LABEL = "updated Label";
const getParsedUpdatesFromWebWorkerResp = (
webworkerResponse: UpdateDataTreeMessageData,
) => {
const updates = JSON.parse(webworkerResponse.workerResponse.updates);
chore: add blank line eslint rule (#36369) ## Description Added ESLint rule to force blank lines between statements. Fixes #`Issue Number` _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" ### :mag: Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!CAUTION] > 🔴 🔴 🔴 Some tests have failed. > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10924926728> > Commit: 34f57714a1575ee04e94e03cbcaf95e57a96c86c > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10924926728&attempt=1&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank">Cypress dashboard</a>. > Tags: @tag.All > Spec: > The following are new failures, please fix them before merging the PR: <ol> > <li>cypress/e2e/Regression/ClientSide/Anvil/AnvilModal_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCheckboxGroupWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCurrencyInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilIconButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInlineButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilParagraphWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilPhoneInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilStatsWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchGroupWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilTableWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilToolbarButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilZoneSectionWidgetSnapshot_spec.ts</ol> > <a href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master" target="_blank">List of identified flaky tests</a>. > <hr>Wed, 18 Sep 2024 16:33:36 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No --------- Co-authored-by: Valera Melnikov <valera@appsmith.com>
2024-09-18 16:35:28 +00:00
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
//scrub out all __evaluation__ patches
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
return updates.filter((p: any) => !p.rhs.__evaluation__);
};
chore: add blank line eslint rule (#36369) ## Description Added ESLint rule to force blank lines between statements. Fixes #`Issue Number` _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" ### :mag: Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!CAUTION] > 🔴 🔴 🔴 Some tests have failed. > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10924926728> > Commit: 34f57714a1575ee04e94e03cbcaf95e57a96c86c > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10924926728&attempt=1&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank">Cypress dashboard</a>. > Tags: @tag.All > Spec: > The following are new failures, please fix them before merging the PR: <ol> > <li>cypress/e2e/Regression/ClientSide/Anvil/AnvilModal_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCheckboxGroupWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCurrencyInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilIconButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInlineButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilParagraphWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilPhoneInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilStatsWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchGroupWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilTableWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilToolbarButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilZoneSectionWidgetSnapshot_spec.ts</ol> > <a href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master" target="_blank">List of identified flaky tests</a>. > <hr>Wed, 18 Sep 2024 16:33:36 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No --------- Co-authored-by: Valera Melnikov <valera@appsmith.com>
2024-09-18 16:35:28 +00:00
chore: cache dependencyMap computation on client (#35965) ## Description This PR includes the changes to enable browser side caching of dependency map in published mode. Fixes #`Issue Number` _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" ### :mag: 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/11338708443> > Commit: af545a2309e259bd2b44533b6572a2cfbb53b51d > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11338708443&attempt=3" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Tue, 15 Oct 2024 07:42:33 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes - **New Features** - Introduced asynchronous profiling for web worker operations, enhancing telemetry capabilities. - Updated handling of the `EVAL_TREE` action to support asynchronous processing, improving performance. - Added a caching mechanism for computation results, optimizing data retrieval and management. - **Bug Fixes** - Improved accuracy of `applicationId` extraction for fetching published page resources. - **Tests** - Enhanced test cases for `DataTreeEvaluator` and caching mechanisms to reflect realistic application states. - **Chores** - Updated various components to support new asynchronous logic and caching properties. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Rishabh-Rathod <rishabh.rathod@appsmith.com>
2024-10-15 15:35:39 +00:00
beforeEach(async () => {
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
evaluator = new DataTreeEvaluator(WIDGET_CONFIG_MAP);
chore: cache dependencyMap computation on client (#35965) ## Description This PR includes the changes to enable browser side caching of dependency map in published mode. Fixes #`Issue Number` _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" ### :mag: 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/11338708443> > Commit: af545a2309e259bd2b44533b6572a2cfbb53b51d > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11338708443&attempt=3" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Tue, 15 Oct 2024 07:42:33 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes - **New Features** - Introduced asynchronous profiling for web worker operations, enhancing telemetry capabilities. - Updated handling of the `EVAL_TREE` action to support asynchronous processing, improving performance. - Added a caching mechanism for computation results, optimizing data retrieval and management. - **Bug Fixes** - Improved accuracy of `applicationId` extraction for fetching published page resources. - **Tests** - Enhanced test cases for `DataTreeEvaluator` and caching mechanisms to reflect realistic application states. - **Chores** - Updated various components to support new asynchronous logic and caching properties. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Rishabh-Rathod <rishabh.rathod@appsmith.com>
2024-10-15 15:35:39 +00:00
await evaluator.setupFirstTree(
unEvalTree,
configTree,
{},
{
appId: "appId",
pageId: "pageId",
timestamp: "timestamp",
appMode: APP_MODE.PUBLISHED,
instanceId: "instanceId",
},
);
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
evaluator.evalAndValidateFirstTree();
});
test("inital evaluation successful should be successful", () => {
expect(evaluator.evalTree).toHaveProperty("Text2.text", "Label");
});
test("should respond with default values when dataTreeEvaluator is not provided", () => {
const webworkerResponse = evalTreeWithChanges.evaluateAndGenerateResponse(
undefined,
{
unEvalUpdates: [],
evalOrder: [],
jsUpdates: {},
},
[],
[],
);
const parsedUpdates = getParsedUpdatesFromWebWorkerResp(webworkerResponse);
expect(parsedUpdates).toEqual([]);
expect(webworkerResponse).toEqual({
workerResponse: {
dependencies: {},
errors: [],
evalMetaUpdates: [],
evaluationOrder: [],
isCreateFirstTree: false,
isNewWidgetAdded: false,
jsUpdates: {},
jsVarsCreatedEvent: [],
logs: [],
removedPaths: [],
staleMetaIds: [],
unEvalUpdates: [],
undefinedEvalValuesMap: {},
updates: "[]",
},
});
});
test("should generate no updates when the updateTreeResponse is empty", () => {
const webworkerResponse = evalTreeWithChanges.evaluateAndGenerateResponse(
evaluator,
{
unEvalUpdates: [],
evalOrder: [],
jsUpdates: {},
},
[],
[],
);
const parsedUpdates = getParsedUpdatesFromWebWorkerResp(webworkerResponse);
expect(parsedUpdates).toEqual([]);
});
describe("updates", () => {
test("should generate updates based on the unEvalUpdates", () => {
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
chore: bypass immer for first evaluation, fixed cloneDeep issue and using mutative instead of immer (#38993) ## Description - Using mutative instead of immer, this has reduced the main thread scripting by about 1 second. - Removed a cloneDeep during table onMount which saves about 70ms in main thread scripting. - Bypassed mutative when applying the first tree to reduce the overhead associated to mutative. Fixes #`Issue Number` _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" ### :mag: 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/13164792224> > Commit: 4cb821723d10198c9db70312a9604df5aa5f80c1 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13164792224&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Thu, 06 Feb 2025 04:21:41 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 Dependency** - Integrated a new library to enhance overall state management. - **Refactor** - Updated state update mechanisms across interactive components and data flows. - Improved table widget processing for more consistent behavior. - **Chore** - Removed legacy development-only configuration settings. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-06 05:50:08 +00:00
const updatedLabelUnevalTree = create(unEvalTree, (draft: any) => {
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
draft.Text1.text = UPDATED_LABEL;
draft.Text1.label = UPDATED_LABEL;
});
const updateTreeResponse = evaluator.setupUpdateTree(
updatedLabelUnevalTree,
configTree,
);
// ignore label Text1.label uneval update and just include Text1.text uneval update
updateTreeResponse.unEvalUpdates = [
{
event: DataTreeDiffEvent.NOOP,
payload: {
propertyPath: "Text1.text",
value: "",
},
},
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
] as any;
// the eval tree should have the uneval update but the diff should not be generated because the unEvalUpdates has been altered
expect(evaluator.evalTree).toHaveProperty("Text1.text", UPDATED_LABEL);
const webworkerResponse = evalTreeWithChanges.evaluateAndGenerateResponse(
evaluator,
updateTreeResponse,
[],
[],
);
fix: Add inverse dependencies to default response in evaluateAndGenerateResponse (#36780) ## Description <ins>Problem</ins> Table loader was not coming up when relaod was linked to any event other than page reload. <ins>Root cause</ins> Upon debugging we found that in one of the paths that generates `inverseDependecyMap` the object was always empty(for milliseconds only). It led to table not knowing that the query/api linked is in loading state. More details here on [slack thread](https://theappsmith.slack.com/archives/C05M5CTRHM3/p1728455111179839?thread_ts=1728455103.864849&cid=C05M5CTRHM3) <ins>Solution</ins> This pull request adds the inverse dependencies to the default response in the `evaluateAndGenerateResponse` function. It ensures that the `dependencies` property in the `defaultResponse` object includes the inverse dependencies from the `dataTreeEvaluator`. This change improves the accuracy and completeness of the default response. Fixes #36538 _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" ### :mag: 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/11269940675> > Commit: 675e0f29ad24c86156c66920ae664727c2a5c86a > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11269940675&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Thu, 10 Oct 2024 10:32:29 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced evaluation and response generation for widget updates in data trees. - Improved dependency mapping in evaluation responses. - **Bug Fixes** - Added tests to ensure correct handling of widget updates and dependencies. - **Refactor** - Improved clarity and organization of test cases for better maintainability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-10 11:36:11 +00:00
expect(webworkerResponse.workerResponse.dependencies).toEqual({
"Text1.text": ["Text2.text", "Text1"],
"Text2.text": ["Text2"],
});
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
const parsedUpdates =
getParsedUpdatesFromWebWorkerResp(webworkerResponse);
chore: add blank line eslint rule (#36369) ## Description Added ESLint rule to force blank lines between statements. Fixes #`Issue Number` _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" ### :mag: Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!CAUTION] > 🔴 🔴 🔴 Some tests have failed. > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10924926728> > Commit: 34f57714a1575ee04e94e03cbcaf95e57a96c86c > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10924926728&attempt=1&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank">Cypress dashboard</a>. > Tags: @tag.All > Spec: > The following are new failures, please fix them before merging the PR: <ol> > <li>cypress/e2e/Regression/ClientSide/Anvil/AnvilModal_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCheckboxGroupWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCurrencyInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilIconButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInlineButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilParagraphWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilPhoneInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilStatsWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchGroupWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilTableWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilToolbarButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilZoneSectionWidgetSnapshot_spec.ts</ol> > <a href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master" target="_blank">List of identified flaky tests</a>. > <hr>Wed, 18 Sep 2024 16:33:36 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No --------- Co-authored-by: Valera Melnikov <valera@appsmith.com>
2024-09-18 16:35:28 +00:00
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
// Text1.label update should be ignored
expect(parsedUpdates).not.toEqual(
expect.arrayContaining([
{
kind: "N",
path: ["Text1", "label"],
rhs: UPDATED_LABEL,
},
]),
);
});
test("should generate updates based on the evalOrder", () => {
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
chore: bypass immer for first evaluation, fixed cloneDeep issue and using mutative instead of immer (#38993) ## Description - Using mutative instead of immer, this has reduced the main thread scripting by about 1 second. - Removed a cloneDeep during table onMount which saves about 70ms in main thread scripting. - Bypassed mutative when applying the first tree to reduce the overhead associated to mutative. Fixes #`Issue Number` _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" ### :mag: 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/13164792224> > Commit: 4cb821723d10198c9db70312a9604df5aa5f80c1 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13164792224&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Thu, 06 Feb 2025 04:21:41 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 Dependency** - Integrated a new library to enhance overall state management. - **Refactor** - Updated state update mechanisms across interactive components and data flows. - Improved table widget processing for more consistent behavior. - **Chore** - Removed legacy development-only configuration settings. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-06 05:50:08 +00:00
const updatedLabelUnevalTree = create(unEvalTree, (draft: any) => {
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
draft.Text1.text = UPDATED_LABEL;
});
const updateTreeResponse = evaluator.setupUpdateTree(
updatedLabelUnevalTree,
configTree,
);
// ignore label Text1.label uneval update and just include Text1.text uneval update
// expect(updateTreeResponse.evalOrder).toEqual([]);
updateTreeResponse.evalOrder = [];
const webworkerResponse = evalTreeWithChanges.evaluateAndGenerateResponse(
evaluator,
updateTreeResponse,
[],
[],
);
const parsedUpdates =
getParsedUpdatesFromWebWorkerResp(webworkerResponse);
// Text1.label update should be ignored
expect(parsedUpdates).not.toEqual(
expect.arrayContaining([
{
kind: "N",
path: ["Text2", "text"],
rhs: "updated Label",
},
]),
);
});
test("should generate the correct updates to be sent to the main thread's state when the value tied to a binding changes ", () => {
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
chore: bypass immer for first evaluation, fixed cloneDeep issue and using mutative instead of immer (#38993) ## Description - Using mutative instead of immer, this has reduced the main thread scripting by about 1 second. - Removed a cloneDeep during table onMount which saves about 70ms in main thread scripting. - Bypassed mutative when applying the first tree to reduce the overhead associated to mutative. Fixes #`Issue Number` _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" ### :mag: 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/13164792224> > Commit: 4cb821723d10198c9db70312a9604df5aa5f80c1 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13164792224&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Thu, 06 Feb 2025 04:21:41 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 Dependency** - Integrated a new library to enhance overall state management. - **Refactor** - Updated state update mechanisms across interactive components and data flows. - Improved table widget processing for more consistent behavior. - **Chore** - Removed legacy development-only configuration settings. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-06 05:50:08 +00:00
const updatedLabelUnevalTree = create(unEvalTree, (draft: any) => {
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
if (draft.Text1?.text) {
draft.Text1.text = UPDATED_LABEL;
}
});
const updateTreeResponse = evaluator.setupUpdateTree(
updatedLabelUnevalTree,
configTree,
);
const webworkerResponse = evalTreeWithChanges.evaluateAndGenerateResponse(
evaluator,
updateTreeResponse,
[],
[],
);
const parsedUpdates =
getParsedUpdatesFromWebWorkerResp(webworkerResponse);
chore: add blank line eslint rule (#36369) ## Description Added ESLint rule to force blank lines between statements. Fixes #`Issue Number` _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" ### :mag: Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!CAUTION] > 🔴 🔴 🔴 Some tests have failed. > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10924926728> > Commit: 34f57714a1575ee04e94e03cbcaf95e57a96c86c > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10924926728&attempt=1&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank">Cypress dashboard</a>. > Tags: @tag.All > Spec: > The following are new failures, please fix them before merging the PR: <ol> > <li>cypress/e2e/Regression/ClientSide/Anvil/AnvilModal_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCheckboxGroupWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCurrencyInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilIconButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInlineButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilParagraphWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilPhoneInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilStatsWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchGroupWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilTableWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilToolbarButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilZoneSectionWidgetSnapshot_spec.ts</ol> > <a href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master" target="_blank">List of identified flaky tests</a>. > <hr>Wed, 18 Sep 2024 16:33:36 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No --------- Co-authored-by: Valera Melnikov <valera@appsmith.com>
2024-09-18 16:35:28 +00:00
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
expect(parsedUpdates).toEqual(
expect.arrayContaining([
{
kind: "N",
path: ["Text1", "text"],
rhs: "updated Label",
},
{
kind: "N",
path: ["Text2", "text"],
rhs: "updated Label",
},
]),
);
expect(evaluator.evalTree).toHaveProperty("Text2.text", UPDATED_LABEL);
});
test("should merge additional updates to the dataTree as well as push the updates back to the main thread's state when unEvalUpdates is ignored", () => {
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
chore: bypass immer for first evaluation, fixed cloneDeep issue and using mutative instead of immer (#38993) ## Description - Using mutative instead of immer, this has reduced the main thread scripting by about 1 second. - Removed a cloneDeep during table onMount which saves about 70ms in main thread scripting. - Bypassed mutative when applying the first tree to reduce the overhead associated to mutative. Fixes #`Issue Number` _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" ### :mag: 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/13164792224> > Commit: 4cb821723d10198c9db70312a9604df5aa5f80c1 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13164792224&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Thu, 06 Feb 2025 04:21:41 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 Dependency** - Integrated a new library to enhance overall state management. - **Refactor** - Updated state update mechanisms across interactive components and data flows. - Improved table widget processing for more consistent behavior. - **Chore** - Removed legacy development-only configuration settings. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-06 05:50:08 +00:00
const updatedLabelUnevalTree = create(unEvalTree, (draft: any) => {
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
if (draft.Text1?.text) {
draft.Text1.text = UPDATED_LABEL;
}
});
const updateTreeResponse = evaluator.setupUpdateTree(
updatedLabelUnevalTree,
configTree,
);
chore: add blank line eslint rule (#36369) ## Description Added ESLint rule to force blank lines between statements. Fixes #`Issue Number` _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" ### :mag: Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!CAUTION] > 🔴 🔴 🔴 Some tests have failed. > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10924926728> > Commit: 34f57714a1575ee04e94e03cbcaf95e57a96c86c > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10924926728&attempt=1&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank">Cypress dashboard</a>. > Tags: @tag.All > Spec: > The following are new failures, please fix them before merging the PR: <ol> > <li>cypress/e2e/Regression/ClientSide/Anvil/AnvilModal_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCheckboxGroupWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCurrencyInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilIconButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInlineButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilParagraphWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilPhoneInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilStatsWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchGroupWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilTableWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilToolbarButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilZoneSectionWidgetSnapshot_spec.ts</ol> > <a href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master" target="_blank">List of identified flaky tests</a>. > <hr>Wed, 18 Sep 2024 16:33:36 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No --------- Co-authored-by: Valera Melnikov <valera@appsmith.com>
2024-09-18 16:35:28 +00:00
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
//set the unEvalUpdates is empty so that evaluation ignores diffing the node
updateTreeResponse.unEvalUpdates = [];
const webworkerResponse = evalTreeWithChanges.evaluateAndGenerateResponse(
evaluator,
updateTreeResponse,
[],
["Text1.text"],
);
const parsedUpdates =
getParsedUpdatesFromWebWorkerResp(webworkerResponse);
chore: add blank line eslint rule (#36369) ## Description Added ESLint rule to force blank lines between statements. Fixes #`Issue Number` _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" ### :mag: Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!CAUTION] > 🔴 🔴 🔴 Some tests have failed. > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10924926728> > Commit: 34f57714a1575ee04e94e03cbcaf95e57a96c86c > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10924926728&attempt=1&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank">Cypress dashboard</a>. > Tags: @tag.All > Spec: > The following are new failures, please fix them before merging the PR: <ol> > <li>cypress/e2e/Regression/ClientSide/Anvil/AnvilModal_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCheckboxGroupWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCurrencyInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilIconButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInlineButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilParagraphWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilPhoneInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilStatsWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchGroupWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilTableWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilToolbarButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilZoneSectionWidgetSnapshot_spec.ts</ol> > <a href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master" target="_blank">List of identified flaky tests</a>. > <hr>Wed, 18 Sep 2024 16:33:36 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No --------- Co-authored-by: Valera Melnikov <valera@appsmith.com>
2024-09-18 16:35:28 +00:00
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
expect(parsedUpdates).toEqual(
expect.arrayContaining([
{
kind: "N",
path: ["Text1", "text"],
rhs: UPDATED_LABEL,
},
]),
);
expect(evaluator.evalTree).toHaveProperty("Text1.text", UPDATED_LABEL);
});
});
describe("evalMetaUpdates", () => {
test("should add metaUpdates in the webworker's response", () => {
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
chore: bypass immer for first evaluation, fixed cloneDeep issue and using mutative instead of immer (#38993) ## Description - Using mutative instead of immer, this has reduced the main thread scripting by about 1 second. - Removed a cloneDeep during table onMount which saves about 70ms in main thread scripting. - Bypassed mutative when applying the first tree to reduce the overhead associated to mutative. Fixes #`Issue Number` _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" ### :mag: 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/13164792224> > Commit: 4cb821723d10198c9db70312a9604df5aa5f80c1 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13164792224&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Thu, 06 Feb 2025 04:21:41 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 Dependency** - Integrated a new library to enhance overall state management. - **Refactor** - Updated state update mechanisms across interactive components and data flows. - Improved table widget processing for more consistent behavior. - **Chore** - Removed legacy development-only configuration settings. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-06 05:50:08 +00:00
const updatedLabelUnevalTree = create(unEvalTree, (draft: any) => {
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
if (draft.Text1?.text) {
draft.Text1.text = UPDATED_LABEL;
}
});
const response = evaluator.setupUpdateTree(
updatedLabelUnevalTree,
configTree,
);
const metaUpdates = [
{
widgetId: unEvalTree.Text1.widgetId,
metaPropertyPath: ["someMetaValuePath"],
value: "someValue",
},
];
const { workerResponse } =
evalTreeWithChanges.evaluateAndGenerateResponse(
evaluator,
response,
metaUpdates,
[],
);
expect(workerResponse.evalMetaUpdates).toEqual(metaUpdates);
});
test("should sanitise metaUpdates in the webworker's response and strip out non serialisable properties", () => {
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
chore: bypass immer for first evaluation, fixed cloneDeep issue and using mutative instead of immer (#38993) ## Description - Using mutative instead of immer, this has reduced the main thread scripting by about 1 second. - Removed a cloneDeep during table onMount which saves about 70ms in main thread scripting. - Bypassed mutative when applying the first tree to reduce the overhead associated to mutative. Fixes #`Issue Number` _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" ### :mag: 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/13164792224> > Commit: 4cb821723d10198c9db70312a9604df5aa5f80c1 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13164792224&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Thu, 06 Feb 2025 04:21:41 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 Dependency** - Integrated a new library to enhance overall state management. - **Refactor** - Updated state update mechanisms across interactive components and data flows. - Improved table widget processing for more consistent behavior. - **Chore** - Removed legacy development-only configuration settings. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-06 05:50:08 +00:00
const updatedLabelUnevalTree = create(unEvalTree, (draft: any) => {
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
if (draft.Text1?.text) {
draft.Text1.text = UPDATED_LABEL;
}
});
const response = evaluator.setupUpdateTree(
updatedLabelUnevalTree,
configTree,
);
const metaUpdates = [
{
widgetId: unEvalTree.Text1.widgetId,
metaPropertyPath: ["someMetaValuePath"],
value: function () {},
},
];
const { workerResponse } =
evalTreeWithChanges.evaluateAndGenerateResponse(
evaluator,
response,
metaUpdates,
[],
);
// the function properties should be stripped out
expect(workerResponse.evalMetaUpdates).toEqual([
{
widgetId: unEvalTree.Text1.widgetId,
metaPropertyPath: ["someMetaValuePath"],
},
]);
});
});
describe("unEvalUpdates", () => {
test("should add unEvalUpdates to the web worker response", () => {
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
chore: bypass immer for first evaluation, fixed cloneDeep issue and using mutative instead of immer (#38993) ## Description - Using mutative instead of immer, this has reduced the main thread scripting by about 1 second. - Removed a cloneDeep during table onMount which saves about 70ms in main thread scripting. - Bypassed mutative when applying the first tree to reduce the overhead associated to mutative. Fixes #`Issue Number` _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" ### :mag: 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/13164792224> > Commit: 4cb821723d10198c9db70312a9604df5aa5f80c1 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13164792224&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Thu, 06 Feb 2025 04:21:41 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 Dependency** - Integrated a new library to enhance overall state management. - **Refactor** - Updated state update mechanisms across interactive components and data flows. - Improved table widget processing for more consistent behavior. - **Chore** - Removed legacy development-only configuration settings. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-06 05:50:08 +00:00
const updatedLabelUnevalTree = create(unEvalTree, (draft: any) => {
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
if (draft.Text1?.text) {
draft.Text1.text = UPDATED_LABEL;
}
});
const updateTreeResponse = evaluator.setupUpdateTree(
updatedLabelUnevalTree,
configTree,
);
const webworkerResponse = evalTreeWithChanges.evaluateAndGenerateResponse(
evaluator,
updateTreeResponse,
[],
[],
);
const parsedUpdates =
getParsedUpdatesFromWebWorkerResp(webworkerResponse);
chore: add blank line eslint rule (#36369) ## Description Added ESLint rule to force blank lines between statements. Fixes #`Issue Number` _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" ### :mag: Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!CAUTION] > 🔴 🔴 🔴 Some tests have failed. > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10924926728> > Commit: 34f57714a1575ee04e94e03cbcaf95e57a96c86c > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10924926728&attempt=1&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank">Cypress dashboard</a>. > Tags: @tag.All > Spec: > The following are new failures, please fix them before merging the PR: <ol> > <li>cypress/e2e/Regression/ClientSide/Anvil/AnvilModal_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCheckboxGroupWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCurrencyInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilIconButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInlineButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilParagraphWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilPhoneInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilStatsWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchGroupWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilTableWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilToolbarButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilZoneSectionWidgetSnapshot_spec.ts</ol> > <a href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master" target="_blank">List of identified flaky tests</a>. > <hr>Wed, 18 Sep 2024 16:33:36 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No --------- Co-authored-by: Valera Melnikov <valera@appsmith.com>
2024-09-18 16:35:28 +00:00
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
expect(webworkerResponse.workerResponse.unEvalUpdates).toEqual([
{
event: DataTreeDiffEvent.NOOP,
payload: { propertyPath: "Text1.text", value: "" },
},
]);
expect(parsedUpdates).toEqual(
expect.arrayContaining([
{
kind: "N",
path: ["Text1", "text"],
rhs: UPDATED_LABEL,
},
]),
);
});
test("should ignore generating updates when unEvalUpdates is empty", () => {
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
chore: bypass immer for first evaluation, fixed cloneDeep issue and using mutative instead of immer (#38993) ## Description - Using mutative instead of immer, this has reduced the main thread scripting by about 1 second. - Removed a cloneDeep during table onMount which saves about 70ms in main thread scripting. - Bypassed mutative when applying the first tree to reduce the overhead associated to mutative. Fixes #`Issue Number` _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" ### :mag: 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/13164792224> > Commit: 4cb821723d10198c9db70312a9604df5aa5f80c1 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13164792224&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Thu, 06 Feb 2025 04:21:41 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 Dependency** - Integrated a new library to enhance overall state management. - **Refactor** - Updated state update mechanisms across interactive components and data flows. - Improved table widget processing for more consistent behavior. - **Chore** - Removed legacy development-only configuration settings. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-06 05:50:08 +00:00
const updatedLabelUnevalTree = create(unEvalTree, (draft: any) => {
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
if (draft.Text1?.text) {
draft.Text1.text = UPDATED_LABEL;
}
});
const updateTreeResponse = evaluator.setupUpdateTree(
updatedLabelUnevalTree,
configTree,
);
chore: add blank line eslint rule (#36369) ## Description Added ESLint rule to force blank lines between statements. Fixes #`Issue Number` _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" ### :mag: Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!CAUTION] > 🔴 🔴 🔴 Some tests have failed. > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10924926728> > Commit: 34f57714a1575ee04e94e03cbcaf95e57a96c86c > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10924926728&attempt=1&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank">Cypress dashboard</a>. > Tags: @tag.All > Spec: > The following are new failures, please fix them before merging the PR: <ol> > <li>cypress/e2e/Regression/ClientSide/Anvil/AnvilModal_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCheckboxGroupWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilCurrencyInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilIconButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInlineButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilParagraphWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilPhoneInputWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilStatsWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchGroupWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilSwitchWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilTableWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilToolbarButtonWidgetSnapshot_spec.ts > <li>cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilZoneSectionWidgetSnapshot_spec.ts</ol> > <a href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master" target="_blank">List of identified flaky tests</a>. > <hr>Wed, 18 Sep 2024 16:33:36 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No --------- Co-authored-by: Valera Melnikov <valera@appsmith.com>
2024-09-18 16:35:28 +00:00
fix: evalTrigger mutation fix (#34106) ## Description This fixes a gap in our evaluation flow where we were not sending evaluation updates during an evaluation in the evalTrigger. We have resolved that by sending updates in the evalTrigger, also we have created a separate function called evaluateAndGenerateWebWorkerResponse which unifies the logic between sending updates in evalTrigger as well as evalTreeWithChanges. We have added several unit test cases in this PR to test the evaluation flow. Fixes #33823 > [!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" ### :mag: 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/9558723818> > Commit: 8b7bc93e3d1a8ce93c722a94c8846f9359d40686 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9558723818&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `` <!-- 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 - **Refactor** - Improved the evaluation and update process for data tree structures with new helper functions and interfaces. - Enhanced error handling with optional chaining in `setPrevState` function. - **New Features** - Introduced `evaluateAndPushResponse`, `evaluateAndGenerateResponse`, and `getAffectedNodesInTheDataTree` functions for better data tree evaluation and updates. - Added `UpdateTreeResponse` interface for structured update responses. - **Bug Fixes** - Adjusted error handling in the evaluation process to ensure robustness. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-18 09:45:24 +00:00
//set the evalOrder is empty so that evaluation ignores diffing the node
updateTreeResponse.unEvalUpdates = [];
const webworkerResponse = evalTreeWithChanges.evaluateAndGenerateResponse(
evaluator,
updateTreeResponse,
[],
[],
);
const parsedUpdates =
getParsedUpdatesFromWebWorkerResp(webworkerResponse);
expect(parsedUpdates).not.toEqual(
expect.arrayContaining([
{
kind: "N",
path: ["Text1", "text"],
rhs: UPDATED_LABEL,
},
]),
);
});
});
});