Skip to content

Conversation

ankitakinger
Copy link
Contributor

@ankitakinger ankitakinger commented Apr 30, 2025

Description

Fixing remaining 4 failing cypress test cases

Fixes #39833

Automation

/ok-to-test tags="@tag.ImportExport, @tag.JS"

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/14760268599
Commit: 8d4c84c
Cypress dashboard.
Tags: @tag.ImportExport, @tag.JS
Spec:


Wed, 30 Apr 2025 18:02:13 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Introduced a new "Run behavior" setting for actions, allowing users to select between running actions automatically on page load or manually via a dropdown, replacing the previous on/off switch.
    • Enhanced dropdowns with descriptive labels and subtexts for run behavior options across the UI.
  • Improvements

    • Updated all relevant settings, forms, plugin configurations, and APIs to use the new "Run behavior" dropdown for APIs, queries, and JS functions.
    • Improved clarity and flexibility in action execution settings with explicit run behavior modes.
    • Synchronized backend and frontend handling of run behavior for consistent user experience.
  • Bug Fixes

    • Updated tests and internal logic to ensure correct handling, filtering, and persistence of the new run behavior property.
  • Documentation

    • Updated labels, help texts, and UI controls to reflect the new run behavior terminology.
  • Chores

    • Refactored and cleaned up code by replacing deprecated properties, updating method signatures, and consolidating type definitions for consistency.
    • Removed deprecated API endpoints and introduced new endpoints supporting run behavior settings.

@ankitakinger ankitakinger added the ok-to-test Required label for CI label Apr 30, 2025
Copy link
Contributor

coderabbitai bot commented Apr 30, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • pg
  • release

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This change migrates the action execution trigger property from a boolean executeOnLoad to a string-based runBehavior across the codebase. It introduces a new enum for run behavior on both frontend and backend, updates all relevant TypeScript and Java interfaces, and modifies UI controls from switches to dropdowns reflecting the new options. Cypress tests, Redux actions, reducers, sagas, API endpoints, and plugin settings are refactored to use the new property and control. Backward compatibility is maintained by synchronizing runBehavior and the deprecated executeOnLoad during transitions. Extensive test and fixture updates ensure the new property is correctly referenced throughout.

Changes

Files/Groups Change Summary
Cypress E2E/Support/Fixtures/Tests (app/client/cypress/...) All test code and fixtures update references and UI interactions from executeOnLoad (boolean) to runBehavior (string: "On page load"/"Manual"), including method signatures, test data, and assertions.
TypeScript Entities, Types, Constants (app/client/src/entities, types, constants) Replaces executeOnLoad: boolean with runBehavior: ActionRunBehaviourType in all action/JS action types and interfaces. Adds new enums and constants for run behavior. Removes deprecated local navigation types in favor of centralized definitions. Updates Redux action types and messages accordingly.
Redux Actions, Reducers, Sagas (app/client/src/actions, reducers, sagas) Refactors all Redux logic to handle runBehavior instead of executeOnLoad, including action creators, reducers, and sagas. Updates payloads, action types, and saga watchers.
API Layer (app/client/src/api/ActionAPI.tsx, PageApi.tsx) Updates API methods and endpoints to use runBehavior in payloads and URLs. Refactors method names and parameter types.
UI Components & Controls (app/client/src/components, JSEditorToolbar, formControls) Switches UI for run behavior from boolean switches to dropdowns with descriptive options and subtexts. Updates props, state, and event handling to work with the new property.
Plugin Settings & JSON Config (app/server/appsmith-plugins/.../setting.json) Changes plugin query/API run configuration from a boolean switch (executeOnLoad) to a dropdown (runBehavior), with options for "On page load" and "Manual".
Java Backend Models & Services (app/server/appsmith-interfaces, appsmith-server/...) Introduces RunBehaviorEnum, adds runBehavior property to action DTOs, marks executeOnLoad as deprecated, and ensures both properties are synchronized for backward compatibility. Adds/updates endpoints and service methods to handle the new property.
Tests & Fixtures (Java & TypeScript) Updates all test data, factories, and assertions to use runBehavior instead of executeOnLoad. Adds new backend tests to verify correct synchronization and persistence of both properties.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UI (Dropdown)
    participant Redux Saga
    participant API Layer
    participant Backend Controller
    participant Backend Service
    participant Database

    User->>UI (Dropdown): Selects run behavior ("On page load"/"Manual")
    UI (Dropdown)->>Redux Saga: Dispatches SET_ACTION_RUN_BEHAVIOR with runBehavior
    Redux Saga->>API Layer: Calls updateActionRunBehavior(actionId, runBehavior)
    API Layer->>Backend Controller: PUT /runBehavior/{actionId} { behavior: runBehavior }
    Backend Controller->>Backend Service: setRunBehavior(actionId, runBehavior)
    Backend Service->>Database: Update action.runBehavior & sync executeOnLoad
    Database-->>Backend Service: Persisted action
    Backend Service-->>Backend Controller: Updated action DTO
    Backend Controller-->>API Layer: Response with updated action
    API Layer-->>Redux Saga: Returns updated action
    Redux Saga-->>UI (Dropdown): Update state/UI with new run behavior
Loading

Assessment against linked issues

Objective Addressed Explanation
Fix all Cypress/unit tests to reference runBehavior instead of executeOnLoad (#39833)

Possibly related PRs

Suggested reviewers

  • AmanAgarwal041
  • hetunandu

Poem

Dropdowns now dance where switches once stood,
"On page load" or "Manual"—choose as you would.
Tests and reducers, all joined in the fray,
To banish old booleans, bring enums to play.
From backend to frontend, the change ripples through—
Run behavior’s the future, and toggles are through!
🚦✨


🪧 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 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.

@github-actions github-actions bot added Core Query Execution Issues related to the execution of all queries IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product Integrations Product Issues related to a specific integration potential-duplicate This label marks issues that are potential duplicates of already open issues Query Settings Issues related to the settings of all queries Query Widgets & IDE Pod All issues related to Query, JS, Eval, Widgets & IDE Task A simple Todo skip-changelog Adding this label to a PR prevents it from being listed in the changelog CI labels Apr 30, 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: 0

🔭 Outside diff range comments (4)
app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts (1)

152-152: ⚠️ Potential issue

Remove use of agHelper.Sleep() per coding guidelines.

The coding guidelines specifically prohibit the use of agHelper.Sleep() in Cypress tests. Use Cypress's built-in waiting mechanisms or explicit assertions instead.

- agHelper.Sleep();
+ // Properly wait for any UI changes or use explicit assertions
+ agHelper.WaitUntilAllToastsDisappear();
app/client/cypress/e2e/Regression/ServerSide/Params/PassingParams_Spec.ts (1)

92-92: 🛠️ Refactor suggestion

Replace agHelper.Sleep() with proper waiting mechanisms.

Multiple instances of agHelper.Sleep() throughout the file violate the Cypress best practices outlined in the coding guidelines. Replace with element visibility or network request assertions.

-agHelper.Sleep(500);
+cy.waitUntil(() => EditorNavigation.GetEntityState("ParamsTest", EntityType.Query) === "ACTIVE", {
+  errorMsg: "Query did not become active in time",
+  timeout: 10000,
+  interval: 500
+});

Also applies to: 108-108, 124-124, 140-140, 156-156, 172-172, 188-188, 204-204, 220-220, 240-240

app/client/cypress/e2e/Regression/ClientSide/PublishedApps/PublishedModeToastToggle_Spec.ts (1)

94-94: 🛠️ Refactor suggestion

Remove explicit sleep call.

Using agHelper.Sleep(2000) violates the Cypress best practices outlined in the coding guidelines. Replace with a proper waiting mechanism based on UI state.

-_.agHelper.Sleep(2000);
+_.agHelper.WaitUntilToastDisappear();
app/client/cypress/e2e/Regression/ClientSide/SetProperty/SetOptions_Spec.ts (1)

372-372: ⚠️ Potential issue

Remove agHelper.Sleep() call.

The codebase guidelines specify to avoid using agHelper.Sleep(). Consider replacing this with a more deterministic wait mechanism.

-      agHelper.Sleep(); //settimeout timer, hence sleep needed here!
+      agHelper.WaitForCondition(
+        agHelper
+          .GetElement(
+            locators._widgetInDeployed(draggableWidgets.INPUT_V2) +
+              " " +
+              locators._input,
+          )
+          .then(($ele) => {
+            return cy.wrap($ele).should("include.value", "local label");
+          }),
+      );
🧹 Nitpick comments (12)
app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/APIOnLoad_Spec.ts (1)

71-83: Consider using better test cleanup practices.

The after block usage conflicts with the coding guidelines. Consider moving cleanup logic to a reusable helper function that could be called conditionally within each test using cy.then().

-after(() => {
-  PageLeftPane.switchSegment(PagePaneSegment.Queries);
-  entityExplorer.ActionContextMenuByEntityName({
-    entityNameinLeftSidebar: "PageLoadApi",
-    action: "Delete",
-    entityType: entityItems.Api,
-  });
-  entityExplorer.ActionContextMenuByEntityName({
-    entityNameinLeftSidebar: "PageLoadApi2",
-    action: "Delete",
-    entityType: entityItems.Api,
-  });
-});

Create a helper function instead:

function cleanupTestApis() {
  PageLeftPane.switchSegment(PagePaneSegment.Queries);
  entityExplorer.ActionContextMenuByEntityName({
    entityNameinLeftSidebar: "PageLoadApi",
    action: "Delete",
    entityType: entityItems.Api,
  });
  entityExplorer.ActionContextMenuByEntityName({
    entityNameinLeftSidebar: "PageLoadApi2",
    action: "Delete",
    entityType: entityItems.Api,
  });
}

// Then call at the end of the last test
it("2. Shows when API failed to load on page load.", function () {
  // test logic...
  cy.then(() => {
    cleanupTestApis();
  });
});
app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/LayoutActionServiceCE.java (1)

21-21: Good addition of setRunBehavior method.

The new method properly complements the existing setExecuteOnLoad method, supporting the transition to the more flexible run behavior model.

Consider adding Javadoc to document the method's purpose and parameters.

+    /**
+     * Sets the run behavior for an action
+     * @param id The action ID
+     * @param behavior The run behavior to set
+     * @return Updated ActionDTO
+     */
     Mono<ActionDTO> setRunBehavior(String id, RunBehaviorEnum behavior);
app/client/test/factories/Actions/JSObject.ts (2)

33-33: Consider using enum value instead of string literal

Using string literals for runBehavior might lead to inconsistencies. Consider importing and using the ActionRunBehaviour enum for better type safety and consistency with other files.

+import { ActionRunBehaviour } from "PluginActionEditor/types/PluginActionTypes";

-      runBehavior: "MANUAL",
+      runBehavior: ActionRunBehaviour.MANUAL,

73-73: Same string literal usage here

Same issue as with the first action object - using string literals instead of the enum value.

-      runBehavior: "MANUAL",
+      runBehavior: ActionRunBehaviour.MANUAL,
app/client/src/ce/sagas/PageSagas.tsx (2)

543-543: Replace direct hasOwnProperty call with Object.hasOwn().

Using hasOwnProperty method directly on objects can be problematic if the object has a property with the same name or if it's null/undefined.

- if (d.hasOwnProperty("collectionId"))
+ if (Object.hasOwn(d, "collectionId"))
🧰 Tools
🪛 Biome (1.9.4)

[error] 543-543: Do not access Object.prototype method 'hasOwnProperty' from target object.

It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.

(lint/suspicious/noPrototypeBuiltins)


546-547: Consider using optional chaining and update dispatch to use runBehavior.

The action dispatch properly uses the new runBehavior pattern, but we could improve the null safety with optional chaining.

- if (jsActions && jsActions.length) {
+ if (jsActions?.length) {
  yield put(setJSActionsRunBehavior(jsActions));
}
🧰 Tools
🪛 Biome (1.9.4)

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

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

app/client/src/PluginActionEditor/types/PluginActionTypes.ts (2)

5-8: Define ActionRunBehaviour enum.

The enum with "ON_PAGE_LOAD" and "MANUAL" values encapsulates possible behaviors. Consider aligning spelling with American English (e.g., ActionRunBehavior) to match runBehavior property naming.


10-23: Map enum to UI metadata.

The RUN_BEHAVIOR object cleanly pairs labels and subtexts with enum values. The children fields duplicate label—you may remove them if not consumed by your dropdown component.

app/server/appsmith-server/src/test/java/com/appsmith/server/services/LayoutActionServiceTest.java (1)

1404-1441: Comprehensive test for backward compatibility.

This test ensures that the legacy executeOnLoad property properly updates the new runBehavior property, validating the backward compatibility mechanism.

One minor stylistic note: Consider using the conventional JUnit assertion order of assertEquals(expected, actual) rather than assertEquals(actual, expected) for consistency with standard practices, though this doesn't affect test functionality.

app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts (3)

10092-10109: Duplicated dropdown configuration

This dropdown configuration is identical to the previous one. Consider refactoring to use a shared configuration object to avoid duplication.

+ // Define a shared configuration object for run behavior dropdown
+ const runBehaviorConfig = {
+   label: "Run behavior",
+   configProperty: "runBehavior",
+   controlType: "DROP_DOWN",
+   initialValue: "MANUAL",
+   options: [
+     {
+       label: "On page load",
+       subText: "Query runs when the page loads or when manually triggered",
+       value: "ON_PAGE_LOAD",
+     },
+     {
+       label: "Manual",
+       subText: "Query only runs when called in an event or JS with .run()",
+       value: "MANUAL",
+     },
+   ],
+ };

// Then use it in each configuration section
{
  children: [
-   {
-     label: "Run behavior",
-     configProperty: "runBehavior",
-     controlType: "DROP_DOWN",
-     initialValue: "MANUAL",
-     options: [
-       {
-         label: "On page load",
-         subText: "Query runs when the page loads or when manually triggered",
-         value: "ON_PAGE_LOAD",
-       },
-       {
-         label: "Manual",
-         subText: "Query only runs when called in an event or JS with .run()",
-         value: "MANUAL",
-       },
-     ],
-   },
+   {...runBehaviorConfig},
    // Other controls
  ]
}

10143-10160: Repeated dropdown configuration for API components

This is the third instance of the same dropdown configuration. Consider using a shared configuration object as suggested earlier.


10223-10240: Final instance of duplicated dropdown configuration

This is the fourth instance of the same dropdown configuration. Using a shared configuration object would reduce maintenance burden and ensure consistency.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between bb5a202 and 78dbee4.

📒 Files selected for processing (93)
  • app/client/cypress/e2e/Regression/ClientSide/ActionExecution/FrameworkFunctions_ShowCloseModalFunctions_spec.ts (1 hunks)
  • app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug14987_spec.js (1 hunks)
  • app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug20275_Spec.js (1 hunks)
  • app/client/cypress/e2e/Regression/ClientSide/JSObject/JSObject_Tests_spec.ts (1 hunks)
  • app/client/cypress/e2e/Regression/ClientSide/PublishedApps/PublishedModeToastToggle_Spec.ts (1 hunks)
  • app/client/cypress/e2e/Regression/ClientSide/SetProperty/SetOptions_Spec.ts (4 hunks)
  • app/client/cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters2_spec.ts (2 hunks)
  • app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts (1 hunks)
  • app/client/cypress/e2e/Regression/ServerSide/Datasources/Oracle_Spec.ts (1 hunks)
  • app/client/cypress/e2e/Regression/ServerSide/Datasources/Snowflake_Basic_Spec.ts (1 hunks)
  • app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/JSFunctionExecution_spec.ts (6 hunks)
  • app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/SetTimeout_spec.ts (1 hunks)
  • app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/APIOnLoad_Spec.ts (1 hunks)
  • app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad2_Spec.ts (1 hunks)
  • app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad4_Spec.ts (1 hunks)
  • app/client/cypress/e2e/Regression/ServerSide/Params/PassingParams_Spec.ts (1 hunks)
  • app/client/cypress/fixtures/PartialImportExport/PartialImportExportSampleApp.json (6 hunks)
  • app/client/cypress/fixtures/PartialImportExport/QueriesExportedOnly.json (1 hunks)
  • app/client/cypress/support/Pages/ApiPage.ts (3 hunks)
  • app/client/cypress/support/Pages/JSEditor.ts (3 hunks)
  • app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx (1 hunks)
  • app/client/src/PluginActionEditor/constants/PluginActionConstants.ts (0 hunks)
  • app/client/src/PluginActionEditor/transformers/RestActionTransformers.test.ts (1 hunks)
  • app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1 hunks)
  • app/client/src/actions/pluginActionActions.ts (2 hunks)
  • app/client/src/api/ActionAPI.tsx (2 hunks)
  • app/client/src/api/PageApi.tsx (2 hunks)
  • app/client/src/ce/components/editorComponents/GPT/index.tsx (1 hunks)
  • app/client/src/ce/constants/ReduxActionConstants.tsx (4 hunks)
  • app/client/src/ce/constants/messages.ts (1 hunks)
  • app/client/src/ce/entities/DataTree/dataTreeJSAction.test.ts (4 hunks)
  • app/client/src/ce/reducers/entityReducers/actionsReducer.tsx (3 hunks)
  • app/client/src/ce/reducers/entityReducers/jsActionsReducer.tsx (4 hunks)
  • app/client/src/ce/sagas/PageSagas.tsx (2 hunks)
  • app/client/src/ce/utils/autocomplete/EntityDefinitions.test.ts (2 hunks)
  • app/client/src/ce/utils/moduleInstanceNavigationData.ts (1 hunks)
  • app/client/src/components/editorComponents/CodeEditor/EditorConfig.ts (1 hunks)
  • app/client/src/components/editorComponents/CodeEditor/MarkHelpers/entityMarker.ts (1 hunks)
  • app/client/src/components/editorComponents/CodeEditor/commandsHelper.ts (1 hunks)
  • app/client/src/components/editorComponents/CodeEditor/generateQuickCommands.tsx (1 hunks)
  • app/client/src/components/editorComponents/CodeEditor/index.tsx (1 hunks)
  • app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts (10 hunks)
  • app/client/src/components/editorComponents/utils.test.ts (2 hunks)
  • app/client/src/components/formControls/DropDownControl.tsx (4 hunks)
  • app/client/src/components/formControls/utils.ts (1 hunks)
  • app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts (1 hunks)
  • app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts (1 hunks)
  • app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts (1 hunks)
  • app/client/src/entities/Action/actionProperties.test.ts (1 hunks)
  • app/client/src/entities/Action/index.ts (2 hunks)
  • app/client/src/entities/DataTree/dataTreeTypes.ts (2 hunks)
  • app/client/src/pages/Editor/EntityNavigation/JSObjectsPane/index.ts (1 hunks)
  • app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.test.tsx (5 hunks)
  • app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx (3 hunks)
  • app/client/src/pages/Editor/JSEditor/JSEditorToolbar/types.ts (1 hunks)
  • app/client/src/pages/Editor/JSEditor/utils.test.ts (2 hunks)
  • app/client/src/pages/Editor/SaaSEditor/__data__/FinalState.json (8 hunks)
  • app/client/src/pages/Editor/SaaSEditor/__data__/InitialState.json (8 hunks)
  • app/client/src/sagas/ActionExecution/PluginActionSaga.ts (2 hunks)
  • app/client/src/sagas/ActionSagas.ts (4 hunks)
  • app/client/src/sagas/BuildingBlockSagas/tests/fixtures.ts (1 hunks)
  • app/client/src/sagas/JSPaneSagas.ts (4 hunks)
  • app/client/src/selectors/navigationSelectors.ts (1 hunks)
  • app/client/src/utils/DynamicBindingUtils.test.ts (1 hunks)
  • app/client/src/utils/FilterInternalProperties/JsAction.ts (2 hunks)
  • app/client/src/utils/JSPaneUtils.test.ts (11 hunks)
  • app/client/src/utils/JSPaneUtils.tsx (5 hunks)
  • app/client/src/utils/NavigationSelector/JsChildren.ts (1 hunks)
  • app/client/src/utils/NavigationSelector/WidgetChildren.ts (1 hunks)
  • app/client/src/utils/NavigationSelector/common.ts (1 hunks)
  • app/client/test/factories/Actions/API.ts (1 hunks)
  • app/client/test/factories/Actions/GoogleSheetFactory.ts (1 hunks)
  • app/client/test/factories/Actions/JSObject.ts (2 hunks)
  • app/client/test/factories/Actions/Postgres.ts (1 hunks)
  • app/client/test/factories/MockPluginsState.ts (4 hunks)
  • app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/RunBehaviorEnum.java (1 hunks)
  • app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/ce/ActionCE_DTO.java (2 hunks)
  • app/server/appsmith-plugins/amazons3Plugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-plugins/anthropicPlugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-plugins/appsmithAiPlugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-plugins/firestorePlugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-plugins/googleAiPlugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-plugins/mongoPlugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-plugins/mssqlPlugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-plugins/mysqlPlugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-plugins/openAiPlugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-plugins/oraclePlugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-plugins/postgresPlugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/ActionControllerCE.java (2 hunks)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/LayoutActionServiceCE.java (2 hunks)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/LayoutActionServiceCEImpl.java (3 hunks)
  • app/server/appsmith-server/src/test/java/com/appsmith/server/services/LayoutActionServiceTest.java (2 hunks)
💤 Files with no reviewable changes (1)
  • app/client/src/PluginActionEditor/constants/PluginActionConstants.ts
🧰 Additional context used
📓 Path-based instructions (1)
`app/client/cypress/**/**.*`: Review the following e2e test code written using the Cypress test library. Ensure that: - Follow best practices for Cypress code and e2e automation. ...

app/client/cypress/**/**.*: Review the following e2e test code written using the Cypress test library. Ensure that:

  • Follow best practices for Cypress code and e2e automation.
  • Avoid using cy.wait in code.
  • Avoid using cy.pause in code.
  • Avoid using agHelper.sleep().
  • Use locator variables for locators and do not use plain strings.
  • Use data-* attributes for selectors.
  • Avoid Xpaths, Attributes and CSS path.
  • Avoid selectors like .btn.submit or button[type=submit].
  • Perform logins via API with LoginFromAPI.
  • Perform logout via API with LogOutviaAPI.
  • Perform signup via API with SignupFromAPI.
  • Avoid using it.only.
  • Avoid using after and aftereach in test cases.
  • Use multiple assertions for expect statements.
  • Avoid using strings for assertions.
  • Do not use duplicate filenames even with different paths.
  • Avoid using agHelper.Sleep, this.Sleep in any file in code.
  • app/client/cypress/e2e/Regression/ClientSide/JSObject/JSObject_Tests_spec.ts
  • app/client/cypress/e2e/Regression/ClientSide/ActionExecution/FrameworkFunctions_ShowCloseModalFunctions_spec.ts
  • app/client/cypress/e2e/Regression/ServerSide/Datasources/Snowflake_Basic_Spec.ts
  • app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/APIOnLoad_Spec.ts
  • app/client/cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters2_spec.ts
  • app/client/cypress/e2e/Regression/ClientSide/PublishedApps/PublishedModeToastToggle_Spec.ts
  • app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug14987_spec.js
  • app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad2_Spec.ts
  • app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad4_Spec.ts
  • app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug20275_Spec.js
  • app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/SetTimeout_spec.ts
  • app/client/cypress/e2e/Regression/ServerSide/Datasources/Oracle_Spec.ts
  • app/client/cypress/e2e/Regression/ServerSide/Params/PassingParams_Spec.ts
  • app/client/cypress/fixtures/PartialImportExport/PartialImportExportSampleApp.json
  • app/client/cypress/e2e/Regression/ClientSide/SetProperty/SetOptions_Spec.ts
  • app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/JSFunctionExecution_spec.ts
  • app/client/cypress/fixtures/PartialImportExport/QueriesExportedOnly.json
  • app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts
  • app/client/cypress/support/Pages/ApiPage.ts
  • app/client/cypress/support/Pages/JSEditor.ts
🧬 Code Graph Analysis (15)
app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts (1)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (2)
  • RUN_BEHAVIOR (10-23)
  • RUN_BEHAVIOR_VALUES (25-25)
app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/SetTimeout_spec.ts (1)
app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug20275_Spec.js (1)
  • jsEditor (7-12)
app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts (1)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (2)
  • RUN_BEHAVIOR (10-23)
  • RUN_BEHAVIOR_VALUES (25-25)
app/client/src/api/PageApi.tsx (1)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1)
  • ActionRunBehaviourType (27-27)
app/client/src/api/ActionAPI.tsx (1)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1)
  • ActionRunBehaviourType (27-27)
app/client/src/pages/Editor/JSEditor/JSEditorToolbar/types.ts (1)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1)
  • ActionRunBehaviourType (27-27)
app/client/src/entities/Action/index.ts (1)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1)
  • ActionRunBehaviourType (27-27)
app/client/src/components/formControls/DropDownControl.tsx (2)
app/client/src/ce/pages/workspace/InviteUsersForm.tsx (1)
  • OptionLabel (127-134)
app/client/packages/design-system/widgets/src/components/Text/src/Text.tsx (1)
  • Text (66-66)
app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts (1)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (2)
  • RUN_BEHAVIOR (10-23)
  • RUN_BEHAVIOR_VALUES (25-25)
app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx (3)
app/client/src/ce/pages/workspace/InviteUsersForm.tsx (1)
  • OptionLabel (127-134)
app/client/packages/design-system/widgets/src/components/Text/src/Text.tsx (1)
  • Text (66-66)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (2)
  • RUN_BEHAVIOR_VALUES (25-25)
  • ActionRunBehaviourType (27-27)
app/client/src/entities/DataTree/dataTreeTypes.ts (1)
app/client/src/ce/entities/DataTree/types.ts (1)
  • EntityTypeValue (37-37)
app/client/cypress/e2e/Regression/ClientSide/SetProperty/SetOptions_Spec.ts (1)
app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug20275_Spec.js (1)
  • jsEditor (7-12)
app/client/src/actions/pluginActionActions.ts (2)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1)
  • ActionRunBehaviourType (27-27)
app/client/src/ce/constants/ReduxActionConstants.tsx (1)
  • ReduxActionTypes (1281-1324)
app/client/src/ce/sagas/PageSagas.tsx (2)
app/client/src/actions/pluginActionActions.ts (2)
  • setActionsRunBehavior (355-366)
  • setJSActionsRunBehavior (368-380)
app/client/src/entities/DataTree/dataTreeFactory.ts (2)
  • actions (129-156)
  • jsActions (110-127)
app/client/src/ce/reducers/entityReducers/jsActionsReducer.tsx (2)
app/client/src/ce/constants/ReduxActionConstants.tsx (1)
  • ReduxActionTypes (1281-1324)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1)
  • ActionRunBehaviourType (27-27)
🪛 Biome (1.9.4)
app/client/src/ce/sagas/PageSagas.tsx

[error] 543-543: Do not access Object.prototype method 'hasOwnProperty' from target object.

It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.

(lint/suspicious/noPrototypeBuiltins)


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

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: client-lint / client-lint
  • GitHub Check: server-unit-tests / server-unit-tests
  • GitHub Check: client-build / client-build
  • GitHub Check: client-unit-tests / client-unit-tests
🔇 Additional comments (179)
app/client/src/entities/DataTree/dataTreeTypes.ts (2)

28-44: Clean addition of NavigationData interface

The new NavigationData interface provides a well-structured representation for navigation entities with appropriate typing. The interface includes all necessary properties for navigation with proper optional flags where needed. This centralizes the navigation data structure in one location rather than having duplicate definitions.


46-46: Good type definition for EntityNavigationData

The type alias provides a clear definition for storing collections of NavigationData objects, making it easier to reference this type throughout the codebase.

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

2-2: Correctly updated import source

Import has been properly updated to reference the newly centralized type definition.

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

17-17: Properly updated import path

Import path has been correctly updated to use the centralized type definition.

app/client/src/utils/NavigationSelector/common.ts (1)

5-5: Correctly updated import source

Import has been properly updated to reference the centralized type definitions, maintaining consistency across the codebase.

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

6-6: Import path refactored for better type centralization.

The import path for EntityNavigationData type has been updated to use the centralized type definition from entities/DataTree/dataTreeTypes. This is part of a broader refactoring to centralize navigation-related types.

app/client/src/utils/NavigationSelector/JsChildren.ts (1)

7-10: Import path refactored for better type centralization.

The import path for navigation-related types (EntityNavigationData and NavigationData) has been updated to use the centralized type definitions from entities/DataTree/dataTreeTypes. This maintains consistency with similar changes across the codebase.

app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx (1)

16-16: Updated import path for THEME constant.

The import for THEME has been moved from "../../constants/PluginActionConstants" to "../../types/PluginActionTypes" as part of the broader refactoring effort that replaces the boolean executeOnLoad flag with a string-based runBehavior property.

app/client/src/utils/NavigationSelector/WidgetChildren.ts (1)

5-5: Import path refactored for better type centralization.

The import path for EntityNavigationData type has been updated to use the centralized type definition from entities/DataTree/dataTreeTypes. This aligns with the similar changes made in other navigation-related files.

app/client/cypress/e2e/Regression/ClientSide/JSObject/JSObject_Tests_spec.ts (1)

36-36: LGTM: Parameter change aligns with the runBehavior refactoring.

The update correctly changes the second parameter to use the explicit string literal "On page load" instead of a boolean value, aligning with the codebase-wide migration from boolean executeOnLoad to string-based runBehavior.

app/client/cypress/e2e/Regression/ServerSide/Datasources/Snowflake_Basic_Spec.ts (1)

168-168: LGTM: Parameter change aligns with the runBehavior refactoring.

The change correctly updates the call to ToggleOnPageLoadRun to use the string literal "On page load" instead of a boolean value, which is consistent with the system-wide migration to the new run behavior model.

app/client/src/components/editorComponents/CodeEditor/commandsHelper.ts (1)

18-21: LGTM: Import path updated for centralized type definitions.

The import path for navigation-related types has been correctly updated to use the centralized location in "entities/DataTree/dataTreeTypes", supporting better type consistency across the codebase.

app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts (1)

145-145: LGTM: Parameter change aligns with the runBehavior refactoring.

The change correctly updates the call to ToggleOnPageLoadRun to use the string literal "Manual" instead of a boolean value, consistent with the system-wide migration to the new run behavior model.

app/client/cypress/e2e/Regression/ServerSide/Params/PassingParams_Spec.ts (1)

79-79: Update to string-based run behavior parameter looks good.

The parameter change from boolean to string-based "Manual" aligns with the codebase-wide migration from executeOnLoad to runBehavior.

app/client/cypress/e2e/Regression/ClientSide/PublishedApps/PublishedModeToastToggle_Spec.ts (1)

25-25: String-based run behavior parameters look good.

The changes from boolean to string-based "On page load" match the refactoring of run behavior across the codebase.

Also applies to: 32-32

app/client/src/components/editorComponents/CodeEditor/MarkHelpers/entityMarker.ts (1)

1-4: Import path update looks good.

The change to import types from the centralized location entities/DataTree/dataTreeTypes improves code organization and reduces duplication.

app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/APIOnLoad_Spec.ts (1)

53-53: String-based run behavior parameter looks good.

The parameter change from boolean to string-based "On page load" is consistent with the codebase-wide refactoring of run behavior.

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

123-123: Looks good - migration from executeOnLoad to runBehavior

The change from boolean executeOnLoad: false to string-based runBehavior: "MANUAL" aligns with the codebase's migration to the new run behavior paradigm.

app/client/cypress/e2e/Regression/ClientSide/ActionExecution/FrameworkFunctions_ShowCloseModalFunctions_spec.ts (1)

49-49: Correct update of parameter for the migration

The parameter passed to apiPage.clickSettingIcon has been properly updated from a boolean to the string literal "On page load", reflecting the UI changes from toggle switches to dropdown selectors for run behavior.

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

125-125: Import path update for centralized type definitions

The import path for EntityNavigationData has been correctly updated to use the centralized type definition in entities/DataTree/dataTreeTypes instead of the previous location.

app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug14987_spec.js (1)

35-35: UI label updated correctly for run behavior test

The test now correctly looks for the new label "Run behavior" instead of the previous "Run the query on page load", reflecting the UI changes due to the executeOnLoad to runBehavior migration.

app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad2_Spec.ts (1)

97-97: Function parameter updated to use descriptive string value.

The code has been updated to use the string literal "On page load" instead of a boolean value (true) when enabling async function settings. This change makes the code more readable and follows the migration from boolean flags to explicit string-based run behavior specifications.

app/client/cypress/e2e/Regression/ServerSide/Datasources/Oracle_Spec.ts (1)

470-470: Updated toggle parameter to use string literal.

The toggle parameter has been changed from a boolean value (false) to the string literal "Manual", representing the same functionality but with a more descriptive value. This aligns with the codebase-wide migration from boolean executeOnLoad flags to string-based runBehavior specifications.

app/client/src/ce/constants/messages.ts (1)

2592-2592: Updated message to reflect new execution model.

The UI message has been updated from "Choose the functions to run on page load" to "Choose functions run behavior" to accurately reflect the new conceptual model where functions can have different execution triggers beyond the binary on/off page load setting.

app/client/src/ce/utils/autocomplete/EntityDefinitions.test.ts (1)

47-47: Updated test fixture to use new runBehavior property.

Test data has been migrated from using the boolean executeOnLoad: false property to the string-based runBehavior: "MANUAL" property. This change maintains the same test behavior while ensuring the test fixtures match the updated data model used throughout the application.

Also applies to: 89-89

app/client/src/sagas/BuildingBlockSagas/tests/fixtures.ts (1)

132-132: LGTM - Change aligns with codebase migration pattern.

The update from executeOnLoad: true to runBehavior: "ON_PAGE_LOAD" follows the new pattern for action execution control.

app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad4_Spec.ts (1)

37-42: String-based behavior verification looks good.

The test now correctly verifies string-based run behavior settings ("Manual") instead of using boolean values, maintaining alignment with the updated UI and backend implementation.

app/client/test/factories/Actions/Postgres.ts (1)

34-34: Factory update aligned with new property structure.

The transition from executeOnLoad: true to runBehavior: "MANUAL" in the factory ensures test data consistently uses the new execution behavior model.

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

13-13: New type import looks good.

The import of ActionRunBehaviourType is correctly added to support the updated property structure.


143-143: BaseAction interface property updated correctly.

The property change from boolean executeOnLoad to string-based runBehavior: ActionRunBehaviourType establishes the foundation for the execution model transition throughout the codebase.

app/client/src/pages/Editor/EntityNavigation/JSObjectsPane/index.ts (1)

84-84: Property path check updated correctly

The updated code correctly checks for runBehavior instead of the deprecated executeOnLoad property, aligning with the codebase migration to string-based run behavior values.

app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug20275_Spec.js (1)

33-33: Run behavior parameter updated correctly

The EnableDisableAsyncFuncSettings method now correctly uses the string value "On page load" instead of the boolean true, matching the new run behavior implementation.

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

47-47: Test data updated correctly

The test definition now uses runBehavior: "MANUAL" instead of the deprecated executeOnLoad: false, correctly reflecting the new run behavior model.


94-94: Test data updated correctly

The test definition correctly uses runBehavior: "MANUAL" in place of the deprecated executeOnLoad: false.


242-242: Test data updated correctly

The second test case's data structure has been updated to use runBehavior: "MANUAL" consistent with the application's migration to string-based run behavior values.


289-289: Test data updated correctly

The function definition correctly uses runBehavior: "MANUAL" in place of the deprecated executeOnLoad: false.

app/client/test/factories/Actions/GoogleSheetFactory.ts (1)

66-66: Factory definition updated correctly

The GoogleSheetFactory definition has been updated to use runBehavior: "MANUAL" instead of the deprecated executeOnLoad: false, aligning with the string-based run behavior model.

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

13-13: Looks good: Boolean executeOnLoad properly replaced with string runBehavior.

This change correctly implements the migration from boolean flags to a string-based run behavior model.

app/client/test/factories/Actions/API.ts (1)

66-66: Consistent behavior migration in test factory.

The change to runBehavior: "MANUAL" aligns with the codebase-wide migration from boolean flags to the new string-based enum pattern.

app/client/src/PluginActionEditor/transformers/RestActionTransformers.test.ts (1)

18-18: Updated test fixture with new run behavior model.

Correctly migrated from the deprecated boolean property to the string-based run behavior property.

app/client/src/api/PageApi.tsx (2)

12-12: Added proper import for run behavior type.

Correctly importing the type definition for the new behavior model.


73-73: API interface updated to support new run behavior model.

The SavePageResponseData interface now properly returns the string-based run behavior instead of the deprecated boolean flag, maintaining consistency with the rest of the codebase.

app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts (2)

1-4: Good addition of new run behavior types.

Clean import of the new run behavior types from the plugin action types module. This enables the transition from boolean to enum-based run behavior settings.


12-16: Appropriate UI control migration from switch to dropdown.

The migration from "executeOnLoad" boolean toggle to a "runBehavior" dropdown matches the architectural changes described in the PR. The dropdown properly uses the RUN_BEHAVIOR values and sets a sensible default to MANUAL mode.

app/client/src/pages/Editor/JSEditor/JSEditorToolbar/types.ts (2)

3-3: Good type import for run behavior.

Adding the ActionRunBehaviourType import supports proper type checking for the updated interface.


6-6: Proper type refinement for value property.

Changing from a generic union type to the specific ActionRunBehaviourType provides better type safety and integrates with the new run behavior model.

app/client/src/components/editorComponents/CodeEditor/EditorConfig.ts (1)

3-6: Consolidated imports for better organization.

Good refactoring to group related type imports from the same module. This improves code maintainability and ensures consistent type usage.

app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/LayoutActionServiceCE.java (1)

4-4: Appropriate import for the new enum type.

The import of RunBehaviorEnum supports the new run behavior functionality.

app/client/src/components/editorComponents/utils.test.ts (2)

1-2: Appropriate import addition for ActionRunBehaviour enum

The import statement for ActionRunBehaviour is correctly added to support the migration from boolean executeOnLoad to enum-based runBehavior.


34-34: Property migration looks good

The TEST_JS_FUNCTION object correctly uses ActionRunBehaviour.MANUAL instead of the deprecated executeOnLoad boolean property, aligning with the codebase migration to a more descriptive run behavior model.

app/client/src/pages/Editor/JSEditor/utils.test.ts (2)

9-9: Correct import for ActionRunBehaviour

The import statement is appropriately added to support the runBehavior property.


48-48: Proper use of enum for runBehavior

The BASE_JS_ACTION function correctly uses the enum value, demonstrating the proper way to set the runBehavior property.

app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/RunBehaviorEnum.java (1)

1-9: Well-structured enum implementation

The RunBehaviorEnum is properly defined with clear documentation and appropriate values that match the client-side implementation. This creates a consistent approach to action execution behavior across the stack.

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

172-172: Added important import for the new action run behavior enum.

This import is required to support the refactoring of action execution behavior from boolean flags to a more descriptive enum-based approach.


1557-1566: Updated condition to use new runBehavior enum instead of boolean flag.

This change correctly implements the migration from the boolean executeOnLoad flag to the new string-based runBehavior property. The logic remains consistent - only clear responses for actions that shouldn't run on page load.

app/client/cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters2_spec.ts (2)

180-180: Updated to use new string-based run behavior instead of boolean.

The test now correctly uses "On page load" instead of a boolean value, aligning with the UI changes from switches to dropdowns for run behavior settings.


239-239: Updated to use "Manual" string parameter instead of boolean.

This change correctly updates the test to use the new string-based run behavior option, maintaining test functionality while adapting to the updated API.

app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts (2)

1-4: Added imports for the new run behavior constants.

These imports bring in the necessary constants for setting up the dropdown options for run behavior.


12-16: Replaced boolean switch with dropdown for run behavior selection.

This configuration change properly transforms the UI control from a simple on/off switch to a more expressive dropdown menu with multiple run behavior options. The property name has been updated from executeOnLoad to runBehavior to match the new data model.

app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/SetTimeout_spec.ts (1)

230-230: Updated parameter to use string-based run behavior value.

Test now correctly uses "On page load" string instead of a boolean value, aligning with the updated API interface for managing async function execution settings.

app/server/appsmith-plugins/postgresPlugin/src/main/resources/setting.json (1)

8-23: Well-structured migration from boolean to enum-based execution control.

The new dropdown-based "Run behavior" setting with clear options for "On page load" and "Manual" provides better usability compared to the previous boolean flag. The subtext descriptions effectively explain the behavior of each option.

app/client/src/components/formControls/utils.ts (1)

425-425: Special handling for runBehavior property added correctly.

The modified condition prevents the new runBehavior property from being processed through the standard initialValue extraction, which is necessary for the executeOnLoad to runBehavior migration.

app/client/src/utils/JSPaneUtils.tsx (2)

6-6: Appropriate import added for ActionRunBehaviour enum.

Import statement correctly brings in the ActionRunBehaviour enum to support the migration from boolean executeOnLoad to string-based run behavior.


134-134: Consistent replacement of executeOnLoad with runBehavior across JS action creation.

All JS action creation functions have been updated to use the new runBehavior pattern with MANUAL as the default. This maintains consistent behavior with the previous implementation.

Also applies to: 233-233, 245-245, 285-285

app/client/src/utils/FilterInternalProperties/JsAction.ts (2)

4-4: Correctly imported ActionRunBehaviour enum.

The ActionRunBehaviour enum import is properly added to support the migration from executeOnLoad to runBehavior.


19-22: Updated conditional logic to use runBehavior enum.

The condition has been properly modified to check for ActionRunBehaviour.ON_PAGE_LOAD instead of the boolean executeOnLoad flag, maintaining the same logical behavior while using the new typed enum approach.

app/server/appsmith-plugins/anthropicPlugin/src/main/resources/setting.json (1)

8-23: Improved control for action execution behavior

The change from a boolean switch to a dropdown with clear options enhances both clarity and flexibility. The descriptive subtext for each option helps users understand exactly when their queries will run.

app/server/appsmith-plugins/mysqlPlugin/src/main/resources/setting.json (1)

8-23: Consistent implementation of run behavior dropdown across plugins

Good consistency with the implementation seen in other plugins. The dropdown pattern with descriptive subtexts maintains a coherent user experience across the application.

app/client/src/selectors/navigationSelectors.ts (1)

36-36: Centralized type definition import

Good practice to import the type from a central location rather than defining it locally, ensuring consistent type usage across the codebase.

app/client/src/api/ActionAPI.tsx (2)

13-13: Import of typed enum for run behavior

Proper addition of the strongly-typed ActionRunBehaviourType import to support the refactored API method.


305-311: API method updated to use run behavior enum

Good implementation of the API method refactor from boolean toggle to typed string enum. The method name, parameter type, and endpoint are all consistently updated to reflect the new approach.

app/client/cypress/e2e/Regression/ClientSide/SetProperty/SetOptions_Spec.ts (4)

212-212: Method argument updated for runBehavior.

The change correctly updates the EnableDisableAsyncFuncSettings method call to use the new string-based parameter "On page load" instead of a boolean value.


271-271: Method argument updated for runBehavior.

The change correctly updates the EnableDisableAsyncFuncSettings method call to use the new string-based parameter "On page load" instead of a boolean value.


316-316: Method argument updated for runBehavior.

The change correctly updates the EnableDisableAsyncFuncSettings method call to use the new string-based parameter "On page load" instead of a boolean value.


358-358: Method argument updated for runBehavior.

The change correctly updates the EnableDisableAsyncFuncSettings method call to use the new string-based parameter "Manual" instead of a boolean value.

app/server/appsmith-plugins/mssqlPlugin/src/main/resources/setting.json (1)

8-23: Updated executeOnLoad to runBehavior with dropdown options.

The configuration has been correctly migrated from a boolean switch to a dropdown with explicit options, improving the UX and making the behavior more descriptive.

app/server/appsmith-plugins/appsmithAiPlugin/src/main/resources/setting.json (1)

8-23: Updated executeOnLoad to runBehavior with dropdown options.

The configuration has been correctly migrated from a boolean switch to a dropdown with explicit options, improving the UX and making the behavior more descriptive.

app/server/appsmith-plugins/mongoPlugin/src/main/resources/setting.json (1)

8-23: Updated executeOnLoad to runBehavior with dropdown options.

The configuration has been correctly migrated from a boolean switch to a dropdown with explicit options, improving the UX and making the behavior more descriptive.

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

44-44: All test objects consistently updated to use runBehavior

The test file has been consistently updated to replace the deprecated executeOnLoad: false with runBehavior: "MANUAL" across all test objects. This aligns with the broader migration from boolean flags to string-based enum values for execution control.

Also applies to: 86-86, 154-154, 196-196, 280-280, 361-361, 472-472, 552-552, 627-627, 702-702, 757-757

app/server/appsmith-plugins/googleAiPlugin/src/main/resources/setting.json (1)

8-23: Plugin setting updated to use dropdown for run behavior

The setting has been refactored from a boolean switch to a dropdown with more descriptive options. The dropdown provides better UX by clearly explaining the behavior of each option through subtext.

app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts (2)

9-12: Added imports for standardized run behavior constants

Appropriate imports have been added for the run behavior constants, ensuring consistency across the application.


20-24: API Settings config updated to use standardized run behavior dropdown

The API settings configuration has been updated to use the standardized run behavior dropdown, replacing the previous boolean switch. This ensures consistency with other parts of the application and provides a more descriptive UI for users.

app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/setting.json (1)

8-23: Google Sheets plugin settings updated for consistent run behavior control

The Google Sheets plugin settings have been updated to use the same run behavior dropdown pattern as other plugins, ensuring a consistent UI experience across different plugin types.

app/server/appsmith-plugins/oraclePlugin/src/main/resources/setting.json (1)

8-23: Good implementation of the run behavior dropdown control

The change from a boolean switch to a dropdown with explicit options improves usability and provides clearer context to users about each run behavior option.

app/server/appsmith-plugins/openAiPlugin/src/main/resources/setting.json (1)

8-23: Good implementation of the run behavior dropdown control

The change from a boolean switch to a dropdown with explicit options improves usability and provides clearer context to users about each run behavior option.

app/server/appsmith-plugins/firestorePlugin/src/main/resources/setting.json (1)

8-23: Good implementation of the run behavior dropdown control

The change from a boolean switch to a dropdown with explicit options improves usability and provides clearer context to users about each run behavior option.

app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/ce/ActionCE_DTO.java (3)

18-18: LGTM: Added import for RunBehaviorEnum

Correctly imported the new enum to support the run behavior model.


104-110: Properly deprecated the executeOnLoad field

Good practice to mark the field as deprecated with appropriate Javadoc explaining the alternative.


112-113: Well-implemented new runBehavior field

The new field correctly uses the RunBehaviorEnum type with a default value of MANUAL, which matches the initial values in the plugin settings.

app/client/test/factories/MockPluginsState.ts (1)

6955-7177: Confirmed migration from boolean to enum-based run behavior

The changes successfully replace the boolean executeOnLoad property with a string-based runBehavior dropdown across all plugin types (REST API, GraphQL, Appsmith AI, PostgreSQL). The implementation uses consistent values ("ON_PAGE_LOAD" and "MANUAL") with appropriate labels and descriptions.

app/client/cypress/fixtures/PartialImportExport/PartialImportExportSampleApp.json (6)

2211-2211: Correct mapping for JS action myFun2.
The previous boolean executeOnLoad flag has been properly replaced with "runBehavior": "MANUAL", reflecting that this action will now execute only when explicitly invoked.


2267-2267: Correct mapping for JS action addNumbers.
The migration from executeOnLoad: false to "runBehavior": "MANUAL" is consistent here as well.


2321-2321: Correct mapping for DB action UpdateQuery.
The executeOnLoad: false case is accurately converted into "runBehavior": "MANUAL".


2386-2386: Correct mapping for DB action InsertQuery.
The fixture now reads "runBehavior": "MANUAL" in place of executeOnLoad: false, which is the intended behavior for manual inserts.


2450-2450: Correct mapping for DB action DeleteQuery.
Replacing executeOnLoad: false with "runBehavior": "MANUAL" correctly prevents automatic deletion on import.


2502-2502: Correct mapping for DB action SelectQuery.
The original executeOnLoad: true flag has been properly transitioned to "runBehavior": "ON_PAGE_LOAD", ensuring this query still runs automatically when the page loads.

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

91-92: Import names updated correctly for new run behavior model.

The imports have been properly updated to align with the new run behavior paradigm, replacing the previous executeOnLoad boolean approach with the more flexible runBehavior string-based approach.


539-539: Action dispatch updated to use new runBehavior action creator.

The action creator has been correctly updated to match the new runBehavior paradigm.

app/server/appsmith-plugins/amazons3Plugin/src/main/resources/setting.json (1)

8-23: Clean migration from boolean switch to semantic dropdown.

The UI control has been successfully updated from a simple boolean switch to a more expressive dropdown with clear labels and helpful subtext. This change aligns with the platform-wide move from executeOnLoad to runBehavior, providing better UX by explaining the behavior of each option.

app/client/src/ce/reducers/entityReducers/actionsReducer.tsx (2)

16-16: Added appropriate type import for ActionRunBehaviourType.

The proper type has been imported to support the new run behavior model.


314-332: Reducer handler properly updated for runBehavior.

The reducer has been correctly updated to handle the new action type and payload structure, maintaining the same update pattern but applying it to the runBehavior property instead of executeOnLoad.

app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.test.tsx (4)

6-6: Added ActionRunBehaviour enum import.

Proper import of the enum ensures consistent usage of the run behavior values in tests.


19-29: Test updated to check disabled state of run behavior dropdown.

The test has been correctly updated to validate the disabled state of the component with the new run behavior UI.


31-41: Test updated to check for combobox role instead of switch.

The test has been properly modified to verify the presence of dropdown controls instead of switches, reflecting the UI changes.


43-72: Updated test to verify dropdown selection state.

The test now correctly validates both possible states of the run behavior dropdown ("On page load" and "Manual") using specific CSS selectors to target the dropdown items.

app/client/src/components/formControls/DropDownControl.tsx (4)

23-23: Added Flex and Text components to enhance dropdown options.

The import has been extended to include Flex and Text from @appsmith/ads, which will be used for the new styled components.


32-43: Added styled components for better dropdown option presentation.

Two new styled components were created:

  1. OptionLabel - For styling the main option text with appropriate color, font size, and weight
  2. OptionSubText - For styling the secondary text with muted color and smaller font size

This enhances the visual hierarchy and readability of dropdown options.


477-477: Fixed dropdown list height for better user experience.

Setting a consistent list height (240px) ensures the dropdown has adequate space to display options while maintaining a reasonable size in the UI.


511-529: Enhanced dropdown options rendering with support for subtexts.

The renderOptionWithIcon function now supports options with a subtext property, displaying them in a vertical layout with the main label and subtext stacked. This provides a more informative and visually appealing dropdown experience.

app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/ActionControllerCE.java (3)

5-5: Added import for RunBehaviorEnum used in the new endpoint.

Part of the migration from boolean executeOnLoad to a more descriptive enum-based approach.


119-127: Added new endpoint for setting action run behavior.

A new REST endpoint has been implemented to support the migration from boolean executeOnLoad to the more expressive RunBehaviorEnum. The implementation follows the controller's existing patterns and properly delegates to the service layer.


129-133: Properly deprecated the legacy executeOnLoad endpoint.

Good practice to:

  1. Add proper Javadoc documentation explaining the deprecation
  2. Include a reference to the replacement endpoint
  3. Apply the @deprecated annotation

This approach ensures backward compatibility while guiding developers to use the new API.

app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/JSFunctionExecution_spec.ts (6)

18-24: Updated interface to use string-based run behavior instead of boolean.

Changed onPageLoad: boolean to runBehavior: "On page load" | "Manual" to align with the codebase migration from boolean flags to a more descriptive string-based approach.


35-66: Updated test data to use the new runBehavior property.

Test data has been updated to use string values ("On page load" or "Manual") instead of boolean flags, consistent with the interface changes.


360-363: Fixed function filtering logic for the new runBehavior property.

Updated the filter condition to use the new property name while maintaining the same logical test.


406-408: Updated EnableDisableAsyncFuncSettings call to use string values.

Modified to pass the string-based runBehavior value instead of a boolean flag.


503-504: Updated EnableDisableAsyncFuncSettings call to use "On page load" string value.

Changed to use the explicit string value instead of boolean.


508-508: Updated VerifyAsyncFuncSettings to check for string-based run behavior.

Changed verification to match the new property type.

app/client/cypress/fixtures/PartialImportExport/QueriesExportedOnly.json (1)

1-1: Updated fixture to use runBehavior instead of executeOnLoad.

The JSON fixture has been correctly updated to use the new string-based runBehavior property with appropriate values:

  • "MANUAL" for InsertQuery, DeleteQuery, and UpdateQuery
  • "ON_PAGE_LOAD" for SelectQuery

This change aligns with the codebase migration from boolean flags to more descriptive string values.

app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx (6)

2-8: Good refactoring of imports to support the new dropdown UI component.

The changes properly import the necessary components from the design system for the new dropdown selector, including Select, Option, and related types.


17-20: Appropriate type imports for runtime behavior configuration.

The import of RUN_BEHAVIOR_VALUES and ActionRunBehaviourType properly sets up the type system for the new run behavior model, ensuring type safety throughout the component.


23-36: Well-structured styled components for the dropdown options.

The styled components follow the design system patterns with proper typography and color variables. The StyledSelect component correctly controls the width to fit the content.


49-52: Successful migration from boolean to enum-based state.

The component now correctly initializes with the runBehavior value from the action instead of a boolean flag, and properly finds the matching option for display.


53-68: Callback properly handles the new run behavior state updates.

The onSelectOptions callback correctly:

  1. Updates local state
  2. Calls the parent update handler with the new value
  3. Logs analytics with the appropriate event name and value

Type safety is maintained with the ActionRunBehaviourType parameter.


71-110: UI layout updates correctly implemented for the dropdown control.

The Flex container has been updated with proper alignment and spacing properties. The StyledSelect component replaces the previous Switch control with appropriate test IDs and proper option rendering that includes both labels and descriptive subtexts.

app/client/src/pages/Editor/SaaSEditor/__data__/InitialState.json (5)

85-85: Default run behavior correctly set.

The initial state now includes the runBehavior property set to "MANUAL" for new actions, which aligns with the default behavior in the application.


2545-2560: Well-structured dropdown options for MongoDB plugin settings.

The MongoDB plugin settings configuration has been properly updated with:

  1. Clear label "Run behavior"
  2. Appropriate dropdown control type
  3. "MANUAL" default value
  4. Descriptive options with helpful subtext explaining each behavior mode

2591-2607: Consistent configuration for SQL plugin settings.

The SQL plugin settings maintain consistency with other plugins, using identical dropdown configuration and option values.


2637-2652: Consistent configuration for API plugin settings.

The API plugin settings maintain the same pattern as the other plugins, ensuring a uniform user experience across different action types.


2689-2704: Uniform configuration across remaining plugins.

All plugin configurations (Firebase, Google Sheets, S3, and Redis) maintain consistent structure, labels, and behavior options, providing a unified user experience throughout the platform.

Also applies to: 2728-2743, 2774-2789, 2820-2835

app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/LayoutActionServiceCEImpl.java (3)

304-310: Good synchronization from boolean to enum in setExecuteOnLoad.

The implementation correctly syncs the legacy executeOnLoad boolean with the new runBehavior enum, maintaining backward compatibility while supporting the new model.


322-339: Well-implemented bidirectional compatibility in setRunBehavior.

The new setRunBehavior method properly:

  1. Updates the new runBehavior enum property
  2. Sets the legacy executeOnLoad boolean for backward compatibility
  3. Maintains the userSetOnLoad flag for tracking user preferences

This ensures a smooth transition to the new model while maintaining API compatibility.


426-435: Proper initialization logic for new actions.

The creation logic correctly initializes both properties:

  1. New actions default to false and MANUAL unless cloned
  2. Cloned actions maintain their execution settings via both properties
  3. The action domain model is consistently updated with both properties

This ensures consistent behavior between old and new code paths.

app/client/src/pages/Editor/SaaSEditor/__data__/FinalState.json (8)

86-86: Correct placement of runBehavior on action entities.

The new runBehavior property is added at the same level as actionConfiguration, matching the server‐side model where runBehavior is a root‐level field on an action entity. The value "MANUAL" aligns with the default behaviour.


2546-2561: Add runBehavior dropdown to Mongo form settings.

The setting for plugin ID 5e687c18fb01e64e6a3f873f correctly replaces the old switch with a dropdown, providing "On page load" and "Manual" options. Default "MANUAL" is appropriate for backward compatibility.


2592-2608: Add runBehavior dropdown to SQL form settings.

For plugin ID 5c9f512f96c1a50004819786, the new dropdown control is consistent with other form configs. Options and default align with the fresh API.


2638-2654: Add runBehavior dropdown to REST API form settings.

Plugin ID 5ca385dc81b37f0004b4db85 uses a "CHECKBOX" control for confirmation but correctly adds a "DROP_DOWN" for runBehavior.


2690-2706: Add runBehavior dropdown to Firestore form settings.

The dropdown is properly introduced for plugin ID 5fbbc39ad1f71d6666c32e4b with identical option labels and values.


2729-2745: Add runBehavior dropdown to Google Sheets form settings.

Plugin ID 6080f9266b8cfd602957ba72 now has a consistent dropdown. Label, subText, and values match the new enum.


2775-2791: Add runBehavior dropdown to S3 form settings.

Plugin ID 6023b4a070eb652de19476d3 receives the same treatment, ensuring uniform UX across plugins.


2821-2837: Add runBehavior dropdown to Redis form settings.

Plugin ID 5f9169920c6d936f469f4c8a is correctly updated with the new control type and option set.

app/client/src/PluginActionEditor/types/PluginActionTypes.ts (3)

1-4: Introduce theme constant.

Setting THEME to EditorTheme.LIGHT centralizes the editor theme configuration—good for consistency.


25-25: Generate list of run behavior values.

RUN_BEHAVIOR_VALUES simplifies populating dropdown options. This is a neat DRY approach.


27-27: Alias the enum type.

ActionRunBehaviourType ensures strict typing for all run behavior values. Excellent for catching typos at compile time.

app/server/appsmith-server/src/test/java/com/appsmith/server/services/LayoutActionServiceTest.java (2)

11-11: Appropriate import for the new RunBehaviorEnum.

The import ensures the test file has access to the RunBehaviorEnum used in the new tests.


1357-1402: Good test coverage for the new runBehavior property.

This test thoroughly validates the default values and state transitions when setting the runBehavior property. It verifies both the direct property changes and their effect on related properties (executeOnLoad and userSetOnLoad).

The persistence check at the end is particularly valuable to ensure changes are stored correctly.

app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts (4)

2310-2310: Consistent application of the new runBehavior property

The property has been correctly set to "ON_PAGE_LOAD" which is the appropriate value for a component that should execute automatically when loaded.


2394-2394: Correct implementation of manual run behavior

The property is appropriately set to "MANUAL" for this action that should only run when explicitly triggered.


10041-10058: Well-structured dropdown configuration for run behavior

The dropdown implementation includes clear labels and helpful subtext that explains the behavior differences to users. The configuration properly uses the new string enum values.


10415-10415: Consistent default configuration for JS actions

All JS actions have been correctly configured with "MANUAL" as the default run behavior, maintaining consistent behavior across the application.

Also applies to: 10465-10465, 10549-10549, 10599-10599

app/client/src/actions/pluginActionActions.ts (3)

23-23: New import for action execution behavior type added.

The ActionRunBehaviourType import properly supports the migration from boolean to string-based execution behavior.


355-366: Function renamed to reflect the new run behavior concept.

The action creator has been properly renamed from setActionsToExecuteOnPageLoad to setActionsRunBehavior with updated payload structure to match the new behavior model. This is consistent with the codebase-wide migration from boolean flags to a more flexible string-based approach.


368-380: Function renamed to reflect the new run behavior concept for JS actions.

Similar to the previous change, this action creator has been renamed from setJSActionsToExecuteOnPageLoad to setJSActionsRunBehavior with updated payload structure. The type name in the return object is properly updated to SET_JS_ACTION_RUN_BEHAVIOR.

app/client/src/ce/reducers/entityReducers/jsActionsReducer.tsx (3)

11-11: Import for ActionRunBehaviourType added.

The necessary type import supports the migration from boolean to string-based execution behavior in the reducer.


364-392: Updated reducer handler for function run behavior.

The reducer now correctly handles the UPDATE_FUNCTION_RUN_BEHAVIOR_SUCCESS action by setting the runBehavior property instead of toggling executeOnLoad. The action payload structure has been updated to include the new typed property.


393-420: Updated reducer handler for setting JS action run behavior.

The reducer now correctly handles the SET_JS_ACTION_RUN_BEHAVIOR action by setting the runBehavior property on the affected actions. The code maintains the same structure and logic as before but with the updated property name.

app/client/cypress/support/Pages/JSEditor.ts (5)

53-57: Updated selectors for run behavior UI.

The selectors have been updated to target the new combobox input instead of the previous toggle switch, reflecting the UI changes from a boolean toggle to a dropdown selection.


59-59: Changed visibility of _jsObjName from private to public.

Making this property public allows other components to access the JavaScript object name selector directly, which improves reusability.


98-99: Added selector for dropdown options.

This selector supports the UI changes by providing a way to target specific dropdown options based on the run behavior value.


301-311: Updated verification method for async function settings.

The method now accepts and verifies string-based run behavior values instead of boolean states, aligning with the new dropdown-based UI component.


313-327: ⚠️ Potential issue

Updated method to enable/disable async function settings.

Modified to work with the dropdown selection UI instead of toggles. The method now clicks the combobox and selects the appropriate option based on the provided run behavior value.

Avoid using agHelper.Sleep() in line 326 as it introduces unnecessary wait time.

Apply this change to eliminate the hardcoded wait:

  // Return to code tab
  this.toolbar.toggleSettings();
- this.agHelper.Sleep();

Likely an incorrect or invalid review comment.

app/client/src/sagas/ActionSagas.ts (4)

150-150: Imported ActionRunBehaviourType for strong typing.

This import properly supports the migration from boolean to string-based execution behavior in the saga.


1042-1052: Updated property check in setActionPropertySaga.

The saga now checks for the "runBehavior" property instead of "executeOnLoad" and dispatches the appropriate action with the new property name. This properly handles the string-based run behavior values.


1064-1089: Function renamed to reflect new run behavior concept.

The saga has been renamed from toggleActionExecuteOnLoadSaga to updateActionRunBehaviorSaga with updated parameter types and API call to match the new behavior model. The success and error action types have been updated accordingly.


1269-1271: Updated watcher saga registration.

The watcher saga now listens for the correct action type UPDATE_ACTION_RUN_BEHAVIOR_INIT and invokes the renamed saga function.

app/client/cypress/support/Pages/ApiPage.ts (4)

107-109: Appropriate use of locators for the new dropdown UI control.

These new locators are well-defined for interacting with the run behavior dropdown, following the project's locator naming conventions.


278-289: Refactored method to use string-based run behavior instead of boolean toggle.

The ToggleOnPageLoadRun method has been effectively updated to use the new dropdown-based UI control with string literals, replacing the previous boolean toggle approach.


513-522: Similar pattern applied to JSObject run behavior toggle method.

This method follows the same pattern as ToggleOnPageLoadRun, ensuring consistency in the API for both regular and JS actions.


524-532: Consistent implementation in clickSettingIcon method.

The implementation maintains consistency with the other methods, following the same pattern for setting run behavior via the dropdown.

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

104-104: Added import for the new run behavior type.

Correctly imports the required type definition for the string-based run behavior.


786-797: Updated property checks and action dispatch for new run behavior model.

The function property saga now correctly checks for "runBehavior" property and dispatches the appropriate action with the string-based value.


850-863: Refactored saga for updating function run behavior.

The saga has been properly renamed and updated to use the new string-based model, with parameters and API calls adjusted accordingly.


867-874: Correctly updated success action type and payload structure.

The success handling dispatch uses the new action type and properly includes the runBehavior in the payload.


877-881: Updated error action type for run behavior.

Error handling has been updated to use the new error action type consistent with the rename from toggle to run behavior.


947-949: Updated root saga watcher to listen for new action type.

The takeLatest effect has been properly updated to listen for the new UPDATE_FUNCTION_RUN_BEHAVIOR_INIT action type.

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

69-72: Added new action types for JS editor run behavior.

The appropriate Redux action types have been added to support the migration from boolean toggle to string-based run behavior for JS functions.


87-87: Added corresponding error type for JS editor run behavior.

Error action type properly added for handling run behavior update failures.


808-811: Added action types for general action run behavior.

These action types complete the model change by providing the needed constants for regular actions in addition to JS functions.


824-824: Added corresponding error type for action run behavior.

Error action type consistently added for regular actions to match the pattern used with JS functions.

@ankitakinger ankitakinger changed the base branch from release to feat/reactive-actions-run-behaviour April 30, 2025 18:10
@ankitakinger ankitakinger merged commit c5d2f5d into feat/reactive-actions-run-behaviour Apr 30, 2025
4 checks passed
@ankitakinger ankitakinger deleted the fix/some-more-cypress branch April 30, 2025 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Core Query Execution Issues related to the execution of all queries IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product Integrations Product Issues related to a specific integration ok-to-test Required label for CI potential-duplicate This label marks issues that are potential duplicates of already open issues Query Settings Issues related to the settings of all queries Query Widgets & IDE Pod All issues related to Query, JS, Eval, Widgets & IDE skip-changelog Adding this label to a PR prevents it from being listed in the changelog Task A simple Todo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task]: Fix any cypress or unit test cases that fail with update of references
2 participants