Skip to content

fix: Updating updateDependencies map to execute newly binded queries in reactive flow#41014

Merged
ankitakinger merged 1 commit intofeat/reactive-actionsfrom
fix/update-dependency-map
Jun 23, 2025
Merged

fix: Updating updateDependencies map to execute newly binded queries in reactive flow#41014
ankitakinger merged 1 commit intofeat/reactive-actionsfrom
fix/update-dependency-map

Conversation

@ankitakinger
Copy link
Contributor

@ankitakinger ankitakinger commented Jun 20, 2025

Description

Updating updateDependencies map to execute newly binded queries in reactive flow without needing to refresh page to make it work as expected.

Fixes #41017

Automation

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

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/15785768276
Commit: b7c967b
Cypress dashboard.
Tags: @tag.All
Spec:


Fri, 20 Jun 2025 20:15:44 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Introduced automatic execution of reactive queries based on data changes, improving app responsiveness.
    • Added tracking and display of on-load action execution status for better visibility of action runs.
    • Enhanced dependency detection and validation for actions and JS functions, reducing configuration errors.
  • Improvements

    • Analytics events now include action run behavior for more detailed tracking.
    • Optimized evaluation performance by skipping unnecessary updates and comparing previous values.
    • Refined handling of dynamic triggers and reactive paths for actions and JS functions.
  • Bug Fixes

    • Improved detection and prevention of reactive dependency misuse to avoid cyclic or invalid dependencies.
    • Fixed issues with dependency tracking in complex data structures, especially for JS actions.
  • Developer Experience

    • Unified and clarified evaluation substitution types across the app.
    • Expanded and updated test coverage for new action and evaluation behaviors.
    • Improved type safety and code clarity in utility and selector functions.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 20, 2025

Walkthrough

This update introduces new Redux action types for on-load action execution and reactive queries, enhances dependency and trigger path tracking for actions and JS actions, and implements saga logic to execute reactive queries based on run behavior. Numerous files are refactored to standardize the EvaluationSubstitutionType import source, and test cases are updated to reflect new metadata and dependency handling.

Changes

Files/Group Change Summary
constants/EvaluationConstants.ts Added EvaluationSubstitutionType enum.
ce/constants/ReduxActionConstants.tsx Added SET_ONLOAD_ACTION_EXECUTED, EXECUTE_REACTIVE_QUERIES action types.
ce/entities/DataTree/types.ts, ce/entities/DataTree/types/DataTreeSeed.ts Refactored types: added dynamicTriggerPathList, runBehaviour; removed EvaluationSubstitutionType enum and DataTreeSeed (now in separate file).
ee/entities/DataTree/types/DataTreeSeed.ts Re-exported DataTreeSeed from CE.
ce/entities/DataTree/dataTreeAction.ts, ce/entities/DataTree/dataTreeJSAction.ts, ce/entities/DataTree/dataTreeJSAction.test.ts Enhanced handling for dynamic triggers, run behavior, and updated test expectations.
ce/sagas/PostEvaluationSagas.ts, ce/sagas/index.ts, ce/sagas/moduleInstanceSagaUtils.ts, ee/sagas/moduleInstanceSagaUtils.ts Added saga for executing reactive queries, utility for JS module instances, and saga registration.
ce/reducers/uiReducers/editorReducer.tsx, selectors/editorSelectors.tsx Added on-load action execution tracking, handler for execution status, and selector for actions with execution status.
ce/sagas/ActionExecution/ActionExecutionSagas.ts, sagas/ActionExecution/PluginActionSaga.ts, sagas/EvaluationsSaga.ts, sagas/JSPaneSagas.ts Improved analytics with runBehaviour, added execution tracking, and integrated new Redux actions.
ce/entities/DataTree/types.ts, ce/entities/DataTree/types/DataTreeSeed.ts Refactored and modularized type definitions.
entities/DependencyMap/DependencyMapUtils.ts, entities/DependencyMap/__tests__/index.test.ts Enhanced dependency misuse detection and updated test expectations for dependencies.
workers/common/DataTreeEvaluator/index.ts, workers/Evaluation/evalTreeWithChanges.ts, workers/Evaluation/handlers/evalTree.ts, workers/Evaluation/handlers/evalTrigger.ts, workers/Evaluation/types.ts Added tracking and propagation of executeReactiveActions, updated evaluation flow to support old/new tree comparison, and extended response types.
workers/common/DependencyMap/index.ts Improved dependency map update logic for EDIT events and integrated config tree.
entities/Action/actionProperties.ts, entities/Action/actionProperties.test.ts Updated reactive paths to include run, and adjusted tests.
utils/DynamicBindingUtils.ts Refined isPathDynamicTrigger typing and logic.
layoutSystems/common/DSLConversions/fixedToAutoLayout.ts Made removeNullValuesFromObject type concrete (DSLWidget).
components/editorComponents/CodeEditor/*.tsx, components/formControls/DynamicTextFieldControl.tsx, constants/PropertyControlConstants.tsx, entities/Widget/utils.ts, entities/Widget/utils.test.ts, plugins/Linting/utils/entityParser.ts, utils/editor/EditorBindingPaths.ts, utils/helpers.test.ts, widgets/*, widgets/*/propertyConfig*.ts*, utils/FilterInternalProperties/__tests__/index.test.ts, utils/autocomplete/__tests__/dataTreeTypeDefCreator.test.ts Standardized import of EvaluationSubstitutionType from constants/EvaluationConstants.
workers/Evaluation/JSObject/utils.ts, workers/Evaluation/JSObject/JSObject.test.ts Added runBehaviour to JS action meta, updated test data.
workers/Evaluation/evaluationUtils.ts Added utilities for dependency and type checks.
entities/DataTree/dataTreeFactory.ts Updated import path for DataTreeSeed.
widgets/MetaHOC.tsx Added guard clause for empty batch actions.
widgets/TableWidgetV2/widget/index.tsx Switched to deep equality for tableData change detection.
workers/Evaluation/evalTreeWithChanges.test.ts, workers/Evaluation/__tests__/evaluation.test.ts, workers/common/DataTreeEvaluator/dataTreeEvaluator.test.ts Updated tests for new evaluation parameters, dependency map expectations, and meta properties.

Sequence Diagram(s)

sequenceDiagram
    participant UI
    participant Redux
    participant Saga
    participant Evaluator
    participant DataTree

    UI->>Redux: Dispatch EXECUTE_REACTIVE_QUERIES
    Redux->>Saga: Saga listens for EXECUTE_REACTIVE_QUERIES
    Saga->>Evaluator: Get dataTree, configTree, executeReactiveActions
    loop For each reactive action
        Saga->>DataTree: Find entity and property path
        alt JS Action
            Saga->>Redux: Dispatch START_EXECUTE_JS_FUNCTION
            Saga->>Saga: Wait for function execution completion
        else Regular Action
            Saga->>Redux: Dispatch RUN_ACTION
            Saga->>Saga: Wait for action success/error
        end
        Saga->>Redux: Dispatch SET_ONLOAD_ACTION_EXECUTED
    end
Loading

Possibly related PRs

  • appsmithorg/appsmith#40608: Implements and supports the "AUTOMATIC" run behavior feature, directly related to this PR's run behavior and execution tracking.
  • appsmithorg/appsmith#40355: Replaces executeOnLoad with enum-based runBehaviour, updating types, reducers, and sagas—strongly related to action execution changes here.
  • appsmithorg/appsmith#40481: Addresses cyclic dependencies in reactive query execution, related to this PR's enhancements in reactive query handling.

Suggested labels

Bug, Core Query Execution, Task, IDE Pod, Integrations Product, Integrations Pod General, Query Widgets & IDE Pod

Suggested reviewers

  • ApekshaBhosale

Poem

🎉
Reactive queries now take the stage,
With triggers and actions, they engage!
Run behaviors tracked, dependencies neat,
Sagas and reducers in harmony meet.
On-load, automatic, manual too—
The data tree’s smarter, thanks to this crew!
🚀

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ankitakinger ankitakinger changed the base branch from feat/reactive-actions to release June 20, 2025 18:52
@ankitakinger ankitakinger requested review from a team as code owners June 20, 2025 18:52
@ankitakinger ankitakinger requested review from jacquesikot and removed request for a team June 20, 2025 18:52
@ankitakinger ankitakinger added the ok-to-test Required label for CI label Jun 20, 2025
@github-actions github-actions bot added the Bug Something isn't working label Jun 20, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

🔭 Outside diff range comments (1)
app/client/src/utils/DynamicBindingUtils.ts (1)

243-256: Excellent type safety improvement

Good refactoring from any type to specific union types. However, address the static analysis hint about optional chaining.

Apply this diff to use optional chaining as suggested by static analysis:

-  if (
-    entity &&
-    entity.dynamicTriggerPathList &&
-    Array.isArray(entity.dynamicTriggerPathList)
-  ) {
+  if (entity?.dynamicTriggerPathList && Array.isArray(entity.dynamicTriggerPathList)) {
🧹 Nitpick comments (13)
app/client/src/workers/common/DependencyMap/index.ts (1)

331-354: Code duplication detected - consider refactoring for maintainability.

The newly added logic in the EDIT case duplicates the dependency processing logic from the NEW case (lines 239-261). While the functional improvement is correct and aligns with the reactive query execution objectives, this duplication creates a maintenance burden.

Consider extracting the common dependency processing logic into a helper function:

+const processEntityDependencies = (
+  entity: ActionEntity | WidgetEntity | JSActionEntity,
+  entityName: string,
+  configTree: ConfigTree,
+  allKeys: Record<string, true>,
+  setDependenciesToDepedencyMapFn: (path: string, references: string[]) => void,
+  dataTreeEvalErrors: any[]
+) => {
+  const entityDependencyMap = getEntityDependencies(
+    entity,
+    configTree[entityName],
+    allKeys,
+  );
+
+  if (!isEmpty(entityDependencyMap)) {
+    Object.entries(entityDependencyMap).forEach(
+      ([path, pathDependencies]) => {
+        const { errors: extractDependencyErrors, references } =
+          extractInfoFromBindings(pathDependencies, allKeys);
+
+        setDependenciesToDepedencyMapFn(path, references);
+        dataTreeEvalErrors.push(...extractDependencyErrors);
+      },
+    );
+    return true;
+  }
+  return false;
+};

Then use this helper in both NEW and EDIT cases to reduce duplication.

app/client/src/sagas/EvaluationsSaga.ts (1)

238-251: Improve safety with optional chaining.

The reactive query dispatch logic is well-structured, but consider using optional chaining for better safety.

Apply this diff to use optional chaining:

-  if (
-    executeReactiveActions &&
-    executeReactiveActions.length &&
-    isReactiveActionsEnabled
-  ) {
+  if (
+    executeReactiveActions?.length &&
+    isReactiveActionsEnabled
+  ) {
app/client/src/ce/sagas/moduleInstanceSagaUtils.ts (1)

14-20: Add TODO comment for placeholder implementation.

The empty generator function appears to be an intentional placeholder. Consider adding a TODO comment to clarify the intended implementation.

+// TODO: Implement module instance execution logic
 export function* executionForJSModuleInstance({
   configTree,
   dataTree,
   entity,
   entityName,
   propertyPath,
 }: ParamsForJSModuleInstance) {}
app/client/src/ce/entities/DataTree/dataTreeAction.ts (1)

59-75: Consider immutability for action configuration

The view mode logic correctly handles the scenario, but directly mutating action.config.actionConfiguration could cause side effects. Consider creating a new object instead.

-    action.config.actionConfiguration = {
-      ...action.config.actionConfiguration,
-      body: result,
-    };
+    const updatedActionConfiguration = {
+      ...action.config.actionConfiguration,
+      body: result,
+    };
app/client/src/ce/entities/DataTree/types/DataTreeSeed.ts (1)

14-34: LGTM: Comprehensive data tree seed interface

Well-structured interface that centralizes the data tree evaluation context. The TODO comments appropriately acknowledge the technical debt around any types.

Consider prioritizing the replacement of any types with proper interfaces in future iterations.

app/client/src/ce/workers/Evaluation/evaluationUtils.ts (2)

1200-1205: Strengthen JSAction data path validation.

The current check could match unintended paths. Consider validating that the path follows the expected pattern <functionName>.data.

 if (isJSAction(entity)) {
   // Check if propertyPath matches <function>.data (not just 'data')
-  if (propertyPath.endsWith(".data") && propertyPath !== "data") {
+  const pathParts = propertyPath.split(".");
+  if (pathParts.length === 2 && pathParts[1] === "data") {
     return true;
   }
 }

1210-1213: Add TODO comment for stub implementation.

This stub function should have a TODO comment explaining its purpose and when it will be implemented.

 /* eslint-disable-next-line @typescript-eslint/no-unused-vars */
+// TODO: Implement JS module instance detection logic
 export function isJSModuleInstance(entity: DataTreeEntity) {
   return false;
 }
app/client/src/workers/Evaluation/evalTreeWithChanges.ts (1)

77-77: Consider performance impact of deep cloning.

Using klona to deep clone the entire evaluation tree could be expensive for large applications. Consider if a shallow clone or selective cloning would suffice.

#!/bin/bash
# Check the typical size of eval trees by looking for tree size logging or metrics
rg -A 5 "evalTree.*size|tree.*nodes|dataTree.*count" --type ts
app/client/src/sagas/PostEvaluationSagas.ts (1)

395-395: Fix static analysis issues.

Address the redundant double-negation and missing optional chaining.

-if (!!entityConfig.moduleInstanceId) {
+if (entityConfig.moduleInstanceId) {

-const runBehaviour =
-  entityConfig?.meta && entityConfig.meta[action.name]?.runBehaviour;
+const runBehaviour = entityConfig?.meta?.[action.name]?.runBehaviour;

Also applies to: 408-408

app/client/src/entities/DependencyMap/DependencyMapUtils.ts (2)

61-61: Fix static context 'this' usage.

Using this in static methods can be confusing. Use the class name instead.

-this.detectReactiveDependencyMisuse(dependencyMap, configTree);
+DependencyMapUtils.detectReactiveDependencyMisuse(dependencyMap, configTree);

-this.isTriggerPath(dep, configTree),
+DependencyMapUtils.isTriggerPath(dep, configTree),

-const dataPaths = Array.from(deps).filter((dep) => this.isDataPath(dep));
+const dataPaths = Array.from(deps).filter((dep) => DependencyMapUtils.isDataPath(dep));

Also applies to: 223-223, 225-225


250-252: Avoid using ts-ignore.

Instead of using ts-ignore, properly type the error object.

-// eslint-disable-next-line @typescript-eslint/ban-ts-comment
-// @ts-ignore
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-(error as any).node = node;
+interface ReactiveDependencyError extends Error {
+  node?: string;
+}
+const typedError = error as ReactiveDependencyError;
+typedError.node = node;
app/client/src/workers/common/DataTreeEvaluator/index.ts (2)

1153-1154: Performance concern with value change tracking

The value change tracking adds comparison overhead for every evaluated property. For large data trees, this could impact performance.

Consider implementing a more efficient change detection mechanism:

  1. Use a Set for O(1) lookups instead of an object
  2. Consider lazy evaluation of changes only for paths with reactive dependencies
  3. Add performance metrics to monitor the impact

Also applies to: 1192-1193, 1347-1349, 1406-1408, 1460-1464, 1496-1498


1612-1614: Simplify error message handling

The ternary operator for error message handling can be simplified.

-        message: (result.error as Error).message
-          ? (result.error as Error).message
-          : "Cyclic dependency found while evaluating.",
+        message: (result.error as Error).message || "Cyclic dependency found while evaluating.",
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d3d4f0c and b7c967b.

📒 Files selected for processing (93)
  • app/client/src/ce/constants/ReduxActionConstants.tsx (1 hunks)
  • app/client/src/ce/entities/DataTree/dataTreeAction.ts (3 hunks)
  • app/client/src/ce/entities/DataTree/dataTreeJSAction.test.ts (4 hunks)
  • app/client/src/ce/entities/DataTree/dataTreeJSAction.ts (6 hunks)
  • app/client/src/ce/entities/DataTree/types.ts (3 hunks)
  • app/client/src/ce/entities/DataTree/types/DataTreeSeed.ts (1 hunks)
  • app/client/src/ce/reducers/uiReducers/editorReducer.tsx (8 hunks)
  • app/client/src/ce/sagas/ActionExecution/ActionExecutionSagas.ts (1 hunks)
  • app/client/src/ce/sagas/index.tsx (2 hunks)
  • app/client/src/ce/sagas/moduleInstanceSagaUtils.ts (1 hunks)
  • app/client/src/ce/selectors/moduleInstanceSelectors.ts (1 hunks)
  • app/client/src/ce/utils/actionExecutionUtils.ts (1 hunks)
  • app/client/src/ce/workers/Evaluation/evaluationUtils.test.ts (2 hunks)
  • app/client/src/ce/workers/Evaluation/evaluationUtils.ts (1 hunks)
  • app/client/src/ce/workers/common/DependencyMap/utils/getEntityDependenciesByType.ts (1 hunks)
  • app/client/src/components/editorComponents/CodeEditor/EvaluatedValuePopup.tsx (1 hunks)
  • app/client/src/components/editorComponents/CodeEditor/index.tsx (1 hunks)
  • app/client/src/components/formControls/DynamicTextFieldControl.tsx (1 hunks)
  • app/client/src/constants/EvaluationConstants.ts (1 hunks)
  • app/client/src/constants/PropertyControlConstants.tsx (1 hunks)
  • app/client/src/ee/entities/DataTree/types/DataTreeSeed.ts (1 hunks)
  • app/client/src/ee/sagas/moduleInstanceSagaUtils.ts (1 hunks)
  • app/client/src/entities/Action/actionProperties.test.ts (7 hunks)
  • app/client/src/entities/Action/actionProperties.ts (2 hunks)
  • app/client/src/entities/DataTree/dataTreeFactory.ts (1 hunks)
  • app/client/src/entities/DataTree/dataTreeWidget.test.ts (1 hunks)
  • app/client/src/entities/DependencyMap/DependencyMapUtils.ts (5 hunks)
  • app/client/src/entities/DependencyMap/__tests__/index.test.ts (2 hunks)
  • app/client/src/entities/Widget/utils.test.ts (1 hunks)
  • app/client/src/entities/Widget/utils.ts (1 hunks)
  • app/client/src/layoutSystems/common/DSLConversions/fixedToAutoLayout.ts (2 hunks)
  • app/client/src/plugins/Linting/utils/entityParser.ts (1 hunks)
  • app/client/src/sagas/ActionExecution/PluginActionSaga.ts (4 hunks)
  • app/client/src/sagas/EvaluationsSaga.ts (3 hunks)
  • app/client/src/sagas/JSPaneSagas.ts (1 hunks)
  • app/client/src/sagas/PostEvaluationSagas.ts (4 hunks)
  • app/client/src/selectors/editorSelectors.tsx (1 hunks)
  • app/client/src/utils/DynamicBindingUtils.ts (1 hunks)
  • app/client/src/utils/FilterInternalProperties/__tests__/index.test.ts (2 hunks)
  • app/client/src/utils/autocomplete/__tests__/dataTreeTypeDefCreator.test.ts (2 hunks)
  • app/client/src/utils/editor/EditorBindingPaths.ts (1 hunks)
  • app/client/src/utils/helpers.test.ts (1 hunks)
  • app/client/src/widgets/CategorySliderWidget/widget/propertyConfig/contentConfig.ts (1 hunks)
  • app/client/src/widgets/ChartWidget/widget/propertyConfig.ts (1 hunks)
  • app/client/src/widgets/CheckboxGroupWidget/widget/index.tsx (1 hunks)
  • app/client/src/widgets/DropdownWidget/widget/index.tsx (1 hunks)
  • app/client/src/widgets/FilePickerWidgetV2/widget/index.tsx (1 hunks)
  • app/client/src/widgets/FilepickerWidget/widget/index.tsx (1 hunks)
  • app/client/src/widgets/JSONFormWidget/widget/propertyConfig.ts (1 hunks)
  • app/client/src/widgets/JSONFormWidget/widget/propertyConfig/properties/common.ts (1 hunks)
  • app/client/src/widgets/JSONFormWidget/widget/propertyConfig/properties/multiSelect.ts (1 hunks)
  • app/client/src/widgets/JSONFormWidget/widget/propertyConfig/properties/radioGroup.ts (1 hunks)
  • app/client/src/widgets/JSONFormWidget/widget/propertyConfig/properties/select.ts (1 hunks)
  • app/client/src/widgets/ListWidget/widget/propertyConfig.ts (1 hunks)
  • app/client/src/widgets/ListWidgetV2/widget/propertyConfig.ts (1 hunks)
  • app/client/src/widgets/MapChartWidget/widget/index.tsx (1 hunks)
  • app/client/src/widgets/MapWidget/widget/index.tsx (1 hunks)
  • app/client/src/widgets/MenuButtonWidget/widget/propertyConfig/contentConfig.ts (1 hunks)
  • app/client/src/widgets/MetaHOC.tsx (1 hunks)
  • app/client/src/widgets/MultiSelectTreeWidget/widget/index.tsx (1 hunks)
  • app/client/src/widgets/MultiSelectWidget/widget/index.tsx (1 hunks)
  • app/client/src/widgets/MultiSelectWidgetV2/widget/index.tsx (1 hunks)
  • app/client/src/widgets/RadioGroupWidget/widget/index.tsx (1 hunks)
  • app/client/src/widgets/SelectWidget/widget/index.tsx (1 hunks)
  • app/client/src/widgets/SingleSelectTreeWidget/widget/index.tsx (1 hunks)
  • app/client/src/widgets/SwitchGroupWidget/widget/index.tsx (1 hunks)
  • app/client/src/widgets/TableWidget/widget/propertyConfig.ts (1 hunks)
  • app/client/src/widgets/TableWidgetV2/widget/index.tsx (1 hunks)
  • app/client/src/widgets/TableWidgetV2/widget/propertyConfig/PanelConfig/Basic.ts (1 hunks)
  • app/client/src/widgets/TableWidgetV2/widget/propertyConfig/contentConfig.ts (1 hunks)
  • app/client/src/widgets/wds/WDSCheckboxGroupWidget/config/propertyPaneConfig/contentConfig.ts (1 hunks)
  • app/client/src/widgets/wds/WDSMenuButtonWidget/config/propertyPaneConfig/contentConfig.ts (1 hunks)
  • app/client/src/widgets/wds/WDSMultiSelectWidget/config/propertyPaneConfig/contentConfig.tsx (1 hunks)
  • app/client/src/widgets/wds/WDSRadioGroupWidget/config/propertyPaneConfig/contentConfig.ts (1 hunks)
  • app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/contentConfig.tsx (1 hunks)
  • app/client/src/widgets/wds/WDSSwitchGroupWidget/config/propertyPaneConfig/contentConfig.ts (1 hunks)
  • app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/contentConfig.ts (1 hunks)
  • app/client/src/workers/Evaluation/JSObject/JSObject.test.ts (4 hunks)
  • app/client/src/workers/Evaluation/JSObject/utils.ts (3 hunks)
  • app/client/src/workers/Evaluation/__tests__/evaluation.test.ts (15 hunks)
  • app/client/src/workers/Evaluation/__tests__/evaluationSubstitution.test.ts (1 hunks)
  • app/client/src/workers/Evaluation/evalTreeWithChanges.test.ts (13 hunks)
  • app/client/src/workers/Evaluation/evalTreeWithChanges.ts (8 hunks)
  • app/client/src/workers/Evaluation/evaluationSubstitution.ts (1 hunks)
  • app/client/src/workers/Evaluation/handlers/evalTree.ts (7 hunks)
  • app/client/src/workers/Evaluation/handlers/evalTrigger.ts (3 hunks)
  • app/client/src/workers/Evaluation/types.ts (1 hunks)
  • app/client/src/workers/common/DataTreeEvaluator/dataTreeEvaluator.test.ts (15 hunks)
  • app/client/src/workers/common/DataTreeEvaluator/index.ts (24 hunks)
  • app/client/src/workers/common/DataTreeEvaluator/mockData/ArrayAccessorTree.ts (1 hunks)
  • app/client/src/workers/common/DataTreeEvaluator/mockData/NestedArrayAccessorTree.ts (1 hunks)
  • app/client/src/workers/common/DataTreeEvaluator/mockData/mockConfigTree.ts (1 hunks)
  • app/client/src/workers/common/DependencyMap/index.ts (2 hunks)
🧰 Additional context used
🪛 Biome (1.9.4)
app/client/src/utils/DynamicBindingUtils.ts

[error] 248-249: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

app/client/src/sagas/EvaluationsSaga.ts

[error] 239-240: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

app/client/src/sagas/PostEvaluationSagas.ts

[error] 395-395: Avoid redundant double-negation.

It is not necessary to use double-negation when a value will already be coerced to a boolean.
Unsafe fix: Remove redundant double-negation

(lint/complexity/noExtraBooleanCast)


[error] 408-408: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

app/client/src/entities/DependencyMap/DependencyMapUtils.ts

[error] 61-61: Using this in a static context can be confusing.

this refers to the class.
Unsafe fix: Use the class name instead.

(lint/complexity/noThisInStatic)


[error] 223-223: Using this in a static context can be confusing.

this refers to the class.
Unsafe fix: Use the class name instead.

(lint/complexity/noThisInStatic)


[error] 225-225: Using this in a static context can be confusing.

this refers to the class.
Unsafe fix: Use the class name instead.

(lint/complexity/noThisInStatic)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: perform-test / rts-build / build
🔇 Additional comments (119)
app/client/src/constants/EvaluationConstants.ts (1)

1-5: Define centralized EvaluationSubstitutionType enum
Creates a single source of truth for substitution types, removing redundant definitions in ee/entities.

app/client/src/widgets/wds/WDSMultiSelectWidget/config/propertyPaneConfig/contentConfig.tsx (1)

18-18: Update import path for EvaluationSubstitutionType
Switching to the new centralized enum path ensures consistency across widget configs.

app/client/src/widgets/MapChartWidget/widget/index.tsx (1)

5-5: Switch EvaluationSubstitutionType import to constants module
Aligns with the refactor to use a shared constants file for substitution types.

app/client/src/widgets/wds/WDSRadioGroupWidget/config/propertyPaneConfig/contentConfig.ts (1)

8-8: Point import to new EvaluationConstants location
Ensures all widgets import the enum from the same source.

app/client/src/utils/editor/EditorBindingPaths.ts (1)

2-2: Align import of EvaluationSubstitutionType with centralized definition
Replace legacy import to maintain consistency in editor utility paths.

app/client/src/widgets/TableWidgetV2/widget/propertyConfig/PanelConfig/Basic.ts (1)

13-13: Align import to centralized constants
Switch to importing EvaluationSubstitutionType from constants/EvaluationConstants aligns with the project-wide consolidation.

app/client/src/workers/common/DataTreeEvaluator/mockData/mockConfigTree.ts (1)

2-2: Use new constants module for substitution type
Importing EvaluationSubstitutionType from constants/EvaluationConstants keeps mock data in sync with the refactor.

app/client/src/widgets/ChartWidget/widget/propertyConfig.ts (1)

2-2: Standardize import for EvaluationSubstitutionType
This update centralizes the import, matching the refactored constant location.

app/client/src/widgets/SwitchGroupWidget/widget/index.tsx (1)

5-5: Centralize EvaluationSubstitutionType import
Good catch—updating to the new constants path ensures consistency across widgets.

app/client/src/widgets/CategorySliderWidget/widget/propertyConfig/contentConfig.ts (1)

4-4: Update substitution type import location
Switching to constants/EvaluationConstants aligns with the consolidated enum.

app/client/src/widgets/JSONFormWidget/widget/propertyConfig/properties/common.ts (1)

3-3: Import path updated for EvaluationSubstitutionType
Consistent with the centralized enum location.

app/client/src/widgets/MultiSelectWidgetV2/widget/index.tsx (1)

7-7: Import path updated for EvaluationSubstitutionType
Matches the new constants module and aligns with the broader refactor.

app/client/src/components/editorComponents/CodeEditor/EvaluatedValuePopup.tsx (1)

11-11: Import path updated for EvaluationSubstitutionType
Aligns this component with the centralized constants.

app/client/src/widgets/wds/WDSSwitchGroupWidget/config/propertyPaneConfig/contentConfig.ts (1)

2-2: Import path updated for EvaluationSubstitutionType
Ensures consistency with the new enum definition in EvaluationConstants.

app/client/src/entities/DataTree/dataTreeFactory.ts (1)

22-22: Update import for DataTreeSeed type
Switching to the dedicated DataTreeSeed path improves clarity and centralizes the type definition.

app/client/src/utils/helpers.test.ts (1)

3-3: Correct import source for EvaluationSubstitutionType
Updated the import path to the centralized constants/EvaluationConstants module to align with the global refactor.

app/client/src/widgets/wds/WDSMenuButtonWidget/config/propertyPaneConfig/contentConfig.ts (1)

3-3: Updated import for EvaluationSubstitutionType
Switched the import to constants/EvaluationConstants to reflect the new central enum location.

app/client/src/workers/Evaluation/evaluationSubstitution.ts (1)

3-3: Refactored import path for EvaluationSubstitutionType
Adjusted the import to the new constants/EvaluationConstants file as part of the centralized substitution-type migration.

app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/contentConfig.tsx (1)

3-3: Align import with centralized constants
Changed the EvaluationSubstitutionType import to constants/EvaluationConstants to maintain consistency across widgets.

app/client/src/widgets/JSONFormWidget/widget/propertyConfig/properties/multiSelect.ts (1)

1-1: Centralized EvaluationSubstitutionType import
Switched the import path to the shared constants/EvaluationConstants module in line with the broader refactor.

app/client/src/widgets/JSONFormWidget/widget/propertyConfig/properties/radioGroup.ts (1)

3-3: Consistent import path update. The EvaluationSubstitutionType import now correctly references the centralized constants/EvaluationConstants module.

app/client/src/widgets/MenuButtonWidget/widget/propertyConfig/contentConfig.ts (1)

3-3: Centralize import of EvaluationSubstitutionType. Path updated to use constants/EvaluationConstants, aligning with the recent refactor.

app/client/src/plugins/Linting/utils/entityParser.ts (1)

7-7: Update import source for EvaluationSubstitutionType. Aligned to the new constants/EvaluationConstants location for consistency.

app/client/src/widgets/wds/WDSCheckboxGroupWidget/config/propertyPaneConfig/contentConfig.ts (1)

2-2: Align EvaluationSubstitutionType import. Changed to the centralized constants/EvaluationConstants module.

app/client/src/widgets/TableWidgetV2/widget/propertyConfig/contentConfig.ts (1)

7-7: Consistent import refactor for EvaluationSubstitutionType. Now imports from constants/EvaluationConstants as per standardized pattern.

app/client/src/widgets/FilepickerWidget/widget/index.tsx (1)

14-14: Consistent import refactor
Importing EvaluationSubstitutionType from "constants/EvaluationConstants" aligns with the centralized enum location and maintains consistency across the codebase.

app/client/src/widgets/ListWidgetV2/widget/propertyConfig.ts (1)

5-5: Consistent import refactor
Updating the source of EvaluationSubstitutionType to "constants/EvaluationConstants" matches the standardized enum usage in other modules.

app/client/src/widgets/CheckboxGroupWidget/widget/index.tsx (1)

11-11: Consistent import refactor
Switching the EvaluationSubstitutionType import to "constants/EvaluationConstants" keeps the widget in sync with the refactored constant definitions.

app/client/src/widgets/ListWidget/widget/propertyConfig.ts (1)

6-6: Consistent import refactor
Refactoring the import of EvaluationSubstitutionType to the centralized constants file preserves uniformity in evaluation substitution types.

app/client/src/widgets/MultiSelectTreeWidget/widget/index.tsx (1)

9-9: Consistent import refactor
Updating the import path for EvaluationSubstitutionType to "constants/EvaluationConstants" ensures alignment with the global enum source.

app/client/src/entities/Widget/utils.ts (1)

5-5: Unified import path for EvaluationSubstitutionType is correct

The enum is properly centralized in constants/EvaluationConstants, and no functional code changes are introduced.

app/client/src/widgets/RadioGroupWidget/widget/index.tsx (1)

11-11: Centralized EvaluationSubstitutionType import applied

Importing from constants/EvaluationConstants aligns with the global refactor. Downstream usage of EvaluationSubstitutionType.SMART_SUBSTITUTE remains unchanged.

app/client/src/widgets/SelectWidget/widget/index.tsx (1)

6-6: Standardized EvaluationSubstitutionType import

The import update reflects the consolidated EvaluationConstants module, preserving existing evaluation substitution behavior.

app/client/src/widgets/DropdownWidget/widget/index.tsx (1)

15-15: EvaluationSubstitutionType import path refactored

Switching to the centralized constants/EvaluationConstants ensures consistency across widgets. No logic or behavior alterations.

app/client/src/widgets/FilePickerWidgetV2/widget/index.tsx (1)

8-8: Refactored EvaluationSubstitutionType import

Updating the import aligns with the new constants/EvaluationConstants enum. Functionality remains intact as this is purely an import change.

app/client/src/widgets/MapWidget/widget/index.tsx (1)

10-10: Centralize EvaluationSubstitutionType import. Aligns this widget with the new constants/EvaluationConstants enum source.

app/client/src/widgets/SingleSelectTreeWidget/widget/index.tsx (1)

9-9: Consistent import path for EvaluationSubstitutionType. Updated to reference the centralized EvaluationConstants module.

app/client/src/widgets/TableWidget/widget/propertyConfig.ts (1)

4-4: Refactored import of EvaluationSubstitutionType. Now imported from constants/EvaluationConstants to match the consolidated enum location.

app/client/src/constants/PropertyControlConstants.tsx (1)

13-13: Centralize EvaluationSubstitutionType import
Switching the import of EvaluationSubstitutionType to constants/EvaluationConstants aligns with the global refactor and keeps enum definitions in one place.

app/client/src/workers/Evaluation/__tests__/evaluationSubstitution.test.ts (1)

2-2: Update test import for EvaluationSubstitutionType
The test now correctly imports the enum from the consolidated constants/EvaluationConstants module.

app/client/src/widgets/JSONFormWidget/widget/propertyConfig/properties/select.ts (1)

8-8: Align import path for EvaluationSubstitutionType
Importing EvaluationSubstitutionType from the new constants file maintains consistency across widget configs.

app/client/src/widgets/wds/WDSTableWidget/config/propertyPaneConfig/contentConfig.ts (1)

3-3: Standardize EvaluationSubstitutionType import
The import source update ensures the table widget uses the centralized enum definition.

app/client/src/widgets/JSONFormWidget/widget/propertyConfig.ts (1)

6-6: Correct import for EvaluationSubstitutionType
Import path updated to the shared EvaluationConstants, matching other property configs.

app/client/src/widgets/MultiSelectWidget/widget/index.tsx (1)

20-20: LGTM - Clean import refactoring

The centralization of EvaluationSubstitutionType to constants/EvaluationConstants improves code organization and consistency.

app/client/src/components/formControls/DynamicTextFieldControl.tsx (1)

23-23: LGTM - Consistent with refactoring pattern

Good adherence to the centralized constants approach.

app/client/src/entities/Widget/utils.test.ts (1)

8-8: LGTM - Test consistency maintained

Proper extension of the refactoring to test files ensures consistency across the codebase.

app/client/src/workers/common/DataTreeEvaluator/mockData/ArrayAccessorTree.ts (1)

10-11: LGTM - Selective import migration

Well-executed selective refactoring that only moves the target enum while preserving other imports in their appropriate locations.

app/client/src/sagas/JSPaneSagas.ts (1)

653-653: LGTM - Valuable analytics enhancement

Adding runBehaviour tracking provides useful insights into JS function execution patterns and aligns well with the reactive query improvements.

app/client/src/widgets/MetaHOC.tsx (1)

94-94: Good performance optimization with early exit.

This guard clause efficiently prevents unnecessary processing when there are no batch actions to execute, improving performance in the reactive flow.

app/client/src/ee/entities/DataTree/types/DataTreeSeed.ts (1)

1-1: Standard EE/CE re-export pattern.

Clean implementation of the enterprise edition passthrough export structure.

app/client/src/entities/Action/actionProperties.ts (2)

3-3: Import consolidation to evaluation constants.

Good refactoring to centralize evaluation constants in a dedicated file.


51-51: Added reactive path tracking for run behavior.

This addition supports the enhanced reactive flow by tracking the "run" property for template evaluation, aligning with the PR's objective to execute reactive queries without manual refresh.

app/client/src/ce/utils/actionExecutionUtils.ts (1)

75-75: Enhanced analytics with run behavior tracking.

Good addition to capture run behavior in analytics data, supporting better insights into reactive vs manual action execution patterns.

app/client/src/workers/Evaluation/types.ts (1)

74-74: Essential type definition for reactive action execution.

This property enables the evaluation system to communicate which reactive actions need execution, directly supporting the PR's core objective of automatic reactive query execution.

app/client/src/ce/workers/Evaluation/evaluationUtils.test.ts (1)

47-47: Import path refactor looks good.

The centralization of EvaluationSubstitutionType to the constants module improves maintainability and follows good architectural practices.

app/client/src/workers/common/DataTreeEvaluator/mockData/NestedArrayAccessorTree.ts (1)

11-11: Consistent import refactor applied correctly.

The import path change aligns with the codebase-wide centralization effort and maintains the integrity of the mock data.

app/client/src/components/editorComponents/CodeEditor/index.tsx (1)

164-164: LGTM! Import refactoring aligns with centralization best practices.

The consolidation of EvaluationSubstitutionType into a shared constants module improves maintainability and follows good architectural patterns.

app/client/src/ce/sagas/index.tsx (2)

55-55: Good integration of new reactive query functionality.

The import follows the established pattern for saga organization.


117-117: ```shell
#!/bin/bash

Verify import path and saga registration in the root saga file

rg "import.*PostEvaluationSagas" -n app/client/src/ce/sagas/index.tsx

Display lines around the registration of PostEvaluationSagas

sed -n '100,130p' app/client/src/ce/sagas/index.tsx


</details>
<details>
<summary>app/client/src/ee/sagas/moduleInstanceSagaUtils.ts (1)</summary>

`1-1`: Let's re-verify the CE file location with `find`, since the previous `fd` flags were invalid:


```shell
#!/bin/bash
# Search for the CE moduleInstanceSagaUtils file
find . -type f -path "*/ce/sagas/moduleInstanceSagaUtils.ts"
app/client/src/utils/FilterInternalProperties/__tests__/index.test.ts (1)

11-11: Consistent with codebase-wide import refactoring.

The test maintains functionality while using the centralized type definition.

app/client/src/entities/DataTree/dataTreeWidget.test.ts (1)

11-11: Final piece of the systematic import refactoring.

Maintains test integrity while using the centralized type definition, completing the consistent pattern across the codebase.

app/client/src/utils/autocomplete/__tests__/dataTreeTypeDefCreator.test.ts (1)

15-15: LGTM - Clean import refactor

The centralization of EvaluationSubstitutionType to a dedicated constants module improves code organization.

app/client/src/ce/constants/ReduxActionConstants.tsx (1)

621-622: LGTM - New action constants for reactive flow

These action constants properly support the reactive query execution feature described in the PR objectives. The naming follows established conventions.

app/client/src/ce/entities/DataTree/dataTreeJSAction.test.ts (3)

153-153: LGTM - Test updated for runBehaviour metadata

The addition of runBehaviour: "MANUAL" aligns with the new reactive query execution system.

Also applies to: 158-158


189-196: LGTM - Test updated for dynamic trigger paths

The dynamicTriggerPathList addition properly reflects the new reactive trigger tracking functionality.


200-200: LGTM - Test updated for reactive data paths

The addition of reactive paths for function data ("myFun1.data", "myFun2.data") supports the new reactive evaluation system.

Also applies to: 202-202

app/client/src/workers/Evaluation/handlers/evalTrigger.ts (2)

24-24: LGTM - Evaluation tree cloning for reactive comparison

The deep clone using klona provides a snapshot of the previous evaluation state, enabling proper change detection in the reactive system.


40-40: LGTM - Passing cloned tree for evaluation

The old evaluation tree is correctly passed to enable comparison-based evaluation in the reactive flow.

app/client/src/entities/Action/actionProperties.test.ts (2)

4-4: LGTM: Import standardization

Good practice consolidating the import source for EvaluationSubstitutionType.


43-43: LGTM: Consistent test updates for new reactive paths

The addition of run to expected reactive paths is consistently applied across all test cases, which aligns with the PR objective of supporting newly bound reactive queries.

Also applies to: 97-97, 167-167, 227-227, 289-289, 305-305

app/client/src/workers/Evaluation/JSObject/utils.ts (2)

10-10: LGTM: Import standardization and new dependency

Good practice consolidating imports and adding the necessary ActionRunBehaviour import for the new functionality.

Also applies to: 28-28


98-101: LGTM: Proper runBehaviour property handling

The logic correctly preserves existing runBehaviour values while providing a sensible default of MANUAL for new actions.

app/client/src/workers/Evaluation/evalTreeWithChanges.test.ts (2)

133-133: LGTM: Test parameter updates for new function signatures

Correctly adapting test calls to match updated function signatures that now accept an additional oldEvalTree parameter.

Also applies to: 229-229, 264-264, 304-304, 345-345, 379-379, 423-423, 469-469, 500-500, 532-532, 571-571


240-240: LGTM: Response structure update

Adding executeReactiveActions: [] to the expected response structure aligns with the new reactive query execution functionality.

app/client/src/ce/workers/common/DependencyMap/utils/getEntityDependenciesByType.ts (1)

135-143: LGTM: JS function data dependency mapping

Excellent addition of explicit dependencies from function .data properties to their parent functions. The existence check ensures defensive programming and supports the reactive evaluation system.

app/client/src/selectors/editorSelectors.tsx (1)

133-144: LGTM: Well-structured execution status selector

Properly implemented memoized selector that flattens on-load actions and combines them with execution status. The data structure with id and isExecuted properties is clean and useful for tracking reactive query execution.

app/client/src/workers/common/DependencyMap/index.ts (1)

392-392: Parameter addition looks correct.

Adding configTree to the sortDependencies call aligns with the enhanced dependency sorting functionality mentioned in the summary. This supports the reactive dependency detection improvements.

app/client/src/widgets/TableWidgetV2/widget/index.tsx (1)

990-994: LGTM! Deep equality check aligns with reactive flow improvements.

The change from reference inequality to deep equality using fast-deep-equal is appropriate for detecting actual content changes in tableData. This ensures reactive updates trigger correctly when table data content changes, even if the reference remains the same.

Note: Deep equality checks have higher computational cost than reference checks, but this is likely necessary for the enhanced reactive behavior described in the PR objectives.

app/client/src/ce/sagas/ActionExecution/ActionExecutionSagas.ts (1)

158-164: Improved error handling for invalid dynamic strings.

The change from throwing an error to logging a warning and returning early is a more graceful approach to handling invalid dynamicString values. This prevents execution flow disruption while still providing visibility into the issue through logging.

The validation logic correctly handles both falsy values and type mismatches, which enhances the robustness of the action execution system.

app/client/src/workers/Evaluation/JSObject/JSObject.test.ts (4)

12-12: Import addition looks good

Adding the ActionRunBehaviour import to support the new test data structure.


99-106: Good test data enhancement

Adding dynamicTriggerPathList to the test configuration aligns with the new reactive action tracking features.


182-188: Appropriate metadata additions

The runBehaviour properties ensure tests reflect the enhanced JS action metadata structure.


228-235: Test data consistency maintained

The dynamicTriggerPathList addition to unEvalDataTree keeps test data consistent with the evaluation framework changes.

app/client/src/sagas/ActionExecution/PluginActionSaga.ts (4)

873-873: Good defensive programming

Adding optional chaining prevents potential runtime errors when plugin is undefined.


967-967: Analytics enhancement approved

Including runBehaviour in analytics provides valuable insights into action execution patterns.


1129-1129: Consistent analytics improvement

Adding runBehaviour to page load action analytics maintains consistency with the overall analytics strategy.


1167-1170: Redux integration looks solid

Dispatching SET_ONLOAD_ACTION_EXECUTED enables downstream reactive query execution tracking. The payload structure is appropriate.

app/client/src/workers/Evaluation/handlers/evalTree.ts (5)

36-36: Appropriate cloning utility import

Using klona/json for deep cloning is a good choice for performance and reliability.


71-71: Clean initialization

Initializing executeReactiveActions as an empty array provides a clear starting point for tracking.


140-140: Consistent reactive action tracking

The assignment pattern across different evaluation paths ensures executeReactiveActions is captured from all evaluation scenarios.

Also applies to: 193-193, 256-256


197-197: Smart state preservation approach

Deep cloning the current tree before updates enables proper comparison for detecting reactive actions. Passing oldDataTree to evalAndValidateSubTree is the correct approach.

Also applies to: 246-246


366-366: Complete data flow integration

Including executeReactiveActions in the response enables downstream saga processing for reactive query execution.

app/client/src/layoutSystems/common/DSLConversions/fixedToAutoLayout.ts (1)

812-813: Good type safety improvement.

The change from generic type to specific DSLWidget type is appropriate since this function is only used with DSLWidget objects. This improves type safety and removes unnecessary generic complexity.

app/client/src/sagas/EvaluationsSaga.ts (2)

150-150: LGTM on parameter extraction.

The addition of executeReactiveActions to the destructuring follows the existing pattern and is properly typed.


163-167: Feature flag pattern looks good.

The feature flag selection and usage follows established patterns in the codebase.

app/client/src/workers/Evaluation/__tests__/evaluation.test.ts (3)

19-20: Good import reorganization.

Moving EvaluationSubstitutionType to constants/EvaluationConstants and importing ActionRunBehaviour from the appropriate types file improves code organization.


301-302: Appropriate test data updates.

The addition of dynamicTriggerPathList and runBehaviour properties with sensible defaults aligns with the new reactive action metadata requirements.


636-637: Correct test updates for new method signature.

The addition of empty array and evaluator.evalTree parameters to evalAndValidateSubTree calls properly reflects the updated method signature for reactive action support.

Also applies to: 676-677, 724-725, 789-790, 834-835, 900-901, 973-974, 1009-1010, 1052-1053, 1096-1097, 1137-1138

app/client/src/ce/sagas/moduleInstanceSagaUtils.ts (1)

6-12: Well-defined interface.

The ParamsForJSModuleInstance interface provides clear typing for the module instance execution parameters.

app/client/src/entities/DependencyMap/__tests__/index.test.ts (2)

2746-2746: Test expectation updated to reflect new dependency behavior.

The test now expects apiData to have undefined dependencies instead of being linked to apiData.data. This aligns with the PR's changes to exclude .data paths from automatic parent-child dependency creation.


2816-2817: Test expectations correctly updated for new dependency logic.

The test now expects:

  • addDependency to be called 0 times (previously expected to be called)
  • Direct dependencies of "apiData" to be empty

This reflects the refined dependency model where certain .data path dependencies are no longer automatically created.

app/client/src/ce/entities/DataTree/dataTreeJSAction.ts (3)

3-3: LGTM: Import path centralization

Good refactoring to centralize EvaluationSubstitutionType in constants/EvaluationConstants.


22-22: LGTM: Reactive paths implementation

Proper implementation of reactive paths for JS actions. The merge with binding paths maintains backward compatibility while enabling reactive execution.

Also applies to: 74-76, 94-94


54-54: LGTM: Dynamic trigger paths and run behavior tracking

Correct implementation of dynamic trigger path tracking and run behavior preservation for JS actions. This properly supports the reactive query execution flow.

Also applies to: 63-63, 73-73, 99-99

app/client/src/ce/entities/DataTree/dataTreeAction.ts (2)

12-12: LGTM: Consistent import path centralization

Same improvement as in the previous file for centralizing evaluation constants.


77-81: LGTM: Dependency and trigger path setup

Correct implementation of dependency mapping and dynamic trigger paths for actions. The "run" dependency including all dynamic binding paths properly supports reactive execution.

Also applies to: 112-113

app/client/src/workers/common/DataTreeEvaluator/dataTreeEvaluator.test.ts (3)

27-27: LGTM: Test updates for new evaluation signature

Consistent import path change and correct parameter updates for the enhanced evaluation method signature.

Also applies to: 307-309


484-489: LGTM: Updated dependency assertions for refined logic

Correct updates to dependency expectations that align with the new reactive dependency handling logic.

Also applies to: 509-515, 582-588


799-805: LGTM: JS action metadata test updates

Proper test data updates that include the new runBehaviour and dynamicTriggerPathList properties with appropriate values.

Also applies to: 846-853, 861-867, 908-915

app/client/src/ce/entities/DataTree/types.ts (1)

13-14: LGTM: Consistent interface updates for reactive functionality

Proper addition of dynamicTriggerPathList and runBehaviour properties across all relevant interfaces. The type imports are appropriate and consistent.

Also applies to: 63-65, 72-72, 90-90

app/client/src/ce/reducers/uiReducers/editorReducer.tsx (3)

42-42: LGTM!

The initialization of onLoadActionExecution as an empty object is appropriate.


333-344: LGTM!

The handler correctly updates the execution status for individual actions.


134-136: ```bash
#!/bin/bash
rg "SavePageResponse" -n .


</details>
<details>
<summary>app/client/src/ce/workers/Evaluation/evaluationUtils.ts (1)</summary>

`1148-1157`: **Move visited set initialization to avoid shared state.**

The default `visited` parameter could be shared between calls if the function is called multiple times. Consider initializing it within the function or in a wrapper.

```diff
 export function getExternalChangedDependencies(
   property: string,
   dependencies: Record<string, string[]>,
   valuechanged: Record<string, boolean>,
   entityName: string,
-  visited = new Set<string>(),
+  visited?: Set<string>,
 ): boolean {
+  if (!visited) {
+    visited = new Set<string>();
+  }
   if (visited.has(property)) return false;

Likely an incorrect or invalid review comment.

app/client/src/workers/common/DataTreeEvaluator/index.ts (4)

158-158: Import source change looks good

The import of EvaluationSubstitutionType has been moved to a more appropriate location in the constants directory.


345-349: Good addition of configTree parameter to sortDependencies

The optional configTree parameter enables better dependency sorting with additional context. The implementation correctly passes it to DependencyMapUtils.sortDependencies.

Also applies to: 1575-1580


1459-1487: Good optimization for JS variable evaluation

The logic correctly avoids re-evaluating JS variables when their uneval value hasn't changed. This is a good performance optimization.


785-796: Potential issue with overly broad .data path filtering

The current logic filters out any path ending with .data, which could inadvertently exclude legitimate properties that happen to end with this suffix.

Consider using the isDataPath utility more precisely:

-        pathsToSkipFromEval = pathsToSkipFromEval.filter((path) => {
-          if (!path.endsWith(".data")) return true;
-
-          const { entityName } = getEntityNameAndPropertyPath(path);
-          const entity = unEvalTree[entityName];
-
-          if (entity && isDataPath(entity, path)) {
-            return false; // filter out
-          }
-
-          return true; // keep for other entity types
-        });
+        pathsToSkipFromEval = pathsToSkipFromEval.filter((path) => {
+          const { entityName } = getEntityNameAndPropertyPath(path);
+          const entity = unEvalTree[entityName];
+          
+          // Only filter out if it's specifically a data path for the entity
+          return !(entity && isDataPath(entity, path));
+        });

Likely an incorrect or invalid review comment.

@ankitakinger ankitakinger changed the base branch from release to feat/reactive-actions June 20, 2025 20:16
@ankitakinger ankitakinger removed request for a team and jacquesikot June 20, 2025 20:17
@ankitakinger ankitakinger merged commit dad8877 into feat/reactive-actions Jun 23, 2025
147 of 149 checks passed
@ankitakinger ankitakinger deleted the fix/update-dependency-map branch June 23, 2025 07:56
@ankitakinger ankitakinger self-assigned this Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working ok-to-test Required label for CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants