-
Notifications
You must be signed in to change notification settings - Fork 4.2k
chore: Removing unnecessary code and keeping the logic same for plugin based and other action settings only on frontend #40629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Removing unnecessary code and keeping the logic same for plugin based and other action settings only on frontend #40629
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (2)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis change migrates the action execution trigger mechanism across the codebase from a boolean Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI (Dropdown)
participant Redux Store
participant Backend API
participant DB
User->>UI (Dropdown): Selects "Run behaviour" option
UI (Dropdown)->>Redux Store: Dispatch update runBehaviour action
Redux Store->>Backend API: PUT /runBehaviour/{actionId} with behaviour
Backend API->>DB: Update action.runBehaviour
DB-->>Backend API: Persisted action with new runBehaviour
Backend API-->>Redux Store: Updated action data
Redux Store-->>UI (Dropdown): Update UI with new runBehaviour
Possibly related PRs
Suggested reviewers
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
Documentation and Community
|
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/14930622836. |
Deploy-Preview-URL: https://ce-40629.dp.appsmith.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🔭 Outside diff range comments (16)
app/client/cypress/e2e/Regression/ClientSide/PublishedApps/PublishedModeToastToggle_Spec.ts (1)
94-94
: 🛠️ Refactor suggestionRemove explicit sleep.
Using
agHelper.Sleep()
violates the Cypress best practices mentioned in the coding guidelines. Replace with proper Cypress waiting mechanisms.- _.agHelper.Sleep(2000); + _.agHelper.WaitUntilToastDisappear();app/client/cypress/e2e/Regression/ServerSide/Params/PassingParams_Spec.ts (10)
92-92
: 🛠️ Refactor suggestionRemove usage of
agHelper.Sleep()
.According to the coding guidelines for Cypress tests, we should avoid using
agHelper.Sleep()
as it introduces unnecessary waits that can make tests flaky or slow.-agHelper.Sleep(500); +agHelper.WaitUntilToastDisappear();
109-109
: 🛠️ Refactor suggestionRemove usage of
agHelper.Sleep()
.Replace the hardcoded sleep with a more reliable wait mechanism.
-agHelper.Sleep(500); +agHelper.WaitUntilToastDisappear();
125-125
: 🛠️ Refactor suggestionRemove usage of
agHelper.Sleep()
.Remove this hardcoded wait per Cypress best practices.
-agHelper.Sleep(500); +agHelper.WaitUntilToastDisappear();
141-141
: 🛠️ Refactor suggestionRemove usage of
agHelper.Sleep()
.Use a deterministic wait instead of a fixed sleep time.
-agHelper.Sleep(500); +agHelper.WaitUntilToastDisappear();
157-157
: 🛠️ Refactor suggestionRemove usage of
agHelper.Sleep()
.Replace sleep with an appropriate wait condition.
-agHelper.Sleep(500); +agHelper.WaitUntilToastDisappear();
173-173
: 🛠️ Refactor suggestionRemove usage of
agHelper.Sleep()
.Eliminate fixed wait time in favor of an explicit wait.
-agHelper.Sleep(500); +agHelper.WaitUntilToastDisappear();
189-189
: 🛠️ Refactor suggestionRemove usage of
agHelper.Sleep()
.Replace with a wait that's tied to application state.
-agHelper.Sleep(500); +agHelper.WaitUntilToastDisappear();
205-205
: 🛠️ Refactor suggestionRemove usage of
agHelper.Sleep()
.Eliminate fixed wait and use a more reliable approach.
-agHelper.Sleep(500); +agHelper.WaitUntilToastDisappear();
221-221
: 🛠️ Refactor suggestionRemove usage of
agHelper.Sleep()
.Use an explicit wait condition instead of a sleep.
-agHelper.Sleep(500); +agHelper.WaitUntilToastDisappear();
240-240
: 🛠️ Refactor suggestionRemove usage of
agHelper.Sleep()
.Replace with an appropriate wait method.
-agHelper.Sleep(500); +agHelper.WaitUntilToastDisappear();app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/SetTimeout_spec.ts (2)
190-196
: 🛠️ Refactor suggestionUse proper assertion syntax rather than string-based checks.
The test uses string-based assertions like
agHelper.AssertContains()
and directly checks interception data. According to the coding guidelines, you should use multiple assertions with proper expect statements.Consider refactoring to use proper Cypress assertions:
-cy.wait("@postExecute").then((interception: any) => { - userName = JSON.stringify( - interception.response.body.data.body[0].name, - ).replace(/['"]+/g, ""); - agHelper.AssertContains(userName); -}); +cy.wait("@postExecute").then((interception: any) => { + const userName = JSON.stringify( + interception.response.body.data.body[0].name, + ).replace(/['"]+/g, ""); + cy.contains(userName).should("exist"); + cy.contains(userName).should("be.visible"); +});Also applies to: 202-207, 235-240
35-35
: 💡 Verification agent🧩 Analysis chain
Multiple instances of agHelper.Sleep() violate coding guidelines.
The test contains numerous uses of
agHelper.Sleep()
which contradicts the coding guidelines that explicitly prohibit this approach for handling test timing.Consider replacing with Cypress's built-in waiting mechanisms:
Also applies to: 37-37, 65-65, 68-68, 93-93, 95-95, 117-117, 123-123, 148-148, 198-198, 201-201, 233-233, 234-234
🏁 Script executed:
#!/bin/bash # Count instances of agHelper.Sleep() in Cypress tests echo "Number of agHelper.Sleep() calls in this file:" grep -c "agHelper.Sleep" app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/SetTimeout_spec.ts # Find documentation on recommended alternatives echo "Checking project for alternative waiting pattern examples:" rg -A 3 "cy\.wait\('@" --glob "app/client/cypress/e2e/**/*.ts" | grep -v "SetTimeout_spec" | head -n 10Length of output: 448
Replace fixed sleeps with Cypress’s built-in waiting mechanisms
The file
app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/SetTimeout_spec.ts
currently contains 16 calls toagHelper.Sleep()
, which conflicts with our testing guidelines. Instead of hard‐coded delays, please:
- Use
cy.intercept()
to stub or listen for network requests and thency.wait('@alias')
- Leverage Cypress’s automatic retry-ability via assertions, e.g.:
cy.get('[data-cy=submit]').click(); cy.get('[data-cy=result]') .should('be.visible') // retries until element appears .and('contain', 'Success');- Reserve
cy.wait(duration)
only for very short, unavoidable pauses (e.g.,<100ms
) and document the justification.Next steps:
- Identify each
agHelper.Sleep(<ms>)
call (lines 35, 37, 65, 68, 93, 95, 117, 123, 148, 198, 201, 233, 234, etc.) and replace it with one of the patterns above.- Add the necessary
cy.intercept()
aliases for backend calls in this spec or shared support files.- Remove all remaining
agHelper.Sleep()
invocations once proper waits are in place.This will make the tests faster, more reliable, and compliant with our guidelines.
app/client/cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters2_spec.ts (2)
108-108
:⚠️ Potential issueReplace agHelper.Sleep() with proper waiting strategy
Using
agHelper.Sleep()
violates the Cypress best practices and coding guidelines. Sleep statements make tests flaky and slow.Consider replacing with a proper waiting strategy:
-agHelper.Sleep(3000); //for the Api to run & new value to be set, for CI runs +agHelper.WaitUntilToastDisappear(); // or specific element visibility assertion
250-252
: 🛠️ Refactor suggestionAvoid using afterEach in test cases
Using
afterEach
violates the Cypress coding guidelines for this project.- afterEach(() => { - deployMode.NavigateBacktoEditor(); - }); + // Add this at the end of each test instead + // For example, at the end of the last test: + // deployMode.NavigateBacktoEditor();app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/JSFunctionExecution_spec.ts (1)
175-175
:⚠️ Potential issueAvoid using
agHelper.Sleep()
in Cypress tests.This violates the coding guideline that explicitly states to avoid using
agHelper.Sleep()
. Replace with proper Cypress waiting mechanisms likecy.wait()
for routes orcy.should()
for assertions with retry logic.- agHelper.Sleep(2000); // Giving more time for parsing to reduce flakiness! + // Wait for a specific element or state instead + agHelper.WaitUntilAllToastsDisappear(); + // Or use a more specific element condition + cy.get(locators._parseErrorCallout).should('not.exist', { timeout: 2000 });
🧹 Nitpick comments (5)
app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts (1)
145-145
: Parameter update for manual execution mode is correct.Updated to use the string parameter
"Manual"
rather than a boolean value, consistent with the codebase refactoring to use descriptive string values for execution behavior.Note: The test contains
agHelper.Sleep()
at line 152, which should be avoided according to the coding guidelines. Consider using Cypress's built-in waiting mechanisms instead.app/client/src/ce/sagas/PageSagas.tsx (1)
545-547
: Potential optional chaining opportunity.The code could be improved with optional chaining here. Also, it now uses
setJSActionsRunBehaviour
for JS actions.- if (jsActions && jsActions.length) { + if (jsActions?.length) { yield put(setJSActionsRunBehaviour(jsActions)); }🧰 Tools
🪛 Biome (1.9.4)
[error] 545-545: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx (1)
59-74
: Dependency list may create avoidable renders
useCallback
depends on the wholeprops
object, causing the callback to be recreated on any prop change (even unrelated ones).
Destructure only what’s required (action
,onUpdateSettings
) to keep referential stability and avoid needless re-renders of child components.app/client/cypress/fixtures/setIntervalApp.json (1)
1-1
: Full fixture migration fromexecuteOnLoad
torunBehaviour
This update replaces the legacy boolean flag with the string-basedrunBehaviour
for all API and JS actions. Spot-checked samples show"MANUAL"
is applied consistently.Consider adding a JSON‐schema validation or a grep check in the CI pipeline to catch any stray
executeOnLoad
occurrences in fixtures.app/client/src/sagas/JSPaneSagas.ts (1)
850-882
: Function renamed and updated to handle run behavior.The saga has been properly renamed and refactored to work with the new run behavior pattern, updating both the function signature and the API calls.
Consider standardizing on either "behavior" or "behaviour" spelling throughout the codebase. There's inconsistency between function name
updateFunctionRunBehaviourSaga
(using British spelling) and some action types that use American spelling.-function* updateFunctionRunBehaviourSaga( +function* updateFunctionRunBehaviorSaga(
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (107)
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/Api_withPageload_Input_TestData.json
(1 hunks)app/client/cypress/fixtures/CommunityIssuesExport.json
(54 hunks)app/client/cypress/fixtures/ContextSwitching.json
(8 hunks)app/client/cypress/fixtures/DeleteGitRepos.json
(1 hunks)app/client/cypress/fixtures/ImportAppAllAccess.json
(1 hunks)app/client/cypress/fixtures/ImportAppReadAccess.json
(1 hunks)app/client/cypress/fixtures/ImportAppReadWriteAccess.json
(1 hunks)app/client/cypress/fixtures/ImportAppSelectedAccess.json
(1 hunks)app/client/cypress/fixtures/ImportApps/JSOnLoadFailureTest.json
(2 hunks)app/client/cypress/fixtures/ImportApps/JSOnLoadImport.json
(6 hunks)app/client/cypress/fixtures/JSObjectMutationTestApp.json
(42 hunks)app/client/cypress/fixtures/PartialImportAppNegative.json
(2 hunks)app/client/cypress/fixtures/PartialImportExport/ImportExport.json
(1 hunks)app/client/cypress/fixtures/PartialImportExport/PartialImportExportSampleApp.json
(6 hunks)app/client/cypress/fixtures/PartialImportExport/PartialQueryExport.json
(1 hunks)app/client/cypress/fixtures/PartialImportExport/QueriesExportedOnly.json
(1 hunks)app/client/cypress/fixtures/PropertyPaneSlashMenuBindings.json
(8 hunks)app/client/cypress/fixtures/SampleAppIDETest.json
(8 hunks)app/client/cypress/fixtures/Table/TableV2FilterImportApp.json
(2 hunks)app/client/cypress/fixtures/TableFilterImportApp.json
(2 hunks)app/client/cypress/fixtures/TableMigrationAppExported.json
(46 hunks)app/client/cypress/fixtures/apiMultiPartData.json
(16 hunks)app/client/cypress/fixtures/clearIntervalApp.json
(1 hunks)app/client/cypress/fixtures/executeAction.json
(4 hunks)app/client/cypress/fixtures/exportedApp.json
(4 hunks)app/client/cypress/fixtures/forkNonSignedInUser.json
(1 hunks)app/client/cypress/fixtures/forkedApp.json
(4 hunks)app/client/cypress/fixtures/gitImport.json
(6 hunks)app/client/cypress/fixtures/jsObjectTesting.json
(38 hunks)app/client/cypress/fixtures/library_export.json
(1 hunks)app/client/cypress/fixtures/modalWidgetTestApp.json
(2 hunks)app/client/cypress/fixtures/mongo_GET_Actions.json
(4 hunks)app/client/cypress/fixtures/mySQL_GET_Actions.json
(4 hunks)app/client/cypress/fixtures/one_postgres.json
(1 hunks)app/client/cypress/fixtures/resetWidgetBug33601.json
(1 hunks)app/client/cypress/fixtures/setIntervalApp.json
(1 hunks)app/client/cypress/locators/apiWidgetslocator.json
(0 hunks)app/client/cypress/support/Pages/ApiPage.ts
(3 hunks)app/client/cypress/support/Pages/JSEditor.ts
(3 hunks)app/client/cypress/support/commands.js
(0 hunks)app/client/package.json
(1 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/entities/FeatureFlag.ts
(2 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/ActionConstants.tsx
(2 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/PluginSettings.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/sagas/PluginSagas.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)
⛔ Files not processed due to max files limit (28)
- app/client/src/utils/JSPaneUtils.tsx
- app/client/src/utils/NavigationSelector/JsChildren.ts
- app/client/src/utils/NavigationSelector/WidgetChildren.ts
- app/client/src/utils/NavigationSelector/common.ts
- app/client/src/utils/PluginUtils.ts
- app/client/test/factories/Actions/API.ts
- app/client/test/factories/Actions/GoogleSheetFactory.ts
- app/client/test/factories/Actions/JSObject.ts
- app/client/test/factories/Actions/Postgres.ts
- app/client/test/factories/MockPluginsState.ts
- app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/RunBehaviorEnum.java
- app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/ce/ActionCE_DTO.java
- app/server/appsmith-plugins/amazons3Plugin/src/main/resources/setting.json
- app/server/appsmith-plugins/anthropicPlugin/src/main/resources/setting.json
- app/server/appsmith-plugins/appsmithAiPlugin/src/main/resources/setting.json
- app/server/appsmith-plugins/firestorePlugin/src/main/resources/setting.json
- app/server/appsmith-plugins/googleAiPlugin/src/main/resources/setting.json
- app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/setting.json
- app/server/appsmith-plugins/mongoPlugin/src/main/resources/setting.json
- app/server/appsmith-plugins/mssqlPlugin/src/main/resources/setting.json
- app/server/appsmith-plugins/mysqlPlugin/src/main/resources/setting.json
- app/server/appsmith-plugins/openAiPlugin/src/main/resources/setting.json
- app/server/appsmith-plugins/oraclePlugin/src/main/resources/setting.json
- app/server/appsmith-plugins/postgresPlugin/src/main/resources/setting.json
- app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/ActionControllerCE.java
- app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/LayoutActionServiceCE.java
- app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/LayoutActionServiceCEImpl.java
- app/server/appsmith-server/src/test/java/com/appsmith/server/services/LayoutActionServiceTest.java
💤 Files with no reviewable changes (3)
- app/client/cypress/locators/apiWidgetslocator.json
- app/client/src/PluginActionEditor/constants/PluginActionConstants.ts
- app/client/cypress/support/commands.js
🧰 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/BugTests/Bug14987_spec.js
app/client/cypress/e2e/Regression/ClientSide/PublishedApps/PublishedModeToastToggle_Spec.ts
app/client/cypress/e2e/Regression/ClientSide/JSObject/JSObject_Tests_spec.ts
app/client/cypress/fixtures/ImportAppSelectedAccess.json
app/client/cypress/fixtures/executeAction.json
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/ServerSide/ApiTests/API_MultiPart_Spec.ts
app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad4_Spec.ts
app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad2_Spec.ts
app/client/cypress/fixtures/exportedApp.json
app/client/cypress/e2e/Regression/ClientSide/ActionExecution/FrameworkFunctions_ShowCloseModalFunctions_spec.ts
app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/SetTimeout_spec.ts
app/client/cypress/e2e/Regression/ServerSide/Datasources/Oracle_Spec.ts
app/client/cypress/fixtures/ImportApps/JSOnLoadFailureTest.json
app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug20275_Spec.js
app/client/cypress/fixtures/forkedApp.json
app/client/cypress/fixtures/TableFilterImportApp.json
app/client/cypress/fixtures/PartialImportExport/PartialQueryExport.json
app/client/cypress/fixtures/jsObjectTesting.json
app/client/cypress/fixtures/PropertyPaneSlashMenuBindings.json
app/client/cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters2_spec.ts
app/client/cypress/fixtures/forkNonSignedInUser.json
app/client/cypress/fixtures/Api_withPageload_Input_TestData.json
app/client/cypress/fixtures/ContextSwitching.json
app/client/cypress/fixtures/mySQL_GET_Actions.json
app/client/cypress/fixtures/mongo_GET_Actions.json
app/client/cypress/e2e/Regression/ClientSide/SetProperty/SetOptions_Spec.ts
app/client/cypress/fixtures/apiMultiPartData.json
app/client/cypress/fixtures/Table/TableV2FilterImportApp.json
app/client/cypress/fixtures/one_postgres.json
app/client/cypress/fixtures/PartialImportExport/ImportExport.json
app/client/cypress/fixtures/SampleAppIDETest.json
app/client/cypress/fixtures/gitImport.json
app/client/cypress/fixtures/ImportApps/JSOnLoadImport.json
app/client/cypress/fixtures/PartialImportExport/PartialImportExportSampleApp.json
app/client/cypress/fixtures/CommunityIssuesExport.json
app/client/cypress/e2e/Regression/ServerSide/Params/PassingParams_Spec.ts
app/client/cypress/fixtures/ImportAppAllAccess.json
app/client/cypress/fixtures/ImportAppReadWriteAccess.json
app/client/cypress/fixtures/library_export.json
app/client/cypress/fixtures/ImportAppReadAccess.json
app/client/cypress/fixtures/PartialImportExport/QueriesExportedOnly.json
app/client/cypress/fixtures/JSObjectMutationTestApp.json
app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/JSFunctionExecution_spec.ts
app/client/cypress/fixtures/setIntervalApp.json
app/client/cypress/fixtures/TableMigrationAppExported.json
app/client/cypress/fixtures/clearIntervalApp.json
app/client/cypress/fixtures/PartialImportAppNegative.json
app/client/cypress/support/Pages/JSEditor.ts
app/client/cypress/support/Pages/ApiPage.ts
app/client/cypress/fixtures/modalWidgetTestApp.json
app/client/cypress/fixtures/resetWidgetBug33601.json
app/client/cypress/fixtures/DeleteGitRepos.json
🧬 Code Graph Analysis (19)
app/client/cypress/e2e/Regression/ClientSide/JSObject/JSObject_Tests_spec.ts (1)
app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug20275_Spec.js (1)
jsEditor
(7-12)
app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts (1)
app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts (2)
RUN_BEHAVIOR_CONFIG_PROPERTY
(3-3)RUN_BEHAVIOR_VALUES
(5-24)
app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts (1)
app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts (2)
RUN_BEHAVIOR_CONFIG_PROPERTY
(3-3)RUN_BEHAVIOR_VALUES
(5-24)
app/client/src/api/PageApi.tsx (1)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1)
ActionRunBehaviourType
(11-11)
app/client/cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters2_spec.ts (1)
app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug20275_Spec.js (1)
jsEditor
(7-12)
app/client/src/constants/AppsmithActionConstants/ActionConstants.tsx (1)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1)
PluginActionSettingsConfig
(26-30)
app/client/src/pages/Editor/JSEditor/JSEditorToolbar/types.ts (1)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1)
ActionRunBehaviourType
(11-11)
app/client/src/sagas/PluginSagas.ts (5)
app/client/src/utils/PluginUtils.ts (1)
updatePluginRunBehaviourForPluginSettings
(6-45)app/client/src/constants/AppsmithActionConstants/ActionConstants.tsx (1)
defaultActionSettings
(170-182)app/client/src/api/types.ts (1)
ApiResponse
(14-18)app/client/src/api/PluginApi.ts (1)
PluginFormPayload
(13-25)app/client/src/sagas/ErrorSagas.tsx (1)
validateResponse
(100-155)
app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts (1)
app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts (2)
RUN_BEHAVIOR_CONFIG_PROPERTY
(3-3)RUN_BEHAVIOR_VALUES
(5-24)
app/client/src/api/ActionAPI.tsx (1)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1)
ActionRunBehaviourType
(11-11)
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/ce/reducers/entityReducers/actionsReducer.tsx (2)
app/client/src/ce/constants/ReduxActionConstants.tsx (1)
ReduxActionTypes
(1282-1325)app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1)
ActionRunBehaviourType
(11-11)
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/entities/Action/index.ts (1)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1)
ActionRunBehaviourType
(11-11)
app/client/src/entities/DataTree/dataTreeTypes.ts (1)
app/client/src/ce/entities/DataTree/types.ts (1)
EntityTypeValue
(37-37)
app/client/src/actions/pluginActionActions.ts (2)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1)
ActionRunBehaviourType
(11-11)app/client/src/ce/constants/ReduxActionConstants.tsx (1)
ReduxActionTypes
(1282-1325)
app/client/src/ce/reducers/entityReducers/jsActionsReducer.tsx (2)
app/client/src/ce/constants/ReduxActionConstants.tsx (1)
ReduxActionTypes
(1282-1325)app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1)
ActionRunBehaviourType
(11-11)
app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/JSFunctionExecution_spec.ts (1)
app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug20275_Spec.js (1)
jsEditor
(7-12)
app/client/src/sagas/ActionExecution/PluginActionSaga.ts (2)
app/client/src/ce/reducers/entityReducers/actionsReducer.tsx (1)
ActionData
(18-22)app/client/src/ce/selectors/entitiesSelector.ts (1)
getCurrentActions
(698-706)
🪛 Biome (1.9.4)
app/client/src/ce/sagas/PageSagas.tsx
[error] 542-542: 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] 545-545: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
⏰ Context from checks skipped due to timeout of 90000ms (61)
- GitHub Check: perform-test / ci-test / ci-test (59)
- GitHub Check: perform-test / ci-test / ci-test (58)
- GitHub Check: perform-test / ci-test / ci-test (57)
- GitHub Check: perform-test / ci-test / ci-test (56)
- GitHub Check: perform-test / ci-test / ci-test (55)
- GitHub Check: perform-test / ci-test / ci-test (54)
- GitHub Check: perform-test / ci-test / ci-test (53)
- GitHub Check: perform-test / ci-test / ci-test (52)
- GitHub Check: perform-test / ci-test / ci-test (51)
- GitHub Check: perform-test / ci-test / ci-test (50)
- GitHub Check: perform-test / ci-test / ci-test (49)
- GitHub Check: perform-test / ci-test / ci-test (48)
- GitHub Check: perform-test / ci-test / ci-test (47)
- GitHub Check: perform-test / ci-test / ci-test (46)
- GitHub Check: perform-test / ci-test / ci-test (45)
- GitHub Check: perform-test / ci-test / ci-test (44)
- GitHub Check: perform-test / ci-test / ci-test (43)
- GitHub Check: perform-test / ci-test / ci-test (42)
- GitHub Check: perform-test / ci-test / ci-test (41)
- GitHub Check: perform-test / ci-test / ci-test (40)
- GitHub Check: perform-test / ci-test / ci-test (39)
- GitHub Check: perform-test / ci-test / ci-test (38)
- GitHub Check: perform-test / ci-test / ci-test (37)
- GitHub Check: perform-test / ci-test / ci-test (36)
- GitHub Check: perform-test / ci-test / ci-test (35)
- GitHub Check: perform-test / ci-test / ci-test (34)
- GitHub Check: perform-test / ci-test / ci-test (33)
- GitHub Check: perform-test / ci-test / ci-test (32)
- GitHub Check: perform-test / ci-test / ci-test (31)
- GitHub Check: perform-test / ci-test / ci-test (30)
- GitHub Check: perform-test / ci-test / ci-test (29)
- GitHub Check: perform-test / ci-test / ci-test (28)
- GitHub Check: perform-test / ci-test / ci-test (27)
- GitHub Check: perform-test / ci-test / ci-test (26)
- GitHub Check: perform-test / ci-test / ci-test (25)
- GitHub Check: perform-test / ci-test / ci-test (24)
- GitHub Check: perform-test / ci-test / ci-test (23)
- GitHub Check: perform-test / ci-test / ci-test (22)
- GitHub Check: perform-test / ci-test / ci-test (21)
- GitHub Check: perform-test / ci-test / ci-test (20)
- GitHub Check: perform-test / ci-test / ci-test (19)
- GitHub Check: perform-test / ci-test / ci-test (18)
- GitHub Check: perform-test / ci-test / ci-test (17)
- GitHub Check: perform-test / ci-test / ci-test (16)
- GitHub Check: perform-test / ci-test / ci-test (15)
- GitHub Check: perform-test / ci-test / ci-test (14)
- GitHub Check: perform-test / ci-test / ci-test (13)
- GitHub Check: perform-test / ci-test / ci-test (12)
- GitHub Check: perform-test / ci-test / ci-test (11)
- GitHub Check: perform-test / ci-test / ci-test (10)
- GitHub Check: perform-test / ci-test / ci-test (9)
- GitHub Check: perform-test / ci-test / ci-test (8)
- GitHub Check: perform-test / ci-test / ci-test (7)
- GitHub Check: perform-test / ci-test / ci-test (6)
- GitHub Check: perform-test / ci-test / ci-test (5)
- GitHub Check: perform-test / ci-test / ci-test (4)
- GitHub Check: perform-test / ci-test / ci-test (3)
- GitHub Check: perform-test / ci-test / ci-test (2)
- GitHub Check: perform-test / ci-test / ci-test (1)
- GitHub Check: perform-test / ci-test / ci-test (0)
- GitHub Check: server-unit-tests / server-unit-tests
🔇 Additional comments (248)
app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx (1)
16-16
: Import path updated correctly
ImportingTHEME
from the centralizedPluginActionTypes
aligns with the new type-based structure and removes the stale constant reference.app/client/src/ce/utils/moduleInstanceNavigationData.ts (1)
2-2
: Centralized type import
Switching to the sharedEntityNavigationData
fromdataTreeTypes
removes duplicate definitions and ensures consistency across navigation utilities.app/client/package.json (1)
430-430
: No-op formatting change
This newline addition is purely cosmetic and can be safely ignored.app/client/src/components/editorComponents/CodeEditor/MarkHelpers/entityMarker.ts (1)
4-4
: Updated type source
ImportingEntityNavigationData
andNavigationData
from the centralizeddataTreeTypes
improves type safety and consolidates definitions.app/client/src/ce/components/editorComponents/GPT/index.tsx (1)
6-6
: Consistent type import
Usingentities/DataTree/dataTreeTypes
forEntityNavigationData
matches the broader refactor and avoids stale type references.app/client/src/components/editorComponents/CodeEditor/generateQuickCommands.tsx (1)
17-17
: Import path updated for NavigationData type.The import path has been updated to get the NavigationData type from a centralized location, which is a good practice for maintaining type definitions.
app/client/cypress/e2e/Regression/ClientSide/PublishedApps/PublishedModeToastToggle_Spec.ts (2)
25-25
: Update ToggleOnPageLoadRun parameter to use string-based value.Updated from boolean to string-based parameter to align with the new run behavior model.
32-32
: Update ToggleOnPageLoadRun parameter to use string-based value.Updated from boolean to string-based parameter to align with the new run behavior model.
app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/APIOnLoad_Spec.ts (1)
53-53
: Update ToggleOnPageLoadRun parameter to use string-based value.Updated from boolean to string-based parameter to align with the new run behavior model.
app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug14987_spec.js (1)
35-35
: Updated selector text to match new UI label.The CSS selector text has been updated from "Run the query on page load" to "Run behavior" to match the new dropdown-based UI control.
app/client/src/components/editorComponents/CodeEditor/index.tsx (1)
125-125
: Good import refactoring - centralizing type definitions.The change moves
EntityNavigationData
type import from a local definition in selectors to a centralized location in the data tree types. This aligns with best practices for type organization.app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad4_Spec.ts (1)
37-42
: Updated expected values to match the new run behavior model.The test was updated to verify JS function settings with string-based run behavior values (
"Manual"
) instead of boolean flags, correctly aligning with the codebase migration fromexecuteOnLoad
torunBehaviour
.app/client/src/ce/utils/autocomplete/EntityDefinitions.test.ts (1)
47-47
: Test fixtures updated to use string-based run behavior model.The test data was properly updated to use
runBehaviour: "MANUAL"
instead of booleanexecuteOnLoad
, reflecting the application's newer execution control model.Also applies to: 89-89
app/client/src/utils/DynamicBindingUtils.test.ts (1)
123-123
: Test data updated to use new run behavior property.The Action test object correctly uses the new
runBehaviour: "MANUAL"
property instead of a booleanexecuteOnLoad
flag, maintaining consistency with the codebase migration.app/client/src/components/editorComponents/CodeEditor/commandsHelper.ts (1)
18-21
: Type import path updated correctly.The import for
EntityNavigationData
andNavigationData
types has been updated to use the centralized location inentities/DataTree/dataTreeTypes
, which aligns with the refactoring goal of consolidating these types.app/client/cypress/e2e/Regression/ServerSide/Params/PassingParams_Spec.ts (1)
79-79
: Boolean parameter replaced with descriptive string value.The call to
apiPage.ToggleOnPageLoadRun()
has been updated to use"Manual"
instead of a boolean value, which is part of the transition fromexecuteOnLoad
to therunBehaviour
string-based property.app/client/cypress/e2e/Regression/ClientSide/JSObject/JSObject_Tests_spec.ts (1)
36-36
: Function signature updated to use string-based run behavior.The call to
EnableDisableAsyncFuncSettings
has been properly updated to include the"On page load"
parameter, replacing the previous boolean flag approach with a more descriptive string value.app/client/cypress/fixtures/PartialImportExport/PartialQueryExport.json (1)
1-1
: Boolean property replaced with string-based run behavior.The fixture has been updated to replace
"executeOnLoad": true
with"runBehaviour": "ON_PAGE_LOAD"
, which aligns with the broader refactoring effort to use a more descriptive string-based approach for action execution behavior.app/client/cypress/e2e/Regression/ClientSide/ActionExecution/FrameworkFunctions_ShowCloseModalFunctions_spec.ts (1)
49-49
: Update to parameter type for run behavior setting looks good.The change to use a string parameter
"On page load"
rather than a boolean value aligns with the codebase refactoring fromexecuteOnLoad
booleans to the more descriptiverunBehaviour
string values.app/client/cypress/e2e/Regression/ServerSide/Datasources/Snowflake_Basic_Spec.ts (1)
168-168
: Parameter update to use string-based run behavior is correct.Updated to use the new string parameter
"On page load"
instead of a boolean value, consistent with the codebase refactoring to use descriptive string values for execution behavior.app/client/cypress/fixtures/one_postgres.json (1)
423-423
: Property refactoring from boolean to string-based enum is good.Changed from a boolean
executeOnLoad
property to a string-basedrunBehaviour
property with value"ON_PAGE_LOAD"
. This aligns with the broader refactoring of the execution behavior model across the codebase.app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/SetTimeout_spec.ts (1)
230-230
: Correct update to string-based run behavior parameter.The replacement of a boolean value with the string
"On page load"
is aligned with the broader refactoring from boolean flags to string-based run behavior properties.app/client/src/utils/JSPaneUtils.test.ts (1)
44-44
: Property update aligned with codebase refactoring.The replacement of all
executeOnLoad: false
properties withrunBehaviour: "MANUAL"
correctly implements the codebase-wide transition from boolean flags to a string-based enum for execution behavior.Also applies to: 154-154, 196-196, 280-280, 361-361, 472-472, 552-552, 627-627, 702-702, 757-757
app/client/src/pages/Editor/JSEditor/utils.test.ts (1)
9-9
: Clean implementation of the run behavior enumeration.The added import and updated property correctly use the typed enum
ActionRunBehaviour.MANUAL
instead of a boolean value, which improves type safety and readability.Also applies to: 48-48
app/client/src/components/editorComponents/CodeEditor/EditorConfig.ts (1)
3-6
: Improved import organization.Consolidating the imports to get both
DataTree
andEntityNavigationData
from the same module improves code organization and follows the centralized type definition pattern.app/client/cypress/fixtures/ImportApps/JSOnLoadFailureTest.json (2)
295-295
: ✅ Consistent runBehaviour update
The booleanexecuteOnLoad
has been correctly replaced with"runBehaviour": "ON_PAGE_LOAD"
for the unpublished JS action. This matches the new string-based execution model.
350-350
: ✅ Consistent runBehaviour update
The published action also uses"runBehaviour": "ON_PAGE_LOAD"
, ensuring both unpublished and published fixtures are aligned with the updated API.app/client/cypress/fixtures/PartialImportAppNegative.json (2)
405-405
: ✅ runBehaviour applied to API config
The API’s unpublished action now uses"runBehaviour": "ON_PAGE_LOAD"
, replacing the oldexecuteOnLoad
flag and conforming to the new fixture schema.
459-459
: ✅ runBehaviour applied to published action
The published API definition also reflects"runBehaviour": "ON_PAGE_LOAD"
, keeping published and unpublished states consistent.app/client/src/ce/constants/messages.ts (1)
2593-2595
: String update for run behavior dropdown reflects architecture changeThe string change from "Choose the functions to run on page load" to "Choose functions run behavior" reflects the transition from a boolean-based execution model to a more flexible string-based run behavior model.
app/client/cypress/e2e/Regression/ServerSide/Datasources/Oracle_Spec.ts (1)
470-470
: Parameter type change from boolean to string enumThe API method call has been updated to use the string value "Manual" instead of boolean false, which aligns with the codebase's transition to a string-based run behavior model.
app/client/src/entities/Action/actionProperties.test.ts (1)
13-13
: Property name and type update in test fixtureThe boolean
executeOnLoad
property has been replaced with the stringrunBehaviour: "MANUAL"
in the test fixture, aligning with the architectural change to use string enumerations for execution behavior.app/client/src/sagas/BuildingBlockSagas/tests/fixtures.ts (1)
132-132
: Updated run behavior property in test action fixtureChanged from boolean
executeOnLoad: true
to string-basedrunBehaviour: "ON_PAGE_LOAD"
, consistent with the architectural shift to use string enumerations for action execution behavior.app/client/src/components/editorComponents/utils.test.ts (2)
2-2
: Appropriate import for the ActionRunBehaviour enum.Correctly importing the ActionRunBehaviour enum from the PluginActionTypes module to support the test fixture's new run behavior property.
34-34
: Properly updated test fixture to use runBehaviour instead of executeOnLoad.The test fixture has been properly updated to use the new
runBehaviour
property with theActionRunBehaviour.MANUAL
value, replacing the deprecated booleanexecuteOnLoad
property.app/client/cypress/fixtures/PropertyPaneSlashMenuBindings.json (1)
468-468
: Properly replaced executeOnLoad with runBehaviour in all API configurations.All API action configurations have been consistently updated to use
"runBehaviour": "MANUAL"
instead of the deprecated"executeOnLoad": false
property, ensuring proper API behavior in test fixtures.Also applies to: 553-553, 638-638, 723-723, 808-808, 893-893, 978-978, 1063-1063
app/client/cypress/fixtures/TableFilterImportApp.json (1)
1476-1476
: Correctly updated to use ON_PAGE_LOAD behavior.Both unpublished and published actions were properly updated to use
"runBehaviour": "ON_PAGE_LOAD"
instead of the deprecated"executeOnLoad": true
, maintaining the original execution behavior intent.Also applies to: 1545-1545
app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts (2)
1-4
: Good modularization through importing constants.The code effectively imports run behavior constants from a central location, improving maintainability and consistency across the application.
12-16
: Improved UI with more granular run behavior options.The form configuration has been enhanced by:
- Updating the label to be more descriptive
- Using a dropdown instead of a switch
- Providing a default value of "MANUAL"
- Leveraging the shared options array for consistent behavior across the app
This change improves usability by offering more precise control over query execution behavior.
app/client/src/entities/Action/index.ts (2)
13-13
: New import added for ActionRunBehaviourTypeAdding the import for the new type that will be used to replace the boolean executeOnLoad property.
143-143
: Replaced boolean executeOnLoad with string enum runBehaviourThis change replaces the binary boolean property with a more descriptive string-based enum. This provides better type safety and allows for more execution behavior options beyond just true/false.
app/client/src/PluginActionEditor/transformers/RestActionTransformers.test.ts (1)
18-18
: Updated test fixture to use runBehaviour instead of executeOnLoadThe BASE_ACTION test fixture has been updated to use "MANUAL" instead of false for execution behavior, consistent with the type changes in the BaseAction interface.
app/client/src/pages/Editor/EntityNavigation/JSObjectsPane/index.ts (1)
84-85
: Updated property path check in navigation logicChanged the condition to check for "runBehaviour" instead of "executeOnLoad" in the property path to maintain proper tab navigation functionality.
app/client/cypress/fixtures/exportedApp.json (4)
494-494
: Changed DB action execution behavior from boolean to string enumUpdated DB action to use "ON_PAGE_LOAD" instead of true for consistent behavior with the new runBehaviour property.
549-549
: Changed JS action execution behavior from boolean to string enumUpdated JS action myFun1 to use "MANUAL" instead of false for consistent behavior with the new runBehaviour property.
624-624
: Changed API action execution behavior from boolean to string enumUpdated API action to use "ON_PAGE_LOAD" instead of true for consistent behavior with the new runBehaviour property.
679-679
: Changed JS action execution behavior from boolean to string enumUpdated JS action myFun2 to use "MANUAL" instead of false for consistent behavior with the new runBehaviour property.
app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad2_Spec.ts (1)
97-97
: Function updated to use string-based run behavior parameter.The
EnableDisableAsyncFuncSettings
call now correctly uses the string value"On page load"
instead of the booleantrue
, aligning with the new execution behavior model.app/client/src/components/formControls/utils.ts (1)
425-428
: Correctly excludes runBehaviour from automatic initial value setting.This condition prevents the
runBehaviour
property from having its initial value automatically set by theparseConfig
function, which is appropriate since run behavior settings likely need custom handling elsewhere.app/client/src/sagas/ActionExecution/PluginActionSaga.ts (2)
172-172
: Added import for ActionRunBehaviour enum.Properly imports the new enum type used for the string-based run behavior values.
1557-1566
: Updated clearTriggerActionResponse to use runBehaviour instead of executeOnLoad.The function now correctly uses the new string-based
runBehaviour
property with theON_PAGE_LOAD
enum value instead of the deprecated boolean flag, maintaining the original logic while adapting to the new execution model.app/client/cypress/fixtures/ContextSwitching.json (1)
791-791
: Consistently replaced executeOnLoad with runBehaviour across all action configurations.The fixture file has been thoroughly updated to replace all instances of the boolean
executeOnLoad: false
with the string-basedrunBehaviour: "MANUAL"
across REST APIs, GraphQL queries, JS functions, and database queries.Also applies to: 870-870, 925-925, 997-997, 1110-1110, 1167-1167, 1246-1246, 1300-1300
app/client/src/pages/Editor/JSEditor/JSEditorToolbar/types.ts (1)
3-3
: Type change improves code expressiveness.The change from
boolean | number
toActionRunBehaviourType
for thevalue
property is a good enhancement. This increases type safety by using a specific string-enum type instead of a generic union type, making the code more self-documenting and reducing potential runtime errors from incorrect value assignments.Also applies to: 6-6
app/client/cypress/fixtures/jsObjectTesting.json (1)
30135-30135
: Consistent JSON key replacement The migration from booleanexecuteOnLoad
to stringrunBehaviour
is correctly and uniformly applied across all entries. The chosen values (MANUAL
vsON_PAGE_LOAD
) align with the updated run behavior enum.Also applies to: 30193-30193, 30251-30251, 30309-30309, 30367-30367, 30425-30425, 30483-30483, 30541-30541, 30599-30599, 30657-30657, 30715-30715, 30773-30773, 30831-30831, 30889-30889, 30947-30947, 31005-31005, 31063-31063, 31121-31121, 31179-31179, 31237-31237, 31295-31295, 31353-31353, 31419-31419, 31488-31488, 31554-31554, 31620-31620, 31678-31678, 31736-31736, 31794-31794, 31852-31852, 31910-31910, 31968-31968, 32026-32026, 32084-32084, 32142-32142, 32200-32200, 32258-32258, 32316-32316
app/client/cypress/fixtures/forkNonSignedInUser.json (1)
131-131
: Property update follows new standardization.The change from a boolean
executeOnLoad: false
to a string propertyrunBehaviour: "MANUAL"
aligns with the codebase-wide standardization for representing action execution behavior.app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts (2)
9-12
: Clean imports for run behavior configuration.Proper imports for the new run behavior constants that will be used in the form configuration.
20-24
: Enhanced UI control with dropdown replacing switch.Good enhancement replacing the boolean switch with a dropdown that provides more granular control options for run behavior. The dropdown offers better UX by providing explicit options like "Manual", "On page load", and "Automatic" instead of a simple on/off toggle.
app/client/src/api/PageApi.tsx (2)
12-12
: Type import for the new run behavior model.Appropriate import of the typed
ActionRunBehaviourType
to ensure type safety.
73-73
: API interface updated for run behavior.The interface update correctly changes the property type from a boolean
executeOnLoad
to a typed stringrunBehaviour: ActionRunBehaviourType
, maintaining type safety in the API response data structure.app/client/cypress/fixtures/forkedApp.json (3)
443-443
: API action run behavior updated.The property for the API action has been correctly updated from a boolean
executeOnLoad: true
torunBehaviour: "ON_PAGE_LOAD"
.
498-498
: Database query run behavior updated.The property for the database query has been correctly updated from a boolean
executeOnLoad: true
torunBehaviour: "ON_PAGE_LOAD"
.
552-552
: JavaScript action run behaviors updated.The property for both JavaScript actions has been correctly updated from a boolean
executeOnLoad: false
torunBehaviour: "MANUAL"
.Also applies to: 612-612
app/client/cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters2_spec.ts (2)
180-180
: Good update to string-based run behaviorThe update to use a descriptive string value "On page load" instead of a boolean flag improves code readability and makes the function's purpose clearer.
239-239
: Good update to string-based run behaviorThe update to use "Manual" instead of a boolean flag improves code readability and aligns with the new run behavior model.
app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug20275_Spec.js (1)
33-33
: Good update to string-based run behaviorThe change from a boolean parameter to a descriptive string "On page load" improves readability and better expresses the intended behavior of the function.
app/client/cypress/fixtures/executeAction.json (1)
457-457
: Property migration to string-based run behaviorGood update replacing boolean
executeOnLoad
property with the more descriptive string-basedrunBehaviour
property. This change standardizes action execution behavior throughout the application and improves code clarity.Also applies to: 505-505, 565-565, 613-613
app/client/cypress/fixtures/mySQL_GET_Actions.json (1)
32-32
: Property migration to string-based run behaviorGood update replacing boolean
executeOnLoad
property with the more descriptive string-basedrunBehaviour
property. The values "MANUAL" and "ON_PAGE_LOAD" clearly express the intended behavior of each action.Also applies to: 78-78, 127-127, 176-176
app/client/cypress/fixtures/Table/TableV2FilterImportApp.json (2)
1408-1408
: Consistent update of execution behavior property.The property has been changed from a boolean
executeOnLoad: true
to a string-basedrunBehaviour: "ON_PAGE_LOAD"
for more granular control over action execution.
1477-1477
: Consistent update of execution behavior property.The property has been changed from a boolean
executeOnLoad: true
to a string-basedrunBehaviour: "ON_PAGE_LOAD"
for more granular control over action execution.app/client/cypress/e2e/Regression/ClientSide/SetProperty/SetOptions_Spec.ts (4)
212-212
: Updated method parameter to use string-based execution behavior.Changed boolean parameter to use the new string-based execution mode
"On page load"
which aligns with the UI dropdown options.
271-271
: Updated method parameter to use string-based execution behavior.Changed boolean parameter to use the new string-based execution mode
"On page load"
which aligns with the UI dropdown options.
316-316
: Updated method parameter to use string-based execution behavior.Changed boolean parameter to use the new string-based execution mode
"On page load"
which aligns with the UI dropdown options.
358-358
: Updated method parameter to use string-based execution behavior.Changed boolean parameter to use the new string-based execution mode
"Manual"
which aligns with the UI dropdown options.app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts (2)
1-4
: Imported standardized run behavior constants.Added imports for run behavior configuration from a central location to ensure consistency across the application.
12-16
: Replaced boolean switch with dropdown for run behavior control.Changed the control type from a binary switch to a dropdown with multiple options, providing more flexibility in execution behavior selection.
app/client/cypress/fixtures/mongo_GET_Actions.json (4)
69-69
: Consistent update of execution behavior property.The property has been changed from a boolean
executeOnLoad: false
to a string-basedrunBehaviour: "MANUAL"
for more granular control over action execution.
153-153
: Consistent update of execution behavior property.The property has been changed from a boolean
executeOnLoad: false
to a string-basedrunBehaviour: "MANUAL"
for more granular control over action execution.
247-247
: Consistent update of execution behavior property.The property has been changed from a boolean
executeOnLoad: true
to a string-basedrunBehaviour: "ON_PAGE_LOAD"
for more granular control over action execution.
332-332
: Consistent update of execution behavior property.The property has been changed from a boolean
executeOnLoad: false
to a string-basedrunBehaviour: "MANUAL"
for more granular control over action execution.app/client/src/ce/entities/DataTree/dataTreeJSAction.test.ts (1)
47-47
: Property migration implemented correctlyThe change from the boolean property
executeOnLoad
to the string-based propertyrunBehaviour: "MANUAL"
has been consistently applied across all JS action definitions in the test data. This aligns with the codebase migration from boolean flags to a more expressive string-based behavior model.Also applies to: 94-94, 242-242, 289-289
app/client/cypress/fixtures/modalWidgetTestApp.json (2)
7494-7494
: Appropriate property replacement from boolean to enum stringThe change from
executeOnLoad: true
torunBehaviour: "ON_PAGE_LOAD"
correctly implements the new execution control mechanism for API actions, making the behavior more explicit and descriptive.
7535-7535
: Consistent implementation across published stateGood consistency - ensuring the same property change is applied to both unpublished and published states of the API action.
app/client/cypress/fixtures/PartialImportExport/ImportExport.json (1)
1-1
: Clean conversion to the new run behavior model.The JSON fixture correctly uses the new
runBehaviour
property with the "ON_PAGE_LOAD" value for the API action, aligning with the codebase-wide migration from booleanexecuteOnLoad
flags to string-based run behavior.app/client/cypress/fixtures/gitImport.json (6)
711-711
: Proper conversion to MANUAL run behavior.The change correctly replaces the implicit/missing
executeOnLoad: false
with an explicitrunBehaviour: "MANUAL"
for the MongoQuery action.
764-764
: Proper conversion to ON_PAGE_LOAD run behavior.The change correctly replaces the implicit/missing
executeOnLoad: true
with an explicitrunBehaviour: "ON_PAGE_LOAD"
for the echoAPI action.
811-811
: Proper conversion to ON_PAGE_LOAD run behavior.The change correctly replaces the implicit/missing
executeOnLoad: true
with an explicitrunBehaviour: "ON_PAGE_LOAD"
for the PostgresQuery action.
857-857
: Proper conversion to ON_PAGE_LOAD run behavior.The change correctly replaces the implicit/missing
executeOnLoad: true
with an explicitrunBehaviour: "ON_PAGE_LOAD"
for the MySQLQuery action.
906-906
: Proper conversion to MANUAL run behavior.The change correctly replaces the implicit/missing
executeOnLoad: false
with an explicitrunBehaviour: "MANUAL"
for the JS function myFun1.
956-956
: Proper conversion to MANUAL run behavior.The change correctly replaces the implicit/missing
executeOnLoad: false
with an explicitrunBehaviour: "MANUAL"
for the JS function myFun2.app/client/src/utils/FilterInternalProperties/JsAction.ts (2)
4-4
: Correct enum import for new run behavior model.Added the necessary import for the ActionRunBehaviour enum to support the improved run behavior implementation.
19-22
: Updated condition to use the new run behavior enum.The condition was properly updated to check for the new enum-based run behavior instead of the boolean executeOnLoad flag, maintaining the same functional behavior.
app/client/cypress/fixtures/resetWidgetBug33601.json (1)
1-1
: Properly updated fixture to use run behavior model.This large fixture JSON has been correctly updated to use the new
runBehaviour
property with appropriate values for JavaScript and API actions.app/client/src/selectors/navigationSelectors.ts (1)
36-36
: Type import refactored to use centralized type definition.The
EntityNavigationData
type is now imported from a centralized location in "entities/DataTree/dataTreeTypes" rather than being defined locally. This improves type consistency across the application.app/client/cypress/fixtures/SampleAppIDETest.json (2)
2051-2051
: Replaced boolean flag with descriptive string enumeration.Changed
executeOnLoad: true
torunBehaviour: "ON_PAGE_LOAD"
for better expression of execution behavior in the database action.
2128-2128
: Replaced boolean flag with descriptive string enumeration.Changed
executeOnLoad: false
torunBehaviour: "MANUAL"
in JS action configuration, aligning with the application-wide migration from boolean flags to string-based execution modes.app/client/src/ce/entities/FeatureFlag.ts (1)
63-63
: Added feature flag for reactive actions.New feature flag
release_reactive_actions_enabled
with default valuefalse
enables gradual rollout of the new run behavior functionality. This follows the project's feature flag convention for controlled feature releases.Also applies to: 114-114
app/client/cypress/fixtures/apiMultiPartData.json (1)
324-324
: Standardized API and JS action execution behavior.Replaced all occurrences of
executeOnLoad: false
withrunBehaviour: "MANUAL"
across API and JS actions in the test fixture. This change aligns with the codebase-wide migration to more expressive execution behavior definitions.Also applies to: 370-370, 418-418, 459-459, 514-514, 562-562, 615-615, 661-661, 709-709, 750-750, 798-798, 839-839, 902-902, 958-958, 1000-1000, 1037-1037
app/client/cypress/fixtures/Api_withPageload_Input_TestData.json (1)
1-1
: Property update to match new run behavior model.This updates the execution control from boolean
executeOnLoad
to string-basedrunBehaviour
with value "ON_PAGE_LOAD".app/client/cypress/fixtures/ImportApps/JSOnLoadImport.json (4)
1056-1056
: Boolean flag replaced with string enum for execution control.The database action now uses
"runBehaviour": "MANUAL"
instead of a boolean flag for execution control.
1109-1109
: Consistent migration of execution behavior to string enum.The published action version has also been updated to use the new string-based execution control.
1169-1169
: Standardized behavior setting for JS methods.Both unpublished and published versions of JS methods have been updated to use the string-based execution control system.
Also applies to: 1225-1225
1288-1288
: On page load behavior converted to new format.The
runSpaceCraftImages
action that loads on page now uses"ON_PAGE_LOAD"
instead of a booleanexecuteOnLoad: true
.Also applies to: 1344-1344
app/client/src/api/ActionAPI.tsx (2)
13-13
: Added import for new typed behavior enum.This import supports the method signature change below.
305-311
: API method renamed and signature updated for run behavior.The method has been refactored from
toggleActionExecuteOnLoad
toupdateActionRunBehaviour
, with its parameter changing from a boolean to a typed string value. The endpoint path and payload field have been updated accordingly.app/client/src/ce/sagas/PageSagas.tsx (2)
88-90
: Updated action creator imports to match renamed functions.The import statements have been updated to use the new action creator names that align with the run behavior model.
538-539
: Updated action dispatch for non-JS actions.The saga now uses
setActionsRunBehaviour
instead ofsetActionsToExecuteOnPageLoad
when handling action updates.app/client/cypress/fixtures/clearIntervalApp.json (1)
1-1
: Systematic replacement of executeOnLoad with runBehaviour in fixture file.The change standardizes the execution behavior configuration by replacing the implicit executeOnLoad boolean with an explicit "MANUAL" string value for the runBehaviour property across multiple JS actions.
app/client/src/constants/AppsmithActionConstants/ActionConstants.tsx (2)
11-11
: Improved type safety with proper import.Adding the explicit import for PluginActionSettingsConfig type improves type safety and code clarity.
170-173
: Enhanced type specificity for defaultActionSettings.Changing from a generic Record<PluginType, any> to a more specific Record<PluginType, PluginActionSettingsConfig[]> improves type safety and ensures consistent structure for plugin settings.
app/client/cypress/fixtures/ImportAppReadWriteAccess.json (1)
1-1
: Standardized execution behavior configuration in fixture.Replacing the boolean "executeOnLoad" with string-based "runBehaviour": "ON_PAGE_LOAD" provides more explicit control over when the query executes.
app/client/cypress/fixtures/ImportAppAllAccess.json (1)
1-1
: Consistent update to runBehaviour pattern in fixture.The change replaces executeOnLoad with the more descriptive runBehaviour pattern, maintaining the same execution behavior while using the new standardized property format.
app/client/cypress/fixtures/CommunityIssuesExport.json (54)
7832-7832
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Consistent replacement in this action fixture.
7873-7873
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Looks correct for JS function without arguments.
7909-7909
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Approved for this JS function with a label argument.
7950-7950
: MappingexecuteOnLoad: true
→runBehaviour: "ON_PAGE_LOAD"
Correctly reflects on-page-load execution for this plugin query.
7990-7990
: MappingexecuteOnLoad: true
→runBehaviour: "ON_PAGE_LOAD"
Approved for this second published version query.
8040-8040
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Approved for this labeled JS function in published state.
8082-8082
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Looks good for this array-based JS function.
8125-8125
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Approved for JS function without parameters.
8159-8159
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Consistent update for an unpublished JS action.
8202-8202
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Approved for this multi-label JS function.
8242-8242
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Looks correct for this async-flagged JS function.
8285-8285
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Approved for the JS function with single parameter.
8321-8321
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Consistent for the second copy of the same JS function.
8370-8370
: MappingexecuteOnLoad: true
→runBehaviour: "ON_PAGE_LOAD"
Approved for the API call withnone
content type in unpublished version.
8410-8410
: MappingexecuteOnLoad: true
→runBehaviour: "ON_PAGE_LOAD"
Approved for the published version of this API call.
8451-8451
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Correct for this async JS action in unpublished state.
8485-8485
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Approved for the published async JS action.
8526-8526
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Consistent for this simple JS function.
8562-8562
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Looks good for this unpublished JS action.
8605-8605
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Approved for the published version without arguments.
8641-8641
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Consistent update for this JS function.
8680-8680
: MappingexecuteOnLoad: true
→runBehaviour: "ON_PAGE_LOAD"
Approved for this database query in unpublished version.
8710-8710
: MappingexecuteOnLoad: true
→runBehaviour: "ON_PAGE_LOAD"
Correct for the published DB query.
8748-8748
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Looks good for this API call without templates.
8784-8784
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Approved for the published API call without templates.
8830-8830
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Consistent for this simple JS function.
8866-8866
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Approved for the published version of the same JS function.
8906-8906
: MappingexecuteOnLoad: true
→runBehaviour: "ON_PAGE_LOAD"
Correct for API call with JSON content in unpublished state.
8937-8937
: MappingexecuteOnLoad: true
→runBehaviour: "ON_PAGE_LOAD"
Approved for the published JSON API call.
8975-8975
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Looks good for this labeled JS function.
9016-9016
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Approved for the published version of the same JS function.
9067-9067
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Consistent for this async JS action in unpublished state.
9103-9103
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Approved for the published async JS action.
9146-9146
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Looks good for this async JS function.
9182-9182
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Approved for the published version of this async JS function.
9225-9225
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Consistent for this simple JS function in unpublished state.
9261-9261
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Approved for the published version.
9304-9304
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Looks good for this JS function in unpublished code.
9340-9340
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Approved for published JSON fixture.
9380-9380
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Consistent for this API call in unpublished state.
9421-9421
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Approved for the published API fixture.
9472-9472
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Looks good for this JS action without arguments.
9508-9508
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Approved for published JS action.
9558-9558
: MappingexecuteOnLoad: true
→runBehaviour: "ON_PAGE_LOAD"
Correct for this API call with JSON content type in unpublished version.
9599-9599
: MappingexecuteOnLoad: true
→runBehaviour: "ON_PAGE_LOAD"
Approved for the published JSON API call.
9640-9640
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Looks good for this async JS function in unpublished state.
9676-9676
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Approved for the published async JS action.
9716-9716
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Consistent for this API call with templates in unpublished state.
9750-9750
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Approved for the published version with templates.
9794-9794
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Looks good for this JS function with states argument.
9830-9830
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Approved for this JS action without args.
9869-9869
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Consistent for this SQL update query.
9899-9899
: MappingexecuteOnLoad: false
→runBehaviour: "MANUAL"
Approved for the published SQL update query.
7798-7798
:✅ Verification successful
Mapping
executeOnLoad: false
→runBehaviour: "MANUAL"
Replaced the boolean flag with the new string-based run behaviour. Ensure no residualexecuteOnLoad
entries remain.Run the following to verify removal of the old flag:
🏁 Script executed:
#!/bin/bash rg -n '"executeOnLoad"' app/client/cypress/fixtures/CommunityIssuesExport.jsonLength of output: 80
executeOnLoad references removed
Ranrg -n '"executeOnLoad"' app/client/cypress/fixtures/CommunityIssuesExport.json
and found no matches. No residual entries remain—no further action needed.app/client/cypress/fixtures/ImportAppReadAccess.json (1)
300-300
: Properly replaced boolean with string-typed run behavior.The change from
executeOnLoad
boolean torunBehaviour: "ON_PAGE_LOAD"
aligns with the broader refactoring to make execution behavior more descriptive.app/client/src/sagas/PluginSagas.ts (6)
48-49
: Appropriate imports for the feature flag functionality.These imports are necessary for the feature flag check and plugin run behavior updates.
169-177
: Well-implemented feature flag check for reactive actions.The code correctly retrieves the feature flag state and uses it to conditionally update plugin settings, following the feature flag pattern used throughout the application.
183-183
: Updated JS plugin settings usage.The code now uses the conditionally updated plugin settings based on the feature flag instead of directly using the default settings.
201-201
: Consistent usage of feature flag-based plugin settings.Using the same updated plugin settings here maintains consistency with the earlier change.
251-259
: Consistent implementation of feature flag check in checkAndGetPluginFormConfigsSaga.The code properly replicates the same feature flag check pattern used in the fetchPluginFormConfigsSaga.
268-268
: Consistent update for missing settings.This ensures that when settings are missing from the API response, they're populated with the feature flag-aware default settings.
app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.test.tsx (5)
6-6
: Added ActionRunBehaviour enum import.The test now imports the enum to properly use the new string-based behavior values.
19-19
: Updated test descriptions to reflect UI changes.The test descriptions now correctly reference "run behavior" and "dropdowns" instead of "execute on load" and "switches".
Also applies to: 31-31, 43-43
40-40
: Updated DOM element assertion for dropdowns.The test now checks for combobox elements instead of switches, reflecting the UI component change.
47-48
: Updated test data to use run behavior enums.The test cases now use the ActionRunBehaviour enum values instead of boolean flags.
Also applies to: 51-52
63-71
: Updated assertions to check dropdown selected values.The test now properly verifies the selected text values in the dropdown components instead of switch states.
app/client/src/ce/reducers/entityReducers/actionsReducer.tsx (2)
16-16
: Added import for the new type.The import of ActionRunBehaviourType is necessary for the updated reducer handler.
314-332
: Updated reducer action handler for run behavior.The reducer now correctly:
- Uses the updated action type name
- Accepts runBehaviour in the payload instead of executeOnLoad
- Updates the action configuration with the new property name
This change aligns with the overall refactoring from boolean flags to string-based run behaviors.
app/client/cypress/fixtures/ImportAppSelectedAccess.json (1)
90-90
: Correct replacement ofexecuteOnLoad
withrunBehaviour
The boolean flag has been removed and replaced by the string property"runBehaviour": "ON_PAGE_LOAD"
, which aligns with the newActionRunBehaviour
enum and matches other fixtures. JSON remains valid.app/client/cypress/fixtures/TableMigrationAppExported.json (2)
4574-4574
: Correct migration to runBehaviour "ON_PAGE_LOAD".All occurrences where
executeOnLoad
wastrue
have been consistently replaced with"runBehaviour": "ON_PAGE_LOAD"
in query fixtures.Also applies to: 4639-4639, 5058-5058, 5139-5139, 5930-5930, 6011-6011, 6096-6096, 6161-6161, 6350-6350, 6415-6415, 6608-6608, 6673-6673, 6867-6867, 6930-6930, 7004-7004, 7067-7067, 7142-7142, 7205-7205, 7280-7280, 7345-7345, 7430-7430, 7511-7511
4702-4702
: Correct migration to runBehaviour "MANUAL".All occurrences where
executeOnLoad
wasfalse
have been correctly replaced with"runBehaviour": "MANUAL"
for manual/API actions.Also applies to: 4753-4753, 4814-4814, 4863-4863, 4924-4924, 4973-4973, 5210-5210, 5261-5261, 5327-5327, 5381-5381, 5447-5447, 5501-5501, 5565-5565, 5617-5617, 5681-5681, 5733-5733, 5795-5795, 5846-5846, 6223-6223, 6274-6274, 6479-6479, 6532-6532, 6737-6737, 6790-6790
app/client/src/entities/DataTree/dataTreeTypes.ts (3)
6-6
: Import of EntityTypeValue looks good.The import brings in a required type for the NavigationData interface.
28-44
: Well-structured NavigationData interface.This interface properly defines the structure for navigation-related entities with appropriate property types. The optional properties are correctly marked with '?'.
46-46
: Appropriate type alias for EntityNavigationData.Using Record type is the correct approach for mapping string keys to NavigationData objects.
app/client/cypress/fixtures/library_export.json (1)
1-1
: JSON fixture updated to use new runBehaviour property.The fixture has been properly updated to replace boolean
executeOnLoad
with string-basedrunBehaviour
values ("MANUAL" and "ON_PAGE_LOAD") in JavaScript actions. This ensures test fixtures match the updated property naming in the application code.app/client/cypress/fixtures/JSObjectMutationTestApp.json (3)
517-518
: Replaced executeOnLoad with runBehaviour in JS action.The boolean flag has been correctly replaced with the string-based property using the "MANUAL" value.
554-555
: Replaced executeOnLoad with runBehaviour in publishedAction section.Consistent replacement of boolean flag with string-based property using the "MANUAL" value.
1271-1272
: Changed to ON_PAGE_LOAD run behavior.The published version correctly uses "ON_PAGE_LOAD" which replaces the previous true value for executeOnLoad.
app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts (3)
1-2
: Import of ActionRunBehaviour enum looks good.Importing the enum from its location in PluginActionTypes.ts is appropriate.
3-4
: Config property constant defined clearly.Using a constant for the property name ensures consistency across the codebase.
5-24
: Well-structured run behavior options.The array of options with labels, subtext, values, and children properties provides a comprehensive set of metadata for UI rendering. The three behavior types (Automatic, On page load, Manual) offer more granular control than the previous boolean flag.
app/client/src/components/formControls/DropDownControl.tsx (5)
23-23
: Updated imports for enhanced dropdown.Added Flex and Text components are necessary for the improved option rendering.
32-33
: Import of styled-components is appropriate.Required for creating the styled subcomponents for option display.
34-43
: Well-designed styled components for dropdown options.The styled components provide consistent typography and color schemes for the option labels and subtexts, using design system variables for theme consistency.
477-477
: Fixed list height improves dropdown UX.Setting a fixed height of 240px prevents oversized dropdowns and provides a consistent user experience.
511-529
: Enhanced option rendering with conditional subtext support.The conditional rendering based on presence of subText property maintains backward compatibility while adding support for the new option format. The nested Flex components create a clean layout with proper spacing.
app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/JSFunctionExecution_spec.ts (5)
18-24
: Interface change from boolean to string enum looks good.The change from
onPageLoad: boolean
torunBehaviour: "On page load" | "Manual"
string union type improves code readability and makes the execution behavior more explicit and extensible.
35-66
: Test data updated correctly for new execution behavior model.The sample data array has been properly updated to use string-based run behavior values instead of booleans, consistently using "On page load" or "Manual" according to the new model.
361-363
: Filter condition correctly updated for new property name.The filter condition now properly checks
func.runBehaviour
instead of the old boolean property. This ensures the function counting logic works with the new string-based model.
405-408
: Method call updated to use string parameter.The call to
jsEditor.EnableDisableAsyncFuncSettings
now correctly passes the string value ("On page load") instead of a boolean flag.
508-508
: Verification method correctly updated for new parameter type.The call to
jsEditor.VerifyAsyncFuncSettings
has been properly updated to use the string value ("On page load") instead of a boolean.app/client/src/pages/Editor/SaaSEditor/__data__/FinalState.json (3)
86-86
: Property correctly renamed from executeOnLoad to runBehaviour.The boolean property has been successfully replaced with a string-based execution model using "MANUAL" as the default value.
2546-2570
: Enhanced UI control with additional execution options.The previous boolean checkbox has been replaced with a more expressive dropdown offering three execution modes:
- Automatic - Runs on page load or when dependencies change
- On page load - Runs when page loads or when manually triggered
- Manual - Runs only when explicitly called
This improvement provides more flexibility and clearer semantics for configuring action execution behavior.
2597-2618
: Configuration consistently updated across all plugin types.The run behavior dropdown control has been applied consistently to all plugin configurations with identical options and subtext descriptions. This creates a unified experience across different plugin types.
Also applies to: 2648-2669, 2705-2726, 2749-2770, 2800-2821, 2851-2872
app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts (5)
2310-2310
: Confirmed property change fromexecuteOnLoad
torunBehaviour
Property replacement is correctly implemented with the appropriate "ON_PAGE_LOAD" value, which is consistent with the refactoring pattern.
2394-2394
: LGTM - Correct implementation ofrunBehaviour: "MANUAL"
This properly replaces the previous
executeOnLoad: false
with the new string-based configuration.
10041-10064
: Clean implementation of run behavior dropdown controlThe dropdown implementation correctly includes all three behavior options with descriptive labels and subtext. The configuration is comprehensive and gives users clear understanding of each option's behavior.
10098-10121
: Consistent dropdown implementation across contextsThe dropdown implementation is consistently applied across different contexts. Good attention to detail maintaining identical option structures.
Also applies to: 10155-10178, 10241-10264
10439-10439
: LGTM - Consistent default configurationAll JS functions properly configured with
runBehaviour: "MANUAL"
which is a safe default value requiring explicit invocation.Also applies to: 10489-10489, 10573-10573, 10623-10623
app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx (1)
68-71
: Analytics event still references the old flag name
toggleSetting: "ON_PAGE_LOAD"
no longer matches the newrunBehaviour
vocabulary, which will skew metrics.
Update the string (e.g.,"RUN_BEHAVIOUR"
) or add a new field altogether.app/client/src/actions/pluginActionActions.ts (1)
355-380
: Constant spelling differs from payload field – double-check for typosFunctions dispatch
SET_ACTION_RUN_BEHAVIOR
/SET_JS_ACTION_RUN_BEHAVIOR
(American spelling) while the property isrunBehaviour
(British).
That’s fine if the constants truly exist, but past code used…_EXECUTE_ON_PAGELOAD
. Ensure:
ReduxActionTypes
exports those exact constants (no “U”).- Reducers expect them.
Otherwise the action will be silently ignored.
app/client/cypress/fixtures/PartialImportExport/QueriesExportedOnly.json (1)
1-1
: MixedrunBehaviour
between unpublished and published states – intentional?
SelectQuery
is"ON_PAGE_LOAD"
(unpublished) but"MANUAL"
(published).
If the fixture is meant to verify parity between the two snapshots, this mismatch may cause false-negatives during import/export tests.
Please confirm the expectation.app/client/cypress/fixtures/PartialImportExport/PartialImportExportSampleApp.json (6)
2211-2212
: Consistent rename of execution flag for JS actionmyFun2
The booleanexecuteOnLoad
has been correctly replaced by"runBehaviour": "MANUAL"
formyFun2
. Values align with the new enum.
2267-2268
: Consistent rename of execution flag for JS actionaddNumbers
The booleanexecuteOnLoad
has been correctly replaced by"runBehaviour": "MANUAL"
foraddNumbers
. Values align with the new enum.
2321-2322
: Consistent rename of execution flag for DB actionUpdateQuery
ReplacedexecuteOnLoad
with"runBehaviour": "MANUAL"
forUpdateQuery
. Alignment with action config looks correct.
2386-2387
: Consistent rename of execution flag for DB actionInsertQuery
ReplacedexecuteOnLoad
with"runBehaviour": "MANUAL"
forInsertQuery
. Good to go.
2450-2451
: Consistent rename of execution flag for DB actionDeleteQuery
ReplacedexecuteOnLoad
with"runBehaviour": "MANUAL"
forDeleteQuery
. Looking good.
2502-2503
: Consistent rename of execution flag for DB actionSelectQuery
ReplacedexecuteOnLoad
with"runBehaviour": "ON_PAGE_LOAD"
forSelectQuery
.userSetOnLoad
remains correctlytrue
.app/client/src/pages/Editor/SaaSEditor/__data__/InitialState.json (2)
85-85
: Proper property substitution in actionConfiguration.
Replaced the boolean execution flag with"runBehaviour": "MANUAL"
, aligning this action’s initial state with the new dropdown model.
2545-2566
: Consistent addition of Run behavior dropdowns in settingConfigs.
Each section now defines therunBehaviour
property with the full set of options (AUTOMATIC
,ON_PAGE_LOAD
,MANUAL
). This matches the UI refactor to a tri-state dropdown.Also applies to: 2596-2617, 2647-2668, 2704-2725, 2748-2769, 2799-2820, 2850-2871
app/client/cypress/fixtures/DeleteGitRepos.json (2)
1-3
: Migration of executeOnLoad to runBehaviour.
Gitea_getallrepos
is correctly set to"ON_PAGE_LOAD"
, and bothDelete_repos
andmyFun1
default to"MANUAL"
, preserving intended execution triggers.
1-1
:✅ Verification successful
Verify no remaining legacy flags.
Ensure there are no strayexecuteOnLoad
properties left in this fixture file.
🏁 Script executed:
#!/bin/bash # Check for any remaining executeOnLoad usage rg -n 'executeOnLoad' app/client/cypress/fixtures/DeleteGitRepos.jsonLength of output: 69
No legacy
executeOnLoad
flags found.
The ripgrep search returned no occurrences ofexecuteOnLoad
inapp/client/cypress/fixtures/DeleteGitRepos.json
.app/client/src/sagas/ActionSagas.ts (4)
150-150
: Import for new run behavior type addedThis import supports the shift from boolean
executeOnLoad
to a string-based run behavior model, improving type safety.
1042-1052
: Properly updated property check in the sagaThe property handler now correctly branches for
runBehaviour
instead of the previous boolean flag, maintaining the original control flow logic while supporting the new behavior model.
1064-1089
: Renamed saga for improved clarityFunction renamed from
toggleActionExecuteOnLoadSaga
toupdateActionRunBehaviourSaga
with updated parameter types, maintaining the same overall functionality while adapting to the new run behavior model.
1269-1271
: Updated watcher saga referenceThe watcher saga now correctly references the renamed action type and saga handler, ensuring the action dispatch flows properly through the system.
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (2)
5-11
: Well-structured enum for run behaviorGood job creating a clear enum with descriptive values instead of using a boolean flag. The template literal type ensures type safety when using these values throughout the codebase.
13-30
: Well-defined interfaces for plugin settingsThese interfaces provide strong typing for plugin action settings, making the configuration more maintainable and preventing type errors. The optional properties appropriately reflect which fields may not always be required.
app/client/cypress/support/Pages/JSEditor.ts (4)
53-58
: Updated selectors for new UI componentsSelectors properly updated to match the new combobox UI replacing the previous switch component, maintaining test coverage during the UI transition.
301-304
: Method signature updates for run behaviorMethods now correctly accept string-based run behavior values ("On page load" or "Manual") instead of booleans, aligning with the UI changes and making the test code more readable.
Also applies to: 313-316
319-324
: Updated UI interaction for run behavior selectionImplementation correctly changed to use dropdown selection instead of toggle switch, preserving the same functionality while adapting to the new UI pattern.
59-59
:✅ Verification successful
Change in method visibility
Changed
_jsObjName
from private to public. Ensure this change was intentional and doesn't break encapsulation principles.Check if this property is now needed by other test classes:
🏁 Script executed:
#!/bin/bash # Look for references to the now-public _jsObjName property outside JSEditor.ts rg -A 3 "\._jsObjName" --glob "*.ts" --glob "*.js" | grep -v "JSEditor.ts"Length of output: 20351
Public
_jsObjName
is intentionally exposed for Cypress testsThe
_jsObjName
property is referenced across multiple Cypress spec files (e.g., underapp/client/cypress/e2e/Regression/ClientSide/ActionExecution/…_spec.ts
), so making itpublic
was necessary for test helpers to access it. No encapsulation breakage will occur in production code, as this API surface is only consumed by end-to-end tests.• Change is intentional and safe.
• Visibility must remainpublic
for existing tests.
• (Optional) Consider renaming without the leading underscore if preferred for clarity.app/client/src/ce/reducers/entityReducers/jsActionsReducer.tsx (4)
11-11
: Import for new run behavior type addedProperly imported the type to ensure type safety in the reducer.
364-370
: Updated action handler for run behaviorReducer now handles the new
UPDATE_FUNCTION_RUN_BEHAVIOR_SUCCESS
action and properly types therunBehaviour
parameter.
376-376
: Property update for run behaviorNow setting
runBehaviour
instead of the previous booleanexecuteOnLoad
property.
393-415
: Bulk update handler for run behaviorUpdated the reducer to handle setting run behavior for multiple actions simultaneously, maintaining the same functionality while using the new property name and type.
app/client/cypress/support/Pages/ApiPage.ts (4)
107-109
: Good addition of dropdown selectors for run behavior.These new selectors properly support the UI change from toggle switches to dropdown selectors for run behavior configuration.
278-287
: Refactored method correctly implements the run behavior dropdown.The method has been properly updated to work with the new string-based run behavior paradigm ("On page load" or "Manual") instead of the previous boolean toggle.
511-520
: Correctly refactored method for JS objects with same pattern.This implementation for JS objects follows the same pattern as the API method above, maintaining consistency across the codebase.
522-529
: Settings method updated to handle run behavior dropdown.Method signature and implementation are consistent with the other refactored methods.
app/client/src/ce/constants/ReduxActionConstants.tsx (4)
69-72
: Appropriate new action types for JS run behavior.These new action types properly replace the previous toggle-based action types with more descriptive run behavior actions.
87-87
: Added corresponding error action type.Good practice to include the error type for the new run behavior update action.
809-811
: New action types for API run behavior.These mirror the JS action types and follow the same naming pattern, maintaining consistency.
825-825
: Added error type for action run behavior.Consistent with the JS error type above.
app/client/src/sagas/JSPaneSagas.ts (3)
104-104
: Added import for the new run behavior type.Properly imports the type needed for the refactored functionality.
786-797
: Updated property check and action dispatch for run behavior.The condition correctly checks for "runBehaviour" property now instead of "executeOnLoad" and dispatches the appropriate action with the correct payload structure.
947-948
: Updated saga watcher with new action type.The takeLatest is correctly configured to listen for the new action type and call the renamed saga function.
app/client/cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters2_spec.ts
Outdated
Show resolved
Hide resolved
app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx
Outdated
Show resolved
Hide resolved
app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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 (9)
app/client/cypress/e2e/Regression/ServerSide/Params/PassingParams_Spec.ts (1)
92-92
:⚠️ Potential issueReplace agHelper.Sleep with proper Cypress waiting patterns.
Avoid using agHelper.Sleep() as it introduces fixed wait times which can lead to flaky tests.
- agHelper.Sleep(500); + // Use Cypress's built-in waiting mechanisms or agHelper methods that wait for elements/conditions + // For example: + agHelper.AssertElementVisibility(locators._entityNameInExplorer("ParamsTest"));Similar changes should be applied to all other Sleep calls in this file (lines 108, 124, 140, 156, 172, 188, 204, 220, 240).
app/client/cypress/e2e/Regression/ClientSide/PublishedApps/PublishedModeToastToggle_Spec.ts (1)
94-94
: 🛠️ Refactor suggestionAvoid using agHelper.Sleep() in Cypress tests
Using
_.agHelper.Sleep(2000)
violates the Cypress best practices mentioned in the coding guidelines. This can lead to flaky tests and unnecessary wait times.- _.agHelper.Sleep(2000); + _.agHelper.WaitUntilToastDisappear();or consider using Cypress built-in waiting mechanisms like:
- _.agHelper.Sleep(2000); + cy.wait('@someApiCall').its('response.statusCode').should('eq', 200);app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug14987_spec.js (1)
94-94
: 🛠️ Refactor suggestionAvoid using agHelper.Sleep() in Cypress tests
Using
agHelper.Sleep(2000)
violates the Cypress best practices mentioned in the coding guidelines. This can lead to flaky tests and unnecessary wait times.- agHelper.Sleep(2000); + agHelper.WaitUntilToastDisappear();or consider using Cypress built-in waiting mechanisms like:
- agHelper.Sleep(2000); + cy.wait(alias).its('response.statusCode').should('eq', 200);app/client/cypress/e2e/Regression/ClientSide/JSObject/JSObject_Tests_spec.ts (2)
256-256
: 🛠️ Refactor suggestionReplace Sleep with proper waiting mechanism
Using
agHelper.Sleep(2000)
violates Cypress best practices mentioned in the coding guidelines. This can lead to flaky tests and should be replaced with a proper waiting mechanism.- agHelper.Sleep(2000); + assertHelper.AssertNetworkStatus("@updateLayout", 200);
269-269
: 💡 Verification agent🧩 Analysis chain
Address skipped tests to improve test coverage
Two tests are skipped with associated bug references (#35385 and #38216). Consider adding a follow-up task to address these tests once the bugs are fixed to maintain proper test coverage.
Also applies to: 277-277
🏁 Script executed:
#!/bin/bash # Description: Check if the referenced bugs are still open or have been resolved echo "Checking status of bug #35385..." gh issue view 35385 --json state,title,url || echo "Issue not found or not accessible" echo "Checking status of bug #38216..." gh issue view 38216 --json state,title,url || echo "Issue not found or not accessible"Length of output: 528
Unskip resolved test and track open-bug test
The skip for the test tied to #38216 can now be removed, and the skip for #35385 should remain with a follow-up task to implement once that bug is fixed.
• File:
app/client/cypress/e2e/Regression/ClientSide/JSObject/JSObject_Tests_spec.ts
– Line 269 (Bug #35385): leave asit.skip(…)
and add a TODO to revisit when the issue is closed (still OPEN).
– Line 277 (Bug #38216): changeit.skip(…)
toit(…)
to re-enable the test (issue is now CLOSED).Example diff for line 277:
- it.skip("10. Verify navigation between JSObjects works properly Bug: #38216", () => { + it("10. Verify navigation between JSObjects works properly Bug: #38216", () => {app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts (1)
152-152
:⚠️ Potential issueRemove explicit sleep call.
This line uses
agHelper.Sleep()
which violates the coding guidelines that specifically prohibit using sleep in Cypress tests.- agHelper.Sleep(); + // Use Cypress's built-in waiting mechanisms instead + // cy.wait('@postExecute')app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad2_Spec.ts (1)
32-32
: 🛠️ Refactor suggestionRemove the use of agHelper.Sleep() to comply with coding guidelines.
The test code uses
agHelper.Sleep()
which violates the coding guidelines that specifically mention to avoid usingagHelper.Sleep()
. Consider using Cypress's built-in waiting mechanisms likecy.wait('@alias')
for network requests orcy.should()
for element assertions.- agHelper.Sleep(); + // Wait for specific condition instead, for example: + // cy.get(selector).should('be.visible') + // or use an appropriate assertion based on what we're waiting forapp/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/SetTimeout_spec.ts (1)
35-38
: 🛠️ Refactor suggestionReplace usage of agHelper.Sleep() with proper Cypress waiting mechanisms.
The test uses multiple instances of
agHelper.Sleep()
which is explicitly discouraged in the coding guidelines. Replace with appropriate Cypress waiting mechanisms based on the specific conditions you're waiting for.- agHelper.Sleep(2000); - jsEditor.RunJSObj(); - agHelper.Sleep(3000); + jsEditor.RunJSObj(); + // Wait for alert to appear + cy.contains("Hello world - default").should("exist");app/client/cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters2_spec.ts (1)
108-108
: 🛠️ Refactor suggestionAvoid using sleep in tests.
There's an existing call to
agHelper.Sleep(3000)
which violates the testing guidelines that specify avoiding sleep calls in Cypress tests.Replace the sleep with proper Cypress waiting mechanisms:
-agHelper.Sleep(3000); //for the Api to run & new value to be set, for CI runs +agHelper.WaitUntilAllToastsDisappear(); +agHelper.WaitUntilEleAppear(locators._widgetInDeployed(draggableWidgets.INPUT_V2));
♻️ Duplicate comments (6)
app/client/src/pages/Editor/SaaSEditor/__data__/FinalState.json (6)
2597-2618
: Same dropdown insertion for run behaviour as above.
2648-2669
: Same dropdown insertion for run behaviour as above.
2705-2726
: Same dropdown insertion for run behaviour as above.
2749-2770
: Same dropdown insertion for run behaviour as above.
2800-2821
: Same dropdown insertion for run behaviour as above.
2851-2872
: Same dropdown insertion for run behaviour as above.
🧹 Nitpick comments (3)
app/client/src/ce/sagas/PageSagas.tsx (2)
542-542
: Consider using Object.hasOwn instead of hasOwnProperty.The static analysis tool identified a potential issue with direct usage of
hasOwnProperty
.- const jsActions = actionUpdates.filter((d) => - d.hasOwnProperty("collectionId"), + const jsActions = actionUpdates.filter((d) => + Object.hasOwn(d, "collectionId"),🧰 Tools
🪛 Biome (1.9.4)
[error] 542-542: 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)
534-534
: Consider using Object.hasOwn instead of hasOwnProperty.Replace the direct use of hasOwnProperty with the more robust Object.hasOwn method for consistent property checking.
- const actions = actionUpdates.filter( - (d) => !d.hasOwnProperty("collectionId"), + const actions = actionUpdates.filter( + (d) => !Object.hasOwn(d, "collectionId"),🧰 Tools
🪛 Biome (1.9.4)
[error] 534-534: 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)
app/client/src/sagas/PluginSagas.ts (1)
251-259
: Duplicate feature flag check in checkAndGetPluginFormConfigsSaga.This is correctly implementing the same pattern for updating plugin settings with the feature flag in another saga. Consider extracting this logic to a separate helper function to avoid duplication.
You could refactor this repeated logic into a function:
+ function* getUpdatedPluginSettings() { + const featureFlagEnabled: boolean = yield select( + selectFeatureFlagCheck, + "release_reactive_actions_enabled" + ); + return updatePluginRunBehaviourForPluginSettings( + defaultActionSettings, + featureFlagEnabled + ); + }Then you could call this function in both sagas.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (107)
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/Api_withPageload_Input_TestData.json
(1 hunks)app/client/cypress/fixtures/CommunityIssuesExport.json
(54 hunks)app/client/cypress/fixtures/ContextSwitching.json
(8 hunks)app/client/cypress/fixtures/DeleteGitRepos.json
(1 hunks)app/client/cypress/fixtures/ImportAppAllAccess.json
(1 hunks)app/client/cypress/fixtures/ImportAppReadAccess.json
(1 hunks)app/client/cypress/fixtures/ImportAppReadWriteAccess.json
(1 hunks)app/client/cypress/fixtures/ImportAppSelectedAccess.json
(1 hunks)app/client/cypress/fixtures/ImportApps/JSOnLoadFailureTest.json
(2 hunks)app/client/cypress/fixtures/ImportApps/JSOnLoadImport.json
(6 hunks)app/client/cypress/fixtures/JSObjectMutationTestApp.json
(42 hunks)app/client/cypress/fixtures/PartialImportAppNegative.json
(2 hunks)app/client/cypress/fixtures/PartialImportExport/ImportExport.json
(1 hunks)app/client/cypress/fixtures/PartialImportExport/PartialImportExportSampleApp.json
(6 hunks)app/client/cypress/fixtures/PartialImportExport/PartialQueryExport.json
(1 hunks)app/client/cypress/fixtures/PartialImportExport/QueriesExportedOnly.json
(1 hunks)app/client/cypress/fixtures/PropertyPaneSlashMenuBindings.json
(8 hunks)app/client/cypress/fixtures/SampleAppIDETest.json
(8 hunks)app/client/cypress/fixtures/Table/TableV2FilterImportApp.json
(2 hunks)app/client/cypress/fixtures/TableFilterImportApp.json
(2 hunks)app/client/cypress/fixtures/TableMigrationAppExported.json
(46 hunks)app/client/cypress/fixtures/apiMultiPartData.json
(16 hunks)app/client/cypress/fixtures/clearIntervalApp.json
(1 hunks)app/client/cypress/fixtures/executeAction.json
(4 hunks)app/client/cypress/fixtures/exportedApp.json
(4 hunks)app/client/cypress/fixtures/forkNonSignedInUser.json
(1 hunks)app/client/cypress/fixtures/forkedApp.json
(4 hunks)app/client/cypress/fixtures/gitImport.json
(6 hunks)app/client/cypress/fixtures/jsObjectTesting.json
(38 hunks)app/client/cypress/fixtures/library_export.json
(1 hunks)app/client/cypress/fixtures/modalWidgetTestApp.json
(2 hunks)app/client/cypress/fixtures/mongo_GET_Actions.json
(4 hunks)app/client/cypress/fixtures/mySQL_GET_Actions.json
(4 hunks)app/client/cypress/fixtures/one_postgres.json
(1 hunks)app/client/cypress/fixtures/resetWidgetBug33601.json
(1 hunks)app/client/cypress/fixtures/setIntervalApp.json
(1 hunks)app/client/cypress/locators/apiWidgetslocator.json
(0 hunks)app/client/cypress/support/Pages/ApiPage.ts
(3 hunks)app/client/cypress/support/Pages/JSEditor.ts
(3 hunks)app/client/cypress/support/commands.js
(0 hunks)app/client/package.json
(1 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/entities/FeatureFlag.ts
(2 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/ActionConstants.tsx
(2 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/PluginSettings.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/sagas/PluginSagas.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)
⛔ Files not processed due to max files limit (28)
- app/client/src/utils/JSPaneUtils.tsx
- app/client/src/utils/NavigationSelector/JsChildren.ts
- app/client/src/utils/NavigationSelector/WidgetChildren.ts
- app/client/src/utils/NavigationSelector/common.ts
- app/client/src/utils/PluginUtils.ts
- app/client/test/factories/Actions/API.ts
- app/client/test/factories/Actions/GoogleSheetFactory.ts
- app/client/test/factories/Actions/JSObject.ts
- app/client/test/factories/Actions/Postgres.ts
- app/client/test/factories/MockPluginsState.ts
- app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/RunBehaviorEnum.java
- app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/ce/ActionCE_DTO.java
- app/server/appsmith-plugins/amazons3Plugin/src/main/resources/setting.json
- app/server/appsmith-plugins/anthropicPlugin/src/main/resources/setting.json
- app/server/appsmith-plugins/appsmithAiPlugin/src/main/resources/setting.json
- app/server/appsmith-plugins/firestorePlugin/src/main/resources/setting.json
- app/server/appsmith-plugins/googleAiPlugin/src/main/resources/setting.json
- app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/setting.json
- app/server/appsmith-plugins/mongoPlugin/src/main/resources/setting.json
- app/server/appsmith-plugins/mssqlPlugin/src/main/resources/setting.json
- app/server/appsmith-plugins/mysqlPlugin/src/main/resources/setting.json
- app/server/appsmith-plugins/openAiPlugin/src/main/resources/setting.json
- app/server/appsmith-plugins/oraclePlugin/src/main/resources/setting.json
- app/server/appsmith-plugins/postgresPlugin/src/main/resources/setting.json
- app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/ActionControllerCE.java
- app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/LayoutActionServiceCE.java
- app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/LayoutActionServiceCEImpl.java
- app/server/appsmith-server/src/test/java/com/appsmith/server/services/LayoutActionServiceTest.java
💤 Files with no reviewable changes (3)
- app/client/cypress/locators/apiWidgetslocator.json
- app/client/cypress/support/commands.js
- 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/fixtures/mongo_GET_Actions.json
app/client/cypress/fixtures/SampleAppIDETest.json
app/client/cypress/fixtures/ImportApps/JSOnLoadImport.json
app/client/cypress/e2e/Regression/ServerSide/Datasources/Snowflake_Basic_Spec.ts
app/client/cypress/fixtures/ContextSwitching.json
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/OnLoadTests/APIOnLoad_Spec.ts
app/client/cypress/fixtures/PartialImportExport/PartialQueryExport.json
app/client/cypress/fixtures/PartialImportExport/QueriesExportedOnly.json
app/client/cypress/support/Pages/ApiPage.ts
app/client/cypress/e2e/Regression/ClientSide/JSObject/JSObject_Tests_spec.ts
app/client/cypress/fixtures/exportedApp.json
app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad4_Spec.ts
app/client/cypress/fixtures/mySQL_GET_Actions.json
app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug14987_spec.js
app/client/cypress/e2e/Regression/ServerSide/Params/PassingParams_Spec.ts
app/client/cypress/e2e/Regression/ServerSide/Datasources/Oracle_Spec.ts
app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts
app/client/cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters2_spec.ts
app/client/cypress/fixtures/PartialImportExport/ImportExport.json
app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad2_Spec.ts
app/client/cypress/fixtures/forkedApp.json
app/client/cypress/fixtures/ImportApps/JSOnLoadFailureTest.json
app/client/cypress/fixtures/jsObjectTesting.json
app/client/cypress/fixtures/PropertyPaneSlashMenuBindings.json
app/client/cypress/fixtures/TableFilterImportApp.json
app/client/cypress/fixtures/PartialImportAppNegative.json
app/client/cypress/fixtures/gitImport.json
app/client/cypress/e2e/Regression/ClientSide/ActionExecution/FrameworkFunctions_ShowCloseModalFunctions_spec.ts
app/client/cypress/e2e/Regression/ClientSide/SetProperty/SetOptions_Spec.ts
app/client/cypress/fixtures/ImportAppReadAccess.json
app/client/cypress/fixtures/forkNonSignedInUser.json
app/client/cypress/fixtures/apiMultiPartData.json
app/client/cypress/fixtures/Api_withPageload_Input_TestData.json
app/client/cypress/fixtures/ImportAppReadWriteAccess.json
app/client/cypress/fixtures/modalWidgetTestApp.json
app/client/cypress/fixtures/CommunityIssuesExport.json
app/client/cypress/e2e/Regression/ClientSide/PublishedApps/PublishedModeToastToggle_Spec.ts
app/client/cypress/fixtures/one_postgres.json
app/client/cypress/fixtures/executeAction.json
app/client/cypress/fixtures/JSObjectMutationTestApp.json
app/client/cypress/fixtures/ImportAppAllAccess.json
app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/JSFunctionExecution_spec.ts
app/client/cypress/fixtures/PartialImportExport/PartialImportExportSampleApp.json
app/client/cypress/fixtures/ImportAppSelectedAccess.json
app/client/cypress/fixtures/TableMigrationAppExported.json
app/client/cypress/fixtures/library_export.json
app/client/cypress/fixtures/resetWidgetBug33601.json
app/client/cypress/fixtures/Table/TableV2FilterImportApp.json
app/client/cypress/support/Pages/JSEditor.ts
app/client/cypress/fixtures/clearIntervalApp.json
app/client/cypress/fixtures/DeleteGitRepos.json
app/client/cypress/fixtures/setIntervalApp.json
🧬 Code Graph Analysis (16)
app/client/src/pages/Editor/JSEditor/JSEditorToolbar/types.ts (1)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1)
ActionRunBehaviourType
(11-11)
app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts (1)
app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts (2)
RUN_BEHAVIOR_CONFIG_PROPERTY
(3-3)RUN_BEHAVIOR_VALUES
(5-24)
app/client/src/ce/reducers/entityReducers/actionsReducer.tsx (2)
app/client/src/ce/constants/ReduxActionConstants.tsx (1)
ReduxActionTypes
(1282-1325)app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1)
ActionRunBehaviourType
(11-11)
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/entities/Action/index.ts (1)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1)
ActionRunBehaviourType
(11-11)
app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts (1)
app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts (2)
RUN_BEHAVIOR_CONFIG_PROPERTY
(3-3)RUN_BEHAVIOR_VALUES
(5-24)
app/client/cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters2_spec.ts (1)
app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug20275_Spec.js (1)
jsEditor
(7-12)
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/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/sagas/PluginSagas.ts (5)
app/client/src/utils/PluginUtils.ts (1)
updatePluginRunBehaviourForPluginSettings
(6-45)app/client/src/constants/AppsmithActionConstants/ActionConstants.tsx (1)
defaultActionSettings
(170-182)app/client/src/api/types.ts (1)
ApiResponse
(14-18)app/client/src/api/PluginApi.ts (1)
PluginFormPayload
(13-25)app/client/src/sagas/ErrorSagas.tsx (1)
validateResponse
(100-155)
app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts (1)
app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts (2)
RUN_BEHAVIOR_CONFIG_PROPERTY
(3-3)RUN_BEHAVIOR_VALUES
(5-24)
app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx (4)
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/PluginSettings.ts (1)
RUN_BEHAVIOR_VALUES
(5-24)app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1)
ActionRunBehaviourType
(11-11)
app/client/src/constants/AppsmithActionConstants/ActionConstants.tsx (1)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1)
PluginActionSettingsConfig
(26-30)
app/client/src/api/ActionAPI.tsx (1)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1)
ActionRunBehaviourType
(11-11)
app/client/src/api/PageApi.tsx (1)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1)
ActionRunBehaviourType
(11-11)
app/client/src/entities/DataTree/dataTreeTypes.ts (1)
app/client/src/ce/entities/DataTree/types.ts (1)
EntityTypeValue
(37-37)
🪛 Biome (1.9.4)
app/client/src/ce/sagas/PageSagas.tsx
[error] 542-542: 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] 545-545: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
⏰ Context from checks skipped due to timeout of 90000ms (61)
- GitHub Check: perform-test / ci-test / ci-test (59)
- GitHub Check: perform-test / ci-test / ci-test (58)
- GitHub Check: perform-test / ci-test / ci-test (57)
- GitHub Check: perform-test / ci-test / ci-test (56)
- GitHub Check: perform-test / ci-test / ci-test (55)
- GitHub Check: perform-test / ci-test / ci-test (54)
- GitHub Check: perform-test / ci-test / ci-test (53)
- GitHub Check: perform-test / ci-test / ci-test (52)
- GitHub Check: perform-test / ci-test / ci-test (51)
- GitHub Check: perform-test / ci-test / ci-test (50)
- GitHub Check: perform-test / ci-test / ci-test (49)
- GitHub Check: perform-test / ci-test / ci-test (48)
- GitHub Check: perform-test / ci-test / ci-test (47)
- GitHub Check: perform-test / ci-test / ci-test (46)
- GitHub Check: perform-test / ci-test / ci-test (45)
- GitHub Check: perform-test / ci-test / ci-test (44)
- GitHub Check: perform-test / ci-test / ci-test (43)
- GitHub Check: perform-test / ci-test / ci-test (42)
- GitHub Check: perform-test / ci-test / ci-test (41)
- GitHub Check: perform-test / ci-test / ci-test (40)
- GitHub Check: perform-test / ci-test / ci-test (39)
- GitHub Check: perform-test / ci-test / ci-test (38)
- GitHub Check: perform-test / ci-test / ci-test (37)
- GitHub Check: perform-test / ci-test / ci-test (36)
- GitHub Check: perform-test / ci-test / ci-test (35)
- GitHub Check: perform-test / ci-test / ci-test (34)
- GitHub Check: perform-test / ci-test / ci-test (33)
- GitHub Check: perform-test / ci-test / ci-test (32)
- GitHub Check: perform-test / ci-test / ci-test (31)
- GitHub Check: perform-test / ci-test / ci-test (30)
- GitHub Check: perform-test / ci-test / ci-test (29)
- GitHub Check: perform-test / ci-test / ci-test (28)
- GitHub Check: perform-test / ci-test / ci-test (27)
- GitHub Check: perform-test / ci-test / ci-test (26)
- GitHub Check: perform-test / ci-test / ci-test (25)
- GitHub Check: perform-test / ci-test / ci-test (24)
- GitHub Check: perform-test / ci-test / ci-test (23)
- GitHub Check: perform-test / ci-test / ci-test (22)
- GitHub Check: perform-test / ci-test / ci-test (21)
- GitHub Check: perform-test / ci-test / ci-test (20)
- GitHub Check: perform-test / ci-test / ci-test (19)
- GitHub Check: perform-test / ci-test / ci-test (18)
- GitHub Check: perform-test / ci-test / ci-test (17)
- GitHub Check: perform-test / ci-test / ci-test (16)
- GitHub Check: perform-test / ci-test / ci-test (15)
- GitHub Check: perform-test / ci-test / ci-test (14)
- GitHub Check: perform-test / ci-test / ci-test (13)
- GitHub Check: perform-test / ci-test / ci-test (12)
- GitHub Check: perform-test / ci-test / ci-test (11)
- GitHub Check: perform-test / ci-test / ci-test (10)
- GitHub Check: perform-test / ci-test / ci-test (9)
- GitHub Check: perform-test / ci-test / ci-test (8)
- GitHub Check: perform-test / ci-test / ci-test (7)
- GitHub Check: perform-test / ci-test / ci-test (6)
- GitHub Check: perform-test / ci-test / ci-test (5)
- GitHub Check: perform-test / ci-test / ci-test (4)
- GitHub Check: perform-test / ci-test / ci-test (3)
- GitHub Check: perform-test / ci-test / ci-test (2)
- GitHub Check: perform-test / ci-test / ci-test (1)
- GitHub Check: perform-test / ci-test / ci-test (0)
- GitHub Check: server-unit-tests / server-unit-tests
🔇 Additional comments (215)
app/client/package.json (1)
430-430
: No functional changes; only newline added.The added newline at end-of-file is a best practice to satisfy POSIX standards and avoid warnings from various tools.
app/client/src/ce/components/editorComponents/GPT/index.tsx (1)
6-6
: Approved: Updated import source for EntityNavigationDataThis change centralizes the EntityNavigationData type import from the shared dataTreeTypes module, which helps maintain consistent type definitions across the codebase.
app/client/src/ce/utils/moduleInstanceNavigationData.ts (1)
2-2
: Approved: Updated import source for EntityNavigationDataThis import change aligns with the standardization of navigation-related type definitions in the codebase.
app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx (1)
16-16
: Approved: Updated THEME constant import sourceThis import change supports the broader refactoring effort to centralize and expand type definitions for plugin action settings.
app/client/src/components/editorComponents/CodeEditor/index.tsx (1)
125-125
: Approved: Updated import source for EntityNavigationDataUpdating the import source to get EntityNavigationData from the centralized dataTreeTypes module improves type consistency across the codebase.
app/client/cypress/e2e/Regression/ServerSide/Datasources/Snowflake_Basic_Spec.ts (1)
168-168
:✅ Verification successful
Approved: Updated ToggleOnPageLoadRun argument to use string value
Changed from boolean to string value to align with the new run behavior model. This update matches the UI control changes from switches to dropdowns.
Verify that similar changes have been made consistently across other test files:
🏁 Script executed:
#!/bin/bash # Verify that ToggleOnPageLoadRun is used with string arguments across test files rg -A 1 "ToggleOnPageLoadRun\(" app/client/cypress/Length of output: 2149
Verified: ToggleOnPageLoadRun uses string arguments consistently
All instances of
ToggleOnPageLoadRun
in your Cypress tests now use the"On page load"
or"Manual"
string values, matching the updated UI behavior model. No further changes required.app/client/src/components/editorComponents/CodeEditor/commandsHelper.ts (1)
19-21
: Import path refactored correctly.The import path for the navigation data types has been updated to use the centralized type definitions, which is a good practice for maintaining consistent type usage across the codebase.
app/client/src/components/editorComponents/CodeEditor/MarkHelpers/entityMarker.ts (1)
1-4
: Import path refactored correctly.The import path for the navigation data types has been updated to use the centralized type definitions, which is a good practice for maintaining consistent type usage across the codebase.
app/client/cypress/e2e/Regression/ServerSide/Params/PassingParams_Spec.ts (1)
79-79
: API run behavior parameter updated correctly.The boolean parameter has been replaced with the more descriptive string value "Manual", which aligns with the new run behavior implementation.
app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/APIOnLoad_Spec.ts (1)
53-53
: API run behavior parameter updated correctly.The boolean parameter has been replaced with the more descriptive string value "On page load", which aligns with the new run behavior implementation.
app/client/cypress/e2e/Regression/ClientSide/PublishedApps/PublishedModeToastToggle_Spec.ts (1)
25-25
: Parameter change from boolean to string matches the API function refactoringThe change from boolean parameter to string parameter "On page load" in both instances of
_.apiPage.ToggleOnPageLoadRun()
correctly aligns with the broader refactoring whereexecuteOnLoad
boolean is replaced with string-basedrunBehaviour
property.Also applies to: 32-32
app/client/src/components/editorComponents/CodeEditor/generateQuickCommands.tsx (1)
17-17
: Import path update aligns with type centralizationThe updated import path for
NavigationData
type improves code organization by centralizing navigation-related types in a single location.app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug14987_spec.js (1)
35-35
: Updated UI label reference matches the new designThe label text change from "Run the query on page load" to "Run behavior" correctly reflects the UI updates from the refactoring of boolean flags to string-based behavior settings.
app/client/cypress/e2e/Regression/ClientSide/JSObject/JSObject_Tests_spec.ts (1)
36-36
: Parameter change to explicit string value improves code clarityAdding the string parameter "On page load" to
jsEditor.EnableDisableAsyncFuncSettings()
makes the intent clearer and aligns with the broader refactoring from boolean flags to string-based run behavior settings.app/client/cypress/fixtures/PartialImportExport/PartialQueryExport.json (1)
1-1
: Correctly migrated to the new execution behavior model.The change from
"executeOnLoad": true
to"runBehaviour": "ON_PAGE_LOAD"
aligns with the codebase-wide refactoring to use more descriptive string-based execution behavior values.app/client/src/utils/DynamicBindingUtils.test.ts (1)
123-123
: Property update matches the new execution behavior schema.The change from
executeOnLoad: false
torunBehaviour: "MANUAL"
correctly implements the new run behavior model being adopted across the codebase.app/client/cypress/e2e/Regression/ClientSide/BugTests/Bug20275_Spec.js (1)
33-33
: Updated parameter to match the new run behavior API.The change from a boolean parameter to the string
"On page load"
correctly reflects the updated interface for theEnableDisableAsyncFuncSettings
method.app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts (1)
145-145
: Updated parameter to match the new run behavior API.The change from a boolean parameter to the string
"Manual"
correctly reflects the updated interface for theToggleOnPageLoadRun
method.app/client/cypress/e2e/Regression/ClientSide/ActionExecution/FrameworkFunctions_ShowCloseModalFunctions_spec.ts (1)
49-49
: Updates clickSettingIcon parameter to use the new string-based run behavior.The change from boolean
true
to the string"On page load"
aligns with the broader refactoring effort to replace boolean flags with more descriptive string-based behaviors. This makes the code more self-documenting and is a positive improvement.app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad2_Spec.ts (1)
97-97
: Updates EnableDisableAsyncFuncSettings parameter to use descriptive string value.The change from boolean
true
to the string"On page load"
for the second parameter makes the code more explicit about the intended behavior. This is consistent with the broader codebase changes replacing boolean flags with string-based run behaviors.app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/SetTimeout_spec.ts (1)
230-230
: Updates EnableDisableAsyncFuncSettings parameter to use the new string-based run behavior.The change from boolean parameter to string
"On page load"
improves code readability and aligns with the codebase-wide refactoring effort to use more descriptive string values for run behaviors.app/client/src/ce/utils/autocomplete/EntityDefinitions.test.ts (1)
47-47
: Updates action configuration properties from boolean to string-based run behavior.The change from
executeOnLoad: false
torunBehaviour: "MANUAL"
provides more clarity and is consistent with the broader refactoring effort to use string-based run behaviors instead of boolean flags. The "MANUAL" value explicitly communicates that the action must be triggered manually rather than automatically.Also applies to: 89-89
app/client/cypress/fixtures/PropertyPaneSlashMenuBindings.json (1)
468-468
: ✅ Correct replacement ofexecuteOnLoad
withrunBehaviour
Each occurrence of the deprecated booleanexecuteOnLoad
has been properly removed and replaced with the new string propertyrunBehaviour: "MANUAL"
, which aligns with theActionRunBehaviour
enum and makes the action’s execution mode explicit.Also applies to: 553-553, 638-638, 723-723, 808-808, 893-893, 978-978, 1063-1063
app/client/cypress/fixtures/jsObjectTesting.json (1)
30132-30138
: runBehaviour Addition is Consistent and Correct
All JSON fixtures now include therunBehaviour
key with the expected"ON_PAGE_LOAD"
or"MANUAL"
values. The syntax (commas, braces) and capitalization are correct and align with the new execution model.Also applies to: 30190-30196, 30248-30254, 30306-30312, 30364-30370, 30422-30428, 30480-30486, 30538-30544, 30596-30602, 30654-30660, 30712-30718, 30770-30776, 30828-30834, 30886-30892, 30944-30950, 31002-31008, 31060-31066, 31118-31124, 31176-31182, 31234-31240, 31292-31298, 31350-31356, 31416-31422, 31485-31491, 31551-31557, 31617-31623, 31675-31681, 31733-31739, 31791-31797, 31849-31855, 31907-31913, 31965-31971, 32023-32029, 32081-32087, 32139-32145, 32197-32203, 32255-32261, 32313-32319
app/client/cypress/fixtures/ImportApps/JSOnLoadFailureTest.json (2)
295-295
: Updated property to use new run behavior model.The code updates from the deprecated boolean
executeOnLoad
to the more descriptive string propertyrunBehaviour
with value"ON_PAGE_LOAD"
. This aligns with the broader refactoring for action execution across the codebase.
350-350
: Consistent implementation of the run behavior property.This second instance of adding
runBehaviour
maintains consistency with the unpublished action version, ensuring the published action uses the same execution model.app/client/src/ce/constants/messages.ts (1)
2594-2594
: Updated label text to reflect new execution behavior model.Changed from "Choose the functions to run on page load" to the more versatile "Choose functions run behavior" to match the shift from a boolean toggle to a dropdown selection of run behaviors.
app/client/src/pages/Editor/JSEditor/utils.test.ts (2)
9-9
: Added import for ActionRunBehaviour enum.Added the necessary import to support the new run behavior model in test fixtures.
48-48
: Updated test fixture to use run behavior enum.Converted from boolean
executeOnLoad: false
to the new string-based enumrunBehaviour: ActionRunBehaviour.MANUAL
, keeping test fixtures aligned with the updated code implementation.app/client/src/entities/Action/actionProperties.test.ts (1)
13-13
: Updated DEFAULT_ACTION test object with run behavior property.Replaced the deprecated boolean
executeOnLoad
with the string-basedrunBehaviour: "MANUAL"
to reflect the new execution model used throughout the application.app/client/src/sagas/BuildingBlockSagas/tests/fixtures.ts (1)
132-132
: Change of executeOnLoad to runBehaviour is correctThe update from boolean
executeOnLoad
to string-basedrunBehaviour
property aligns with the codebase-wide migration to a more descriptive execution control model.app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad4_Spec.ts (1)
37-42
: Test assertions properly updated to use string-based runBehaviourThe test has been correctly updated to verify the new string-based "Manual" run behavior instead of boolean flags. This maintains consistency with the broader refactoring effort.
app/client/src/components/editorComponents/utils.test.ts (2)
2-2
: Added necessary import for ActionRunBehaviour enumCorrect import of the ActionRunBehaviour enum to support the new string-based run behavior model.
34-34
: Test object correctly updated to use enum value for runBehaviourThe TEST_JS_FUNCTION object now properly uses the ActionRunBehaviour.MANUAL enum value instead of a boolean flag, improving type safety and maintaining consistency with the codebase changes.
app/client/src/PluginActionEditor/transformers/RestActionTransformers.test.ts (1)
18-18
: BASE_ACTION properly updated to use string-based runBehaviourThe test constant has been correctly updated to use the string-based "MANUAL" value instead of a boolean flag, consistent with the migration pattern across the codebase.
app/client/cypress/fixtures/mongo_GET_Actions.json (4)
69-69
: Property replaced as part of run behavior refactoring.The boolean
executeOnLoad
property has been replaced with the string-basedrunBehaviour
property with value "MANUAL" for this InsertQuery action.
153-153
: Property replaced as part of run behavior refactoring.The boolean
executeOnLoad
property has been replaced with the string-basedrunBehaviour
property with value "MANUAL" for this DeleteQuery action.
247-247
: Property replaced as part of run behavior refactoring.The boolean
executeOnLoad
property has been replaced with the string-basedrunBehaviour
property with value "ON_PAGE_LOAD" for this FindQuery action.
332-332
: Property replaced as part of run behavior refactoring.The boolean
executeOnLoad
property has been replaced with the string-basedrunBehaviour
property with value "MANUAL" for this UpdateQuery action.app/client/src/ce/entities/DataTree/dataTreeJSAction.test.ts (4)
47-47
: Test updated for run behavior refactoring.Updated test fixtures to use
runBehaviour: "MANUAL"
instead ofexecuteOnLoad: false
for JSAction configuration.
94-94
: Test updated for run behavior refactoring.Updated test fixtures to use
runBehaviour: "MANUAL"
instead ofexecuteOnLoad: false
for JSAction configuration.
242-242
: Test updated for run behavior refactoring.Updated test fixtures to use
runBehaviour: "MANUAL"
instead ofexecuteOnLoad: false
in the second test case.
289-289
: Test updated for run behavior refactoring.Updated test fixtures to use
runBehaviour: "MANUAL"
instead ofexecuteOnLoad: false
in the second test case.app/client/cypress/fixtures/TableFilterImportApp.json (2)
1476-1476
: Property replaced as part of run behavior refactoring.The boolean
executeOnLoad
property has been replaced with the string-basedrunBehaviour
property with value "ON_PAGE_LOAD" for the GetFilterTableTestData action.
1545-1545
: Property replaced as part of run behavior refactoring.The boolean
executeOnLoad
property has been replaced with the string-basedrunBehaviour
property with value "ON_PAGE_LOAD" for the published action.app/client/cypress/fixtures/PartialImportAppNegative.json (2)
405-405
: Clean migration to the new run behavior model.The change from boolean
executeOnLoad
to string-basedrunBehaviour
is properly implemented here. This standardization improves code clarity by making the execution intent explicit.
459-459
: Consistent implementation of run behavior pattern.Good consistency with the change at line 405, maintaining the same pattern throughout the file.
app/client/src/pages/Editor/JSEditor/JSEditorToolbar/types.ts (1)
3-3
: Well-typed migration to the run behavior model.Good use of the appropriate type
ActionRunBehaviourType
to replace the genericboolean | number
union. This improves type safety and makes the code more self-documenting.Also applies to: 6-6
app/client/cypress/e2e/Regression/ServerSide/Datasources/Oracle_Spec.ts (1)
470-470
: Updated test to use the new run behavior model.Correctly updated to use the string-based approach ("Manual") instead of the boolean flag (false). This aligns with the UI change from toggle switches to dropdown selectors.
app/client/cypress/fixtures/one_postgres.json (1)
423-423
: Consistent fixture update for the run behavior refactoring.Properly replaced the boolean
executeOnLoad
with the string-basedrunBehaviour: "ON_PAGE_LOAD"
. This maintains consistency with other fixture files and aligns with the codebase changes.app/client/cypress/fixtures/modalWidgetTestApp.json (3)
7494-7494
: Approved run behavior refactoringThe code correctly implements the migration from the deprecated boolean
executeOnLoad
property to the more descriptive string-basedrunBehaviour
property with the value "ON_PAGE_LOAD" for the unpublished API action configuration.
7535-7535
: Approved consistent implementationThe same refactoring has been properly applied to the published action configuration as well, maintaining consistency between unpublished and published states.
7494-7535
:✅ Verification successful
Verify all references use the new property
This fixture change is part of a broader refactoring. Ensure that any Cypress tests referencing this fixture have been updated to work with the new
runBehaviour
property instead ofexecuteOnLoad
.To verify all references to this property are updated:
🏁 Script executed:
#!/bin/bash # Search for any remaining references to executeOnLoad in Cypress tests rg "executeOnLoad" app/client/cypress/e2e/ # Search for references to the new property to confirm changes were complete rg "runBehaviour" app/client/cypress/e2e/Length of output: 1818
Verification successful: Cypress tests now use
runBehaviour
exclusivelyRan
rg executeOnLoad
andrg runBehaviour
inapp/client/cypress/e2e/
; there are no remainingexecuteOnLoad
references and all tests correctly referencerunBehaviour
.app/client/src/sagas/ActionExecution/PluginActionSaga.ts (2)
172-172
: New import for action run behavior enum.Adding the
ActionRunBehaviour
enum import to support the updated behavior condition in the saga.
1557-1566
: Refactored action execution behavior from boolean to enum-based approach.The function has been updated to check for the new string-based
runBehaviour
property instead of the previous booleanexecuteOnLoad
property. This change is part of a larger refactoring to provide more flexibility in action execution settings.- // Clear the action response if the action has data and is not set to execute on page load. + // Clear the action response if the action has data and is not runBehaviour: ON_PAGE_LOAD.app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts (2)
1-4
: Added imports for run behavior constants.Import of standardized constants for the run behavior configuration, improving consistency across the application.
12-16
: Replaced binary switch with dropdown for run behavior.UI control for execution setting has been enhanced from a binary toggle to a dropdown with multiple options, providing more granular control over action execution behavior.
app/client/cypress/fixtures/exportedApp.json (4)
494-494
: Updated DB action to use string-based run behavior.Replaced boolean
executeOnLoad
with string enumrunBehaviour: "ON_PAGE_LOAD"
for database query execution settings.
549-549
: Updated JS function to use string-based run behavior.Replaced boolean
executeOnLoad
with string enumrunBehaviour: "MANUAL"
for JavaScript function execution settings.
624-624
: Updated API action to use string-based run behavior.Replaced boolean
executeOnLoad
with string enumrunBehaviour: "ON_PAGE_LOAD"
for API action execution settings.
679-679
: Updated second JS function to use string-based run behavior.Replaced boolean
executeOnLoad
with string enumrunBehaviour: "MANUAL"
for JavaScript function execution settings.app/client/cypress/fixtures/forkNonSignedInUser.json (1)
131-131
: Updated query action to use string-based run behavior.Replaced boolean
executeOnLoad
with string enumrunBehaviour: "MANUAL"
for database query execution settings in test fixture.app/client/src/entities/Action/index.ts (2)
13-13
: Good addition of the new type import.The import of
ActionRunBehaviourType
is necessary for the property type definition.
143-143
: Property refactoring looks good.Replacing the boolean
executeOnLoad
with the more descriptive string-basedrunBehaviour
property improves code clarity and allows for more flexible execution control options beyond a simple toggle.app/client/cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters2_spec.ts (2)
180-180
: Updated function parameter to use descriptive string.Changed from a boolean to a string value "On page load" to match the new run behavior model.
239-239
: Updated function parameter to use descriptive string.Changed from a boolean to a string value "Manual" to match the new run behavior model.
app/client/src/utils/JSPaneUtils.test.ts (1)
44-44
: Consistent property refactoring throughout test fixtures.All occurrences of
executeOnLoad: false
have been systematically replaced withrunBehaviour: "MANUAL"
in test objects representing JS actions. This consistent change aligns with the broader refactoring of execution behavior representation.Also applies to: 86-86, 154-154, 196-196, 280-280, 361-361, 472-472, 552-552, 627-627, 702-702, 757-757
app/client/src/pages/Editor/EntityNavigation/JSObjectsPane/index.ts (1)
84-85
: Updated property name in condition check.The condition has been updated to check for the new property name
runBehaviour
instead of the oldexecuteOnLoad
, which is consistent with the property refactoring throughout the codebase.app/client/src/components/formControls/utils.ts (1)
425-428
: Good improvement to excluderunBehaviour
from initial value processing.This change ensures that sections with
runBehaviour
property are excluded from the initial value processing, which aligns with the broader refactoring of replacing booleanexecuteOnLoad
with the more descriptive string-based enumrunBehaviour
.app/client/cypress/fixtures/SampleAppIDETest.json (2)
2051-2051
: Appropriate conversion of database query execution behavior.The boolean
executeOnLoad
has been correctly replaced withrunBehaviour: "ON_PAGE_LOAD"
for the database query, maintaining the original behavior while using the new more descriptive string-based property.Also applies to: 2087-2087
2128-2128
: Correct conversion of manually triggered functions.All JS functions and manual database actions have been properly converted from
executeOnLoad: false
torunBehaviour: "MANUAL"
, maintaining the original execution behavior while using the more descriptive string-based property.Also applies to: 2195-2195, 2257-2257, 2320-2320, 2386-2386, 2445-2445
app/client/src/ce/sagas/PageSagas.tsx (3)
88-89
: Imports correctly updated for the runBehaviour paradigm.The imports have been properly updated to use the new
setActionsRunBehaviour
andsetJSActionsRunBehaviour
action creators, aligning with the codebase-wide refactor replacing booleanexecuteOnLoad
with string-basedrunBehaviour
.
538-538
: Updated to use setActionsRunBehaviour action creator.Action creator call properly updated to match the imported method, maintaining the same filtering logic for actions without collection IDs.
546-546
: Updated to use setJSActionsRunBehaviour action creator.Action creator call properly updated to match the imported method, maintaining the same filtering logic for JS actions with collection IDs.
app/client/cypress/fixtures/PartialImportExport/ImportExport.json (1)
1-1
: JSON fixture updated to use runBehaviour property.The fixture has been properly updated to use the new string property
runBehaviour
set to"ON_PAGE_LOAD"
instead of the deprecated booleanexecuteOnLoad
property, maintaining the same functional behavior.app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts (2)
9-12
: Import statement added for run behavior constants.Appropriate imports added for the run behavior config property and values from plugin settings.
20-24
: UI control updated from switch to dropdown for run behavior.The control for API execution behavior has been properly updated from a toggle/switch to a dropdown with multiple options, with "MANUAL" as the initial value. This change:
- Provides more explicit control options beyond binary on/off
- Improves UI consistency with other action types
- Uses standardized constants for better maintainability
app/client/cypress/fixtures/forkedApp.json (4)
443-443
: API action updated to use runBehaviour property.The mockApi action configuration has been properly updated to use
"runBehaviour": "ON_PAGE_LOAD"
instead of the deprecated booleanexecuteOnLoad: true
, maintaining the same execution behavior.
498-498
: DB action updated to use runBehaviour property.The get_schema database action configuration has been properly updated to use
"runBehaviour": "ON_PAGE_LOAD"
instead of the deprecated booleanexecuteOnLoad: true
, maintaining the same execution behavior.
552-552
: JS function updated to use runBehaviour property.The myFun1 JS function configuration has been properly updated to use
"runBehaviour": "MANUAL"
instead of the deprecated booleanexecuteOnLoad: false
, maintaining the same execution behavior.
612-612
: JS function updated to use runBehaviour property.The myFun2 JS function configuration has been properly updated to use
"runBehaviour": "MANUAL"
instead of the deprecated booleanexecuteOnLoad: false
, maintaining the same execution behavior.app/client/src/components/editorComponents/CodeEditor/EditorConfig.ts (1)
3-6
: Improved import organization by consolidating related types.The change centralizes
DataTree
andEntityNavigationData
imports from a single source module, improving code maintainability.app/client/cypress/fixtures/Table/TableV2FilterImportApp.json (2)
1408-1408
: Property update aligns with codebase execution model refactoring.The boolean
executeOnLoad
property has been replaced with a more descriptive string-basedrunBehaviour
property set to "ON_PAGE_LOAD". This maintains the same functionality while using a more expressive and extensible approach.
1477-1477
: Consistent property update for published action configuration.Same change as the unpublished version - replacing boolean
executeOnLoad
with string-basedrunBehaviour
.app/client/src/utils/FilterInternalProperties/JsAction.ts (2)
4-4
: Added import for new enum type.Imported
ActionRunBehaviour
enum to support the transition from boolean flags to enum-based execution controls.
19-22
: Updated condition to use new execution model.The condition now checks against the
ActionRunBehaviour.ON_PAGE_LOAD
enum value instead of the previous booleanexecuteOnLoad
flag, maintaining the same functionality with improved type safety.app/client/cypress/fixtures/mySQL_GET_Actions.json (4)
32-32
: Updated DeleteQuery execution property to use new model.Changed from boolean
executeOnLoad: false
to stringrunBehaviour: "MANUAL"
for consistency with the codebase refactoring.
78-78
: Updated UpdateQuery execution property.Same pattern - replaced boolean
executeOnLoad: false
with stringrunBehaviour: "MANUAL"
.
127-127
: Updated InsertQuery execution property.Same pattern - replaced boolean
executeOnLoad: false
with stringrunBehaviour: "MANUAL"
.
176-176
: Updated SelectQuery execution property to maintain on-load behavior.Changed from boolean
executeOnLoad: true
to stringrunBehaviour: "ON_PAGE_LOAD"
to preserve the original on-load execution behavior.app/client/cypress/fixtures/apiMultiPartData.json (1)
324-324
: Boolean executeOnLoad property replaced with string runBehaviour propertyThese changes replace the boolean
executeOnLoad: false
with a string-basedrunBehaviour: "MANUAL"
across all API and JavaScript actions in the fixture file.Also applies to: 370-370, 418-418, 459-459, 514-514, 562-562, 615-615, 661-661, 709-709, 750-750, 798-798, 839-839, 902-902, 958-958, 1000-1000, 1037-1037
app/client/cypress/fixtures/executeAction.json (1)
457-457
: Boolean executeOnLoad property replaced with string runBehaviour propertyThese changes replace the boolean
executeOnLoad: true
with a string-basedrunBehaviour: "ON_PAGE_LOAD"
across all API actions in the fixture file.Also applies to: 505-505, 565-565, 613-613
app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts (1)
1-17
: Updated to use dropdown for run behavior instead of binary switchThe configuration has been refactored to:
- Import standardized run behavior constants
- Replace a binary switch for executeOnLoad with a dropdown
- Set "MANUAL" as the default behavior
This change aligns with the broader refactoring to use string-based run behavior values instead of boolean flags.
app/client/src/ce/entities/FeatureFlag.ts (1)
63-63
: Added feature flag for reactive actionsAdded new feature flag
release_reactive_actions_enabled
with default valuefalse
. This flag controls whether actions can automatically run when variables they depend on change.Also applies to: 114-114
app/client/src/ce/reducers/entityReducers/actionsReducer.tsx (2)
16-16
: Added import for new type definition.New import brings in the
ActionRunBehaviourType
type, which is part of the migration from boolean flags to more descriptive string-based behavior controls.
314-332
: Updated reducer handler to use new run behavior property.Changed from boolean
executeOnLoad
to string-basedrunBehaviour
of typeActionRunBehaviourType
. This enhances the state management by providing more granular control over when actions are executed.app/client/cypress/fixtures/ImportApps/JSOnLoadImport.json (6)
1056-1057
: Replaced executeOnLoad with runBehaviour in unpublished action.Updated the MySQL query action configuration to use the more descriptive
runBehaviour
property with a "MANUAL" value instead of a boolean flag.
1109-1110
: Updated published action to use runBehaviour.Consistently applied the same property change in the published version of the MySQL query action.
1169-1170
: Updated JS action configuration to use runBehaviour.Changed the JS function
myFun2
to use the new run behavior pattern.
1225-1226
: Applied consistent change to published JS action.Updated the published version of
myFun2
to maintain consistency with the unpublished version.
1288-1289
: Updated runSpaceCraftImages to use ON_PAGE_LOAD behavior.Changed from
executeOnLoad: true
torunBehaviour: "ON_PAGE_LOAD"
for this JS function, maintaining the same functional behavior while using the new property type.
1344-1345
: Applied consistent change to published version of runSpaceCraftImages.Updated the published version to maintain consistency with the unpublished version.
app/client/src/selectors/navigationSelectors.ts (1)
36-36
: Centralized type definition import.Imported
EntityNavigationData
from a central type definition file rather than defining it locally. This promotes type consistency and reduces duplication across the codebase.app/client/cypress/fixtures/Api_withPageload_Input_TestData.json (1)
1-1
: Updated API test fixture to use runBehaviour.The fixture now uses
"runBehaviour": "ON_PAGE_LOAD"
instead of"executeOnLoad": true
for the PageLoadApi configuration, aligning with the new execution model.app/client/cypress/e2e/Regression/ClientSide/SetProperty/SetOptions_Spec.ts (4)
212-212
: Update references to match new runBehaviour APIThe change from boolean values to string literals ("On page load") aligns with the broader refactoring to use the new
runBehaviour
property instead of the booleanexecuteOnLoad
.
271-271
: String parameter usage is consistentThis change correctly uses "On page load" string parameter for the callback function execution setting, maintaining consistency with the API changes.
316-316
: Consistent parameter usage for concatenation testCorrectly updates the parameter to use the string-based runBehaviour value for the concatenation test case.
358-358
: Manual mode correctly specifiedThe "Manual" string parameter correctly represents the disabled state (previously false) for function execution settings.
app/client/cypress/fixtures/ContextSwitching.json (2)
791-791
: Standardized string-based execution behaviorUpdated REST API action configuration to use string-based
runBehaviour: "MANUAL"
instead of booleanexecuteOnLoad: false
, improving readability and future extensibility.
870-870
: Consistent updates across multiple action typesAll action configurations (GraphQL, JS functions, REST, S3, SQL, and MongoDB) have been consistently updated to the new
runBehaviour: "MANUAL"
pattern, ensuring uniform behavior across the application.Also applies to: 925-925, 997-997, 1110-1110, 1167-1167, 1246-1246, 1300-1300
app/client/src/api/ActionAPI.tsx (2)
13-13
: Added import for new typeAdded import for
ActionRunBehaviourType
to support the updated method signature.
305-312
: API method refactored for improved semanticsUpdated method from
toggleActionExecuteOnLoad
toupdateActionRunBehaviour
with:
- Renamed parameter from boolean
shouldExecute
to typedrunBehaviour: ActionRunBehaviourType
- Updated endpoint from
/executeOnLoad/${actionId}
to/runBehaviour/${actionId}
- Changed payload from
{ flag: shouldExecute.toString() }
to{ behaviour: runBehaviour }
This change improves clarity and allows for more execution modes beyond the binary on/off.
app/client/src/api/PageApi.tsx (2)
12-12
: Added type importAdded import for
ActionRunBehaviourType
to support the updated interface property.
73-73
: Updated response type definitionChanged
executeOnLoad: boolean
torunBehaviour: ActionRunBehaviourType
in theactionUpdates
array within theSavePageResponseData
interface, aligning with the API response structure changes.app/client/cypress/fixtures/gitImport.json (6)
711-711
: MongoQuery run behavior updated correctly.The new
"runBehaviour": "MANUAL"
aligns with the previousexecuteOnLoad: false
setting and matches the expected enum values.
764-764
: echoAPI run behavior mapping is correct.Replacing
executeOnLoad: true
with"runBehaviour": "ON_PAGE_LOAD"
reflects the intended on-load execution.
811-811
: PostgresQuery run behavior mapping is accurate.The
"runBehaviour": "ON_PAGE_LOAD"
value correctly mirrors the old boolean flag.
857-857
: MySQLQuery run behavior conversion is valid.Using
"runBehaviour": "ON_PAGE_LOAD"
properly replaces the deprecatedexecuteOnLoad: true
.
906-906
: JS actionmyFun1
run behavior set to manual.The
"runBehaviour": "MANUAL"
correctly replacesexecuteOnLoad: false
.
956-956
: JS actionmyFun2
run behavior set to manual.The
"runBehaviour": "MANUAL"
mapping is consistent with the previous execution flag.app/client/cypress/fixtures/clearIntervalApp.json (1)
1-1
: Added runBehaviour property for JS actions.All JS actions in this fixture now include
"runBehaviour": "MANUAL"
, ensuring they only execute on-demand.app/client/cypress/fixtures/ImportAppAllAccess.json (1)
1-1
: Fetch_many_query run behavior updated.The property
"runBehaviour": "ON_PAGE_LOAD"
correctly replaces the old boolean flag to trigger thefetch_many_query
action on page load.app/client/cypress/fixtures/CommunityIssuesExport.json (1)
7798-9899
: Consistent migration of executeOnLoad to runBehaviour
The JSON fixtures now uniformly replace the deprecatedexecuteOnLoad
boolean with the descriptiverunBehaviour
strings ("MANUAL"
/"ON_PAGE_LOAD"
), preserving previous semantics and matching theActionRunBehaviour
enum. All related dynamic binding lists and validation flags remain unchanged.app/client/cypress/fixtures/ImportAppReadWriteAccess.json (1)
1-1
: PropertyrunBehaviour
replacesexecuteOnLoad
in action configurationThe change replaces the deprecated boolean property
executeOnLoad
with the new string-based propertyrunBehaviour: "ON_PAGE_LOAD"
for thefetch_many_query_read_write
action. This aligns with the codebase's migration to more descriptive execution behavior controls.app/client/cypress/fixtures/resetWidgetBug33601.json (1)
1-1
: Standardizing action execution behavior withrunBehaviour
The fixture has been updated to explicitly set
runBehaviour: "MANUAL"
for both the JavaScript actionmyFun1
and API actionApi1
, replacing the deprecated boolean property. This improves clarity about when these actions will execute.app/client/src/components/formControls/DropDownControl.tsx (3)
23-43
: Enhanced option display with styled components for labels and subtextsAdded styled components to improve dropdown option display with proper typography hierarchy:
OptionLabel
for primary text with emphasized stylingOptionSubText
for secondary information with subdued stylingThis supports the UI requirements for the new run behavior selection dropdown.
477-477
: Fixed dropdown list height improves UI consistencySetting a consistent
listHeight
of 240 pixels ensures uniform dropdown experience across the application.
511-543
: Enhanced option rendering with vertical layout for options containing subtextsThe function now conditionally renders options with a vertical layout when a subText is present, showing:
- Icon and primary label on the first line
- Subtext on a second line
This creates a clearer visual hierarchy for options containing additional descriptive information.
app/client/cypress/fixtures/PartialImportExport/PartialImportExportSampleApp.json (6)
2211-2211
: Approve runBehaviour for JS actionmyFun2
.
The new"runBehaviour": "MANUAL"
flag correctly replaces the old boolean and aligns with manual execution semantics.
2267-2267
: Approve runBehaviour for JS actionaddNumbers
.
Switching to"runBehaviour": "MANUAL"
is consistent for this synchronous function.
2321-2321
: Approve runBehaviour for DB actionUpdateQuery
.
Applying"runBehaviour": "MANUAL"
here ensures the update executes only on demand.
2386-2386
: Approve runBehaviour for DB actionInsertQuery
.
The"MANUAL"
setting correctly defers the insert to explicit triggers.
2451-2451
: Approve runBehaviour for DB actionDeleteQuery
.
Using"MANUAL"
matches the expected delete-on-click behavior.
2502-2502
: Approve runBehaviour for DB actionSelectQuery
.
Setting"runBehaviour": "ON_PAGE_LOAD"
withuserSetOnLoad: true
correctly schedules the initial data fetch.app/client/cypress/fixtures/ImportAppSelectedAccess.json (1)
1-1
: Confirm runBehaviour and userSetOnLoad consistency.
The"runBehaviour": "ON_PAGE_LOAD"
replacement is correct, but please verify thatuserSetOnLoad
is set appropriately (true when the action should auto‐execute).app/client/src/constants/AppsmithActionConstants/ActionConstants.tsx (2)
11-11
: Approve import ofPluginActionSettingsConfig
type.
Adding this import strengthens type safety for action settings.
170-173
: Approve strong typing fordefaultActionSettings
.
Changing toRecord<PluginType, PluginActionSettingsConfig[]>
enhances clarity and prevents misuse of settings configs.app/client/cypress/fixtures/ImportAppReadAccess.json (1)
1-1
: Confirm runBehaviour and userSetOnLoad consistency.
The"runBehaviour": "ON_PAGE_LOAD"
update is correct; please double-check thatuserSetOnLoad
reflects the intended auto‐execute behavior.app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.test.tsx (5)
6-6
: Added appropriate import for ActionRunBehaviour enum.The added import properly supports the transition from boolean executeOnLoad to string-based runBehaviour.
19-19
: Updated test name to match the new terminology.Test title now correctly refers to "run behavior" instead of the deprecated "execute on load" concept.
31-31
: Test updated to check for dropdown components instead of switches.The test appropriately verifies comboboxes (dropdowns) replacing the previous switch components, aligning with the UI changes for the run behavior selection.
Also applies to: 40-40
43-43
: Test data updated to use enum values instead of booleans.The test now properly uses
ActionRunBehaviour.ON_PAGE_LOAD
andActionRunBehaviour.MANUAL
enum values instead of boolean flags, correctly reflecting the data structure changes.Also applies to: 47-47, 51-51
63-68
: Updated assertions to check dropdown selection text.The test now correctly verifies the presence of specific dropdown selection text ("On page load" and "Manual") with appropriate CSS selectors, validating the new UI implementation.
Also applies to: 70-71
app/client/cypress/fixtures/TableMigrationAppExported.json (2)
4574-4574
: Consistent replacement ofexecuteOnLoad
withrunBehaviour
: ON_PAGE_LOAD
The change correctly uses"runBehaviour": "ON_PAGE_LOAD"
in place of the old boolean flag for page-load actions, improving clarity and aligning with the new string-based API.Also applies to: 4639-4639, 5058-5058, 5139-5139, 5930-5930, 6011-6011, 6096-6096, 6161-6161, 6350-6350, 6415-6415, 6608-6608, 6673-6673, 6867-6867, 6930-6930, 7004-7004, 7067-7067, 7142-7142, 7205-7205, 7280-7280, 7345-7345, 7429-7429, 7511-7511
4702-4702
: Consistent replacement ofexecuteOnLoad
withrunBehaviour
: MANUAL
The change correctly uses"runBehaviour": "MANUAL"
in place of the old boolean flag for manually triggered actions, aligning with the broader refactor.Also applies to: 4753-4753, 4814-4814, 4863-4863, 4924-4924, 4973-4973, 5209-5209, 5261-5261, 5327-5327, 5381-5381, 5447-5447, 5501-5501, 5565-5565, 5617-5617, 5681-5681, 5733-5733, 5795-5795, 5846-5846, 6223-6223, 6274-6274, 6479-6479, 6532-6532, 6737-6737, 6790-6790
app/client/cypress/fixtures/JSObjectMutationTestApp.json (1)
517-517
: Property replacement across JS functions is consistent.The change from boolean
executeOnLoad
to string enumrunBehaviour
is applied consistently across all JS functions in this fixture file. This new approach provides clearer execution semantics with values like "MANUAL" and "ON_PAGE_LOAD" instead of boolean values.Also applies to: 554-554, 595-595, 634-634, 675-675, 713-713, 754-754, 791-791, 832-832, 870-870, 911-911, 951-951, 992-992, 1031-1031, 1072-1072, 1111-1111, 1152-1152, 1191-1191, 1232-1232, 1271-1271, 1312-1312, 1352-1352, 1393-1393, 1432-1432, 1473-1473, 1512-1512, 1556-1556, 1593-1593, 1634-1634, 1673-1673, 1714-1714, 1752-1752, 1796-1796, 1835-1835, 1877-1877, 1916-1916, 1960-1960, 1999-1999, 2041-2041, 2079-2079, 2119-2119, 2159-2159
app/client/cypress/fixtures/library_export.json (1)
1-1
: Fixture updated to reflect new run behavior property.The update to the JSON fixture now uses the string-based
runBehaviour
property with values "MANUAL" and "ON_PAGE_LOAD" for JS functions, aligning with the broader refactoring effort.app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts (2)
1-4
: Clean implementation of run behavior configuration constants.Good structure for defining the property name as a constant, which will help maintain consistency throughout the codebase.
5-24
: Well-structured run behavior options with clear descriptions.The configuration provides three distinct run modes with appropriate descriptions:
- Automatic - reactive to dependencies
- On page load - runs at initialization or manually
- Manual - explicit triggering only
This enhances developer understanding and control over when actions execute.
app/client/src/sagas/PluginSagas.ts (5)
48-49
: Feature flag integration for run behavior settings.Good approach importing utilities for the feature flag check and plugin settings update.
169-177
: Feature flag check for reactive actions.The code correctly checks for the feature flag "release_reactive_actions_enabled" and conditionally updates the plugin settings based on its value, ensuring smooth feature rollout.
183-183
: Updated settings for JS plugin type.The code now correctly uses the updated settings with run behavior configuration for JavaScript plugins.
201-201
: Consistent use of updated settings for other plugin types.The code uses the same updated plugin settings consistently for other plugin types, maintaining the same behavior across different actions.
268-268
: Settings assignment uses updated plugin settings.The code correctly uses the updated settings with run behavior configuration when setting defaults, ensuring a consistent experience.
app/client/src/pages/Editor/SaaSEditor/__data__/FinalState.json (2)
2546-2567
: Update settingConfigs: dropdown for run behaviour
The switch control has been replaced by a dropdown with three options (AUTOMATIC
,ON_PAGE_LOAD
,MANUAL
), each with clear labels and descriptions. The default"MANUAL"
matches the previous off state. Good job maintaining consistency.
86-86
:✅ Verification successful
Consistent migration to
runBehaviour
in actionConfiguration
The booleanexecuteOnLoad
has been correctly replaced with the stringrunBehaviour: "MANUAL"
. This aligns with the new enum-based model.Please verify that there are no residual
executeOnLoad
entries in this JSON snapshot:
🏁 Script executed:
#!/bin/bash # Search for any lingering executeOnLoad references rg -nw "executeOnLoad" app/client/src/pages/Editor/SaaSEditor/__data__/FinalState.jsonLength of output: 86
Consistent migration to
runBehaviour
confirmed
No lingeringexecuteOnLoad
entries found inapp/client/src/pages/Editor/SaaSEditor/__data__/FinalState.json
.app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts (7)
2310-2310
: Good replacement of executeOnLoad with runBehaviourThe change from boolean executeOnLoad to string runBehaviour with "ON_PAGE_LOAD" value improves code readability and provides more explicit behavior definition.
2394-2394
: Appropriate manual run behavior settingSetting runBehaviour to "MANUAL" aligns with the pattern established in the codebase migration from boolean executeOnLoad to the more descriptive string enum.
10041-10064
: Good UI control enhancement for run behaviorThe dropdown implementation provides better UX than the previous switch control by:
- Offering three distinct behaviors instead of just on/off
- Including helpful descriptions for each option
- Using clear, descriptive labels
This is a significant usability improvement.
10098-10121
: Consistent implementation of run behavior dropdownThis dropdown matches the implementation from the previous section, maintaining consistency across different query types.
10155-10178
: Consistent API run behavior controlsThe dropdown implementation for API run behavior follows the same pattern, maintaining a consistent user experience across different action types.
10241-10264
: Consistent run behavior dropdown implementationThe dropdown control implementation remains consistent with previous instances, which is good for maintainability and UX.
10439-10439
: Consistent JS action run behavior implementationAll JavaScript actions have been properly updated to use the new runBehaviour property with "MANUAL" value, consistent with the migration pattern throughout the file.
Also applies to: 10489-10489, 10573-10573, 10623-10623
app/client/cypress/fixtures/PartialImportExport/QueriesExportedOnly.json (1)
1-1
: LGTM - Proper replacement ofexecuteOnLoad
withrunBehaviour
The fixture has been updated to use the new
runBehaviour
string property instead of the booleanexecuteOnLoad
property, which provides more expressive and descriptive control over query execution timing.app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/JSFunctionExecution_spec.ts (6)
18-24
: Interface properly updated to use string union typeThe
IFunctionSettingData
interface has been updated to use a string union type for the execution behavior, which is more descriptive and extensible than the previous boolean approach.
35-66
: LGTM - Test data correctly migrated to use string literalsAll test data has been correctly updated to use the new string-based
runBehaviour
property with appropriate values of "On page load" or "Manual".
361-363
: Filter logic correctly updatedThe filter condition for functions that run on page load and require confirmation has been updated to check
func.runBehaviour
instead offunc.onPageLoad
.
404-410
: Function call signature updated correctlyCalls to
jsEditor.EnableDisableAsyncFuncSettings
now pass the string value for run behavior instead of a boolean.
503-504
: Function call signature updated correctlyCall to
jsEditor.EnableDisableAsyncFuncSettings
for the specific test case has been updated to use string literals.
508-508
: Verification call correctly updatedCall to
jsEditor.VerifyAsyncFuncSettings
has been updated to use the string-based run behavior parameter.app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx (6)
2-8
: Import statements properly updated for dropdown componentImports have been updated to include the necessary components for the dropdown control that replaces the previous boolean toggle.
17-20
: Required imports added for new functionalityAdded imports for the
ActionRunBehaviourType
, styled components, and run behavior constants, plus a feature flag hook for conditional rendering.
22-35
: Well-structured styled components for dropdown optionsThe styled components for the dropdown labels and descriptions are well-organized and follow the design system styling conventions.
48-53
: State management adapted for string-based run behaviorThe component now manages state using the string-based
runBehaviour
value and correctly filters options based on a feature flag.
59-74
: Event handler refactored for dropdown selectionThe callback for handling option selection is properly refactored to work with string values instead of booleans, and analytics events are properly updated.
89-116
: UI updated from switch to dropdown with clear optionsThe UI has been updated to use a dropdown select control with descriptive labels and subtexts, providing better user experience and clearer intent.
app/client/src/pages/Editor/SaaSEditor/__data__/InitialState.json (4)
85-85
: Config properly updated with string-based run behaviorThe SaaS action configuration has been updated to use
runBehaviour
with a value of "MANUAL" instead of the booleanexecuteOnLoad
.
2545-2568
: Settings UI configuration updated to use dropdownThe settings configuration for plugins has been updated to use a dropdown control for selecting run behavior, with descriptive labels and subtexts for each option.
2704-2724
: Consistent dropdown configuration across plugin typesThe run behavior dropdown configuration is consistently applied across different plugin types, ensuring a unified user experience.
2850-2870
: Run behavior options include all execution modesThe dropdown options include all three execution modes (Automatic, On page load, Manual) with clear explanations of when each mode triggers a query execution.
app/client/src/entities/DataTree/dataTreeTypes.ts (3)
6-6
: Good import addition.Adding the
EntityTypeValue
type for proper type checking in the new navigation interfaces.
28-44
: Well-structured NavigationData interface.The interface provides a comprehensive type definition for navigation entities with appropriate optional flags and metadata fields. The hierarchy is properly defined with the recursive children property.
46-46
: Appropriate type alias definition.The
EntityNavigationData
type alias creates a proper mapping of string keys to NavigationData objects, allowing for lookups by entity identifier.app/client/src/actions/pluginActionActions.ts (3)
23-23
: Good import addition.Adding the
ActionRunBehaviourType
for proper type checking in action payloads.
355-366
: Refactored to descriptive run behavior.Good replacement of the boolean
executeOnLoad
with the more descriptiverunBehaviour
property. This makes the code more maintainable and provides clearer semantics for action execution modes.
368-380
: Consistent refactoring for JS actions.Follows the same pattern as regular actions, maintaining consistency across the codebase.
app/client/cypress/fixtures/DeleteGitRepos.json (1)
1-1
: Fixture updated for run behavior.The JSON fixture has been properly updated to use string-based
runBehaviour
values instead of booleanexecuteOnLoad
flags, maintaining consistency with the application code changes.app/client/src/ce/reducers/entityReducers/jsActionsReducer.tsx (3)
11-11
: Good import addition.Adding the
ActionRunBehaviourType
for proper type checking in reducer operations.
364-392
: Refactored update handler.The reducer handler has been properly updated to use
runBehaviour
instead ofexecuteOnLoad
. The implementation correctly sets the new property on matching JS actions.
393-420
: Consistent batch setter implementation.The batch setter handling multiple JS actions has been properly updated to use
runBehaviour
while maintaining the same data flow patterns.app/client/cypress/support/Pages/ApiPage.ts (4)
107-109
: Looks good - added selectors for the new run behaviour dropdown.These selector additions properly support the new dropdown-based UI for run behavior settings.
278-287
: Method updated to use dropdown instead of checkbox toggle.The method has been properly refactored to select options from a dropdown instead of toggling a checkbox. This aligns with the broader changes replacing
executeOnLoad
boolean with a string-basedrunBehaviour
property.
511-520
: MethodToggleOnPageLoadRunJsObject
updated for dropdown interaction.This method now correctly uses the dropdown selection pattern to set the run behavior, maintaining consistency with the API changes.
522-530
: RefactoredclickSettingIcon
to handle run behaviour dropdown.Method now properly handles the dropdown selection for run behavior with consistent parameter naming.
app/client/cypress/support/Pages/JSEditor.ts (5)
53-58
: Selectors updated to target combobox instead of switch.The selectors have been appropriately updated to target the new combobox-based UI elements for run behavior selection.
59-59
: Changed visibility of_jsObjName
from private to public.The visibility change may indicate this property needs to be accessed from outside the class. Consider if this breaks encapsulation principles.
Is this property access needed from outside the class? If not, consider maintaining it as private.
98-99
: Added selector for dropdown option by run behavior value.This selector correctly targets the dropdown option elements based on the run behavior label.
301-311
: Updated verification method to check dropdown selection instead of switch status.Method signature and implementation properly updated to verify run behavior from dropdown selection.
313-327
: Updated method to set run behavior via dropdown.Method correctly refactored to interact with the dropdown UI control rather than toggling a switch.
app/client/src/sagas/JSPaneSagas.ts (4)
104-104
: Added import for ActionRunBehaviourType.Proper type import for the new run behavior typing system.
786-797
: UpdatedsetFunctionPropertySaga
to check for "runBehaviour" property.The saga now correctly looks for the "runBehaviour" property instead of "executeOnLoad" and dispatches the appropriate updated action type.
850-882
: Renamed and updated saga to handle run behavior changes.Saga has been properly renamed from
toggleFunctionExecuteOnLoadSaga
toupdateFunctionRunBehaviourSaga
with updated parameter and API call to match the new run behavior model.
947-949
: Updated root saga watcher for the new action type.The saga watcher now correctly listens for the new action type that matches the renamed function.
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (3)
1-4
: Proper imports and theme constant definition.The theme constant is appropriately defined and exported.
5-11
: Well-defined enum and type for run behavior.The
ActionRunBehaviour
enum provides clear, descriptive values that better express the intent than the previous boolean flag. The type alias ensures proper type checking.
13-31
: Well-structured interface definitions for plugin settings.These interfaces provide proper typing for the plugin action settings configuration, with appropriate optional properties.
app/client/src/sagas/ActionSagas.ts (4)
150-150
: Import of new type for run behavior management.The new ActionRunBehaviourType type import supports the transition from boolean executeOnLoad to string-based run behavior.
1042-1052
: Property check updated to handle runBehaviour instead of executeOnLoad.The saga now dispatches the new UPDATE_ACTION_RUN_BEHAVIOR_INIT action type with appropriate payload type casting when the runBehaviour property is updated.
1064-1089
: Renamed and refactored saga for handling action run behavior.The saga function has been renamed from toggleActionExecuteOnLoadSaga to updateActionRunBehaviourSaga to reflect its broader purpose. The implementation now properly passes the new runBehaviour value to the updated API method.
1269-1271
: Updated watcher saga to use new action type.The watcher saga now listens for UPDATE_ACTION_RUN_BEHAVIOR_INIT actions and invokes the renamed saga function.
app/client/src/ce/constants/ReduxActionConstants.tsx (4)
69-72
: Added new action types for JS editor run behavior.New constants added to support the run behavior model for JS actions, replacing the previous executeOnLoad boolean approach.
87-87
: Added error action type for function run behavior.Proper error handling action type added for function run behavior operations.
809-811
: Added action types for plugin action run behavior.New constants to support the run behavior model for plugin actions, replacing the previous executeOnLoad functionality.
825-825
: Added error action type for action run behavior.Error handling action type for action run behavior operations.
app/client/cypress/fixtures/setIntervalApp.json (1)
1-1
: Updated test fixture with new run behavior properties.The fixture has been updated to use "runBehaviour": "MANUAL" for all API actions and JS functions instead of the previous executeOnLoad boolean property. The change is consistent with the codebase refactoring.
…com/appsmithorg/appsmith into chore/remove-unnecessary-code
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/14931312892. |
There was a problem hiding this 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
🧹 Nitpick comments (1)
app/server/appsmith-server/src/test/java/com/appsmith/server/services/LayoutServiceTest.java (1)
1121-1124
: Updated assertions to verify RunBehaviourEnum values.Properly testing expected behavior after the migration from boolean to enum-based run control. The semicolons on lines 894 and 896 appear unnecessary though.
- assertThat(tuple.getT1().getRunBehaviour()).isEqualTo(RunBehaviourEnum.ON_PAGE_LOAD); - ; - assertThat(tuple.getT2().getRunBehaviour()).isEqualTo(RunBehaviourEnum.ON_PAGE_LOAD); - ; + assertThat(tuple.getT1().getRunBehaviour()).isEqualTo(RunBehaviourEnum.ON_PAGE_LOAD); + assertThat(tuple.getT2().getRunBehaviour()).isEqualTo(RunBehaviourEnum.ON_PAGE_LOAD);
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro (Legacy)
📒 Files selected for processing (48)
app/client/cypress/fixtures/PartialImportExport/QueriesExportedOnly.json
(1 hunks)app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx
(3 hunks)app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/spans/ce/LayoutSpanCE.java
(1 hunks)app/server/appsmith-interfaces/src/main/java/com/appsmith/external/dtos/LayoutExecutableUpdateDTO.java
(2 hunks)app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/DataTypeStringUtils.java
(1 hunks)app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/Executable.java
(2 hunks)app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/RunBehaviourEnum.java
(1 hunks)app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/ce/ActionCE_DTO.java
(2 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/domains/ce/NewActionCE.java
(1 hunks)app/server/appsmith-server/src/main/java/com/appsmith/server/dtos/LayoutExecutableUpdateDTO.java
(2 hunks)app/server/appsmith-server/src/main/java/com/appsmith/server/dtos/ce/ActionViewCE_DTO.java
(2 hunks)app/server/appsmith-server/src/main/java/com/appsmith/server/layouts/UpdateLayoutServiceCEImpl.java
(2 hunks)app/server/appsmith-server/src/main/java/com/appsmith/server/newactions/base/NewActionServiceCEImpl.java
(2 hunks)app/server/appsmith-server/src/main/java/com/appsmith/server/onload/internal/OnLoadExecutablesUtilCE.java
(1 hunks)app/server/appsmith-server/src/main/java/com/appsmith/server/onload/internal/OnLoadExecutablesUtilCEImpl.java
(5 hunks)app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CustomNewActionRepositoryCE.java
(1 hunks)app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CustomNewActionRepositoryCEImpl.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
(4 hunks)app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/CreateDBTablePageSolutionCEImpl.java
(2 hunks)app/server/appsmith-server/src/main/resources/CRUD-DB-Table-Template-Application.json
(76 hunks)app/server/appsmith-server/src/test/java/com/appsmith/server/exports/internal/ExportServiceTests.java
(7 hunks)app/server/appsmith-server/src/test/java/com/appsmith/server/fork/ApplicationForkingServiceTests.java
(3 hunks)app/server/appsmith-server/src/test/java/com/appsmith/server/git/CommonGitServiceCETest.java
(3 hunks)app/server/appsmith-server/src/test/java/com/appsmith/server/imports/internal/ImportServiceTests.java
(7 hunks)app/server/appsmith-server/src/test/java/com/appsmith/server/services/LayoutActionServiceTest.java
(17 hunks)app/server/appsmith-server/src/test/java/com/appsmith/server/services/LayoutServiceTest.java
(5 hunks)app/server/appsmith-server/src/test/java/com/appsmith/server/services/PageServiceTest.java
(5 hunks)app/server/appsmith-server/src/test/java/com/appsmith/server/services/ce/ActionServiceCE_Test.java
(14 hunks)app/server/appsmith-server/src/test/java/com/appsmith/server/services/ce/ApplicationServiceCETest.java
(6 hunks)app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/CreateDBTablePageSolutionTests.java
(7 hunks)app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/PartialExportServiceTest.java
(3 hunks)app/server/appsmith-server/src/test/resources/com/appsmith/server/git/application.json
(120 hunks)app/server/appsmith-server/src/test/resources/com/appsmith/server/git/autocommit/application.json
(120 hunks)app/server/appsmith-server/src/test/resources/com/appsmith/server/git/autocommit/autocommit.json
(12 hunks)app/server/appsmith-server/src/test/resources/com/appsmith/server/git/ce-automation-test.json
(120 hunks)app/server/appsmith-server/src/test/resources/com/appsmith/server/imports/internal/faulty-dsl.json
(30 hunks)app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/building-block.json
(6 hunks)app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/invalid-application-without-pageId-action-collection.json
(2 hunks)app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/partial-export-resource.json
(8 hunks)app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/partial-export-valid-without-widget.json
(2 hunks)app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-with-custom-themes.json
(3 hunks)app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-with-page-added.json
(16 hunks)app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-with-un-configured-datasource.json
(2 hunks)app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-without-action-collection.json
(2 hunks)app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-without-theme.json
(3 hunks)app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application.json
(4 hunks)
✅ Files skipped from review due to trivial changes (29)
- app/server/appsmith-server/src/main/java/com/appsmith/server/domains/ce/NewActionCE.java
- app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/partial-export-valid-without-widget.json
- app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-without-action-collection.json
- app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/partial-export-resource.json
- app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/invalid-application-without-pageId-action-collection.json
- app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/spans/ce/LayoutSpanCE.java
- app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-with-custom-themes.json
- app/server/appsmith-server/src/main/java/com/appsmith/server/layouts/UpdateLayoutServiceCEImpl.java
- app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/DataTypeStringUtils.java
- app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CustomNewActionRepositoryCE.java
- app/server/appsmith-server/src/test/resources/com/appsmith/server/imports/internal/faulty-dsl.json
- app/server/appsmith-server/src/test/resources/com/appsmith/server/git/autocommit/application.json
- app/server/appsmith-server/src/test/resources/com/appsmith/server/git/application.json
- app/server/appsmith-server/src/test/java/com/appsmith/server/fork/ApplicationForkingServiceTests.java
- app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-with-un-configured-datasource.json
- app/server/appsmith-server/src/test/java/com/appsmith/server/exports/internal/ExportServiceTests.java
- app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-without-theme.json
- app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/RunBehaviourEnum.java
- app/server/appsmith-server/src/test/resources/com/appsmith/server/git/autocommit/autocommit.json
- app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application-with-page-added.json
- app/server/appsmith-server/src/test/resources/com/appsmith/server/git/ce-automation-test.json
- app/server/appsmith-server/src/main/resources/CRUD-DB-Table-Template-Application.json
- app/client/cypress/fixtures/PartialImportExport/QueriesExportedOnly.json
- app/server/appsmith-server/src/main/java/com/appsmith/server/onload/internal/OnLoadExecutablesUtilCE.java
- app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/valid-application.json
- app/server/appsmith-server/src/test/java/com/appsmith/server/imports/internal/ImportServiceTests.java
- app/server/appsmith-server/src/test/resources/test_assets/ImportExportServiceTest/building-block.json
- app/server/appsmith-server/src/test/java/com/appsmith/server/services/ce/ApplicationServiceCETest.java
- app/server/appsmith-server/src/main/java/com/appsmith/server/newactions/base/NewActionServiceCEImpl.java
🚧 Files skipped from review as they are similar to previous changes (1)
- app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx
🧰 Additional context used
🧬 Code Graph Analysis (1)
app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CustomNewActionRepositoryCEImpl.java (1)
app/server/appsmith-server/src/main/java/com/appsmith/server/domains/ce/NewActionCE.java (1)
Fields
(64-91)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: perform-test / client-build / client-build
- GitHub Check: server-unit-tests / server-unit-tests
- GitHub Check: client-unit-tests / client-unit-tests
🔇 Additional comments (61)
app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/LayoutActionServiceCE.java (2)
4-4
: Appropriate import added for the new enum type.The
RunBehaviourEnum
import supports the new method added below.
21-21
: Good enhancement to replace boolean flag with a more expressive enum.This new method provides more flexibility than the existing
setExecuteOnLoad
method by using an enum instead of a boolean. This allows for more than just two states and improves code readability with self-descriptive states.app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/PartialExportServiceTest.java (3)
12-12
: Appropriate import added for the enum type.The
RunBehaviourEnum
import supports the changes to test methods below.
301-301
: Test updated to use the new enum-based behavior.This change replaces the old boolean flag with the more descriptive enum value, maintaining test functionality while aligning with the new API.
361-361
: Test correctly updated to use enum-based behavior.Similar to the earlier test case, this change properly updates the action configuration to use the more expressive enum approach.
app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/CreateDBTablePageSolutionCEImpl.java (2)
18-18
: Appropriate import added for the enum type.The
RunBehaviourEnum
import supports the implementation changes below.
456-458
: Implementation updated to use the new enum-based behavior.The code correctly switches from using the deprecated
setExecuteOnLoad
with a boolean parameter to the newsetRunBehaviour
with an enum value. This provides more clarity about the intended behavior and aligns with the broader refactoring effort.app/server/appsmith-server/src/test/java/com/appsmith/server/git/CommonGitServiceCETest.java (3)
16-16
: Added import for the new enum type.The import for
RunBehaviourEnum
has been correctly added to support the refactoring from booleanexecuteOnLoad
to the more descriptive enum-based approach.
1223-1223
: Boolean flag refactored to enum for better readability.Changed from
setExecuteOnLoad(true)
tosetRunBehaviour(RunBehaviourEnum.ON_PAGE_LOAD)
to provide more descriptive behavior specification. This is a good improvement as it makes the code intentions clearer and allows for more types of behaviors beyond a simple boolean.
2550-2550
: Consistent refactoring applied to another test case.The same pattern of replacing the boolean flag with the enum has been correctly applied here, maintaining consistency across the codebase. This change aligns with the others in this PR.
app/server/appsmith-server/src/test/java/com/appsmith/server/services/PageServiceTest.java (4)
10-10
: Added import for RunBehaviourEnumThis import is necessary to support the migration from boolean
executeOnLoad
to enum-based run behavior.
597-597
: Updated to use RunBehaviourEnum instead of boolean executeOnLoadAction configuration has been properly updated to use the new RunBehaviourEnum for specifying execution behavior.
740-742
: Updated assertion to check RunBehaviourEnum instead of boolean flagThe test now correctly asserts that the cloned action preserves the RunBehaviourEnum value from the original action.
969-980
: Updated cloned page test assertions for RunBehaviourEnumThe test now correctly verifies that the cloned actions retain the proper RunBehaviourEnum values with appropriate assertions.
app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/LayoutActionServiceCEImpl.java (4)
9-9
: Added import for RunBehaviourEnumRequired import to support the transition from boolean executeOnLoad to enum-based run behavior.
293-314
: Properly deprecated the old setExecuteOnLoad methodGood practice to mark the method as deprecated while maintaining backward compatibility until all call sites are updated.
316-336
: Added new setRunBehaviour methodThis implementation correctly replaces the deprecated setExecuteOnLoad functionality with the new enum-based approach, maintaining the same business logic around user settings and page layout updates.
412-412
: Updated action creation to use RunBehaviourEnum.MANUALAction creation now correctly initializes with the enum value instead of the deprecated boolean flag.
app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/CreateDBTablePageSolutionTests.java (6)
16-16
: Added import for RunBehaviourEnumRequired import to support test assertions using the enum values instead of boolean flags.
683-688
: Updated SELECT_QUERY action assertionsTests now correctly verify that select queries have ON_PAGE_LOAD behavior and other queries have MANUAL behavior.
763-768
: Updated run behavior assertions for Redshift datasource testsTests properly verify the expected run behavior for different action types in Redshift datasource integration.
891-896
: Updated run behavior assertions for Snowflake datasource testsTests properly verify the expected run behavior for different action types in Snowflake datasource integration.
1058-1063
: Updated run behavior assertions for Google Sheets datasource testsTests properly verify the expected run behavior for different action types in Google Sheets datasource integration.
1138-1143
: Updated run behavior assertions for MongoDB datasource testsTests properly verify the expected run behavior for different action types in MongoDB datasource integration.
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/dtos/LayoutExecutableUpdateDTO.java (4)
3-3
: Added import for RunBehaviourEnumRequired import to support the new enum-based run behavior field.
25-27
: Properly deprecated executeOnLoad fieldThe boolean field is correctly marked as deprecated and its JSON view is restricted to internal use, which will prevent clients from depending on it.
29-31
: Added RunBehaviourEnum fieldThe new enum field is properly added with public JSON view to make it available to API consumers.
33-46
: Implemented backward-compatible getterThis custom getter implementation ensures backward compatibility by deriving the run behavior from the deprecated executeOnLoad field when needed, making the transition smoother.
app/server/appsmith-server/src/test/java/com/appsmith/server/services/ce/ActionServiceCE_Test.java (4)
14-14
: Added import for the new enum type.The addition of
RunBehaviourEnum
import supports the migration from booleanexecuteOnLoad
to the more descriptive enum-based approach.
306-306
: Boolean executeOnLoad replaced with enum RunBehaviour.The code consistently replaces all instances of
action.setExecuteOnLoad(true)
withaction.setRunBehaviour(RunBehaviourEnum.ON_PAGE_LOAD)
, maintaining functional equivalence while providing more expressive behavior specification.Also applies to: 340-340, 412-412, 1152-1152, 1176-1176, 1277-1277, 1309-1309
353-353
: Updated assertions to verify RunBehaviour enum values.Test assertions have been correctly updated to verify the expected
RunBehaviourEnum
values instead of boolean flags, maintaining test coverage for the refactored functionality.Also applies to: 423-423, 1162-1162, 1190-1190
802-803
: Renamed method call from setExecuteOnLoad to setRunBehaviour.Service method call updated to use the new API, passing the appropriate enum value.
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/Executable.java (4)
24-25
: Deprecated the getExecuteOnLoad method.Appropriate use of the
@Deprecated
annotation to indicate that this method will be phased out in favor of the new enum-based approach.
27-28
: Added new method for getting run behavior.The new
getRunBehaviour()
method returns theRunBehaviourEnum
type, providing a more expressive API for specifying execution behavior.
75-75
: Updated DTO creation to use runBehaviour.The
createLayoutExecutableUpdateDTO()
method now correctly sets therunBehaviour
property instead of the deprecatedexecuteOnLoad
.
82-83
: Added setter for RunBehaviour enum.Introduced a corresponding setter method for the new
runBehaviour
property to complete the API.app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CustomNewActionRepositoryCEImpl.java (2)
5-5
: Added import for RunBehaviourEnum.Required import for using the new enum type in queries.
182-186
: Renamed method and updated query criteria.Method renamed from
findUnpublishedActionsByPageIdAndExecuteOnLoadSetByUserTrue
tofindUnpublishedActionsByPageIdAndRunbehaviourSetByUserOnPageLoad
to reflect the new behavior. Query criteria updated to useRunBehaviourEnum.ON_PAGE_LOAD
instead of a boolean value.app/server/appsmith-server/src/main/java/com/appsmith/server/dtos/ce/ActionViewCE_DTO.java (3)
3-3
: Added import for RunBehaviourEnum.Required import for the new enum type.
41-47
: Added deprecated executeOnLoad and new runBehaviour fields.Good practice to add
@Deprecated
annotation to the old field and restrict it to internal views only. The newrunBehaviour
field is properly exposed in public views.
48-56
: Implemented backward-compatible getter for runBehaviour.The getter provides a smooth transition by deriving the run behavior from the deprecated
executeOnLoad
whenrunBehaviour
is not set. This maintains backward compatibility while encouraging migration to the new API.app/server/appsmith-server/src/test/java/com/appsmith/server/services/LayoutServiceTest.java (3)
10-11
: Added import for RunBehaviourEnum to support new enum-based execution control.This import supports the migration from boolean flags to a more expressive enum for controlling when actions run.
348-349
: Updated to use RunBehaviourEnum.MANUAL instead of boolean false.Part of the codebase migration from boolean
executeOnLoad
to the more descriptive enum-based approach. This explicit mapping (false → MANUAL) improves code readability and extensibility.
893-896
: Updated assertions to verify RunBehaviourEnum values instead of boolean flags.Tests have been properly updated to check for correct enum values rather than boolean flags, ensuring test coverage for the new behavior model.
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/ce/ActionCE_DTO.java (3)
18-18
: Added import for RunBehaviourEnum.Supports the migration from boolean flags to enum-based execution control.
104-114
: Deprecated executeOnLoad and introduced the new runBehaviour field.Good practice to mark the old field as deprecated while restricting its JSON view to internal use only. The new field is properly exposed to public, request, and Git JSON views for wider accessibility.
115-124
: Added backward-compatible getter method for runBehaviour.Excellent implementation that maintains backward compatibility by falling back to the deprecated
executeOnLoad
property whenrunBehaviour
is null. This ensures smooth transition during migration.app/server/appsmith-server/src/test/java/com/appsmith/server/services/LayoutActionServiceTest.java (2)
11-11
: Added import for RunBehaviourEnum to support the enum-based execution model.Necessary import to use the new enum type throughout the test class.
1360-1401
: Added comprehensive test for runBehaviour setting and persistence.This new test thoroughly validates that:
- The default behavior is correctly set to MANUAL
- Changing to ON_PAGE_LOAD properly updates both runBehaviour and userSetOnLoad flags
- Changing back to MANUAL correctly persists both values
- The changes are properly persisted in the database
This test is essential for ensuring the new API works correctly during the migration.
app/server/appsmith-server/src/main/java/com/appsmith/server/dtos/LayoutExecutableUpdateDTO.java (3)
3-3
: Added import for RunBehaviourEnum.Required for the new enum-based execution control model.
25-31
: Deprecated executeOnLoad field and added runBehaviour field.Good practice to:
- Mark the old field as deprecated
- Restrict its JSON view to internal
- Add the new field with proper public JSON view
This allows for graceful migration without breaking existing clients.
32-46
: Added backward-compatible getter for runBehaviour.Well-implemented fallback mechanism that:
- Returns runBehaviour if it's set
- Falls back to deriving from executeOnLoad if runBehaviour is null
- Returns null only if both fields are null
This ensures consistent behavior during transition from the boolean to enum-based model.
app/server/appsmith-server/src/main/java/com/appsmith/server/onload/internal/OnLoadExecutablesUtilCEImpl.java (6)
12-12
: LGTM: Import added for the new RunBehaviourEnum.The import matches the new enum-based approach to replace the boolean executeOnLoad flag.
299-299
: Method renamed to match new run behavior paradigm.The method has been appropriately renamed from
updateExecutablesExecuteOnLoad
toupdateExecutablesRunBehaviour
to align with the new enum-based approach.
314-318
: Check condition updated to use RunBehaviourEnum.Boolean check properly replaced with enum comparison. This maintains the same logical flow while using the new enum-based system.
368-369
: Boolean assignment replaced with enum value.Correctly replaced
setExecuteOnLoad(Boolean.FALSE)
with the more descriptivesetRunBehaviour(RunBehaviourEnum.MANUAL)
.
374-375
: Boolean assignment replaced with enum value.Correctly replaced
setExecuteOnLoad(Boolean.TRUE)
with the more descriptivesetRunBehaviour(RunBehaviourEnum.ON_PAGE_LOAD)
.
1266-1268
: Condition check updated for hasUserSetExecutableToNotRunOnPageLoad.The condition has been properly updated to check for explicit user settings with the new enum model.
app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/ActionControllerCE.java (3)
5-5
: LGTM: Import added for RunBehaviourEnum.The import is correctly added to support the new enum-based endpoint.
119-127
: New endpoint added for run behavior.Well-structured endpoint implementation for setting run behavior using the enum. The method signature, parameter types, and response handling all follow established patterns in the codebase.
129-133
: Appropriately deprecated old executeOnLoad endpoint.Good practice to mark the old endpoint as deprecated with a clear comment directing users to the new endpoint.
Deploy-Preview-URL: https://ce-40629.dp.appsmith.com |
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/14935590222. |
There was a problem hiding this 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
🧹 Nitpick comments (5)
app/client/src/utils/PluginUtils.ts (5)
8-30
: Function implementation is concise, but consider early return pattern.The function correctly handles the conditional logic based on the feature flag. The implementation maintains immutability by creating new objects rather than modifying existing ones.
Consider using an early return pattern for better readability:
export const updateDefaultPluginSettings = ( pluginSettings: Record<PluginType, PluginActionSettingsConfig[]>, flagValueForReactiveActions: boolean, ): Record<PluginType, PluginActionSettingsConfig[]> => { + if (flagValueForReactiveActions) { + return pluginSettings; + } + - if (!flagValueForReactiveActions) { return Object.fromEntries( Object.entries(pluginSettings).map(([pluginType, settings]) => { let newSettings = settings; if (newSettings.length > 0) { newSettings = updateRunBehaviourForActionSettings( settings, flagValueForReactiveActions, ); } return [pluginType, newSettings]; }), ) as Record<PluginType, PluginActionSettingsConfig[]>; - } - - return pluginSettings; };
14-25
: Variable naming could be improved for clarity.The variables in this mapping operation could be named more descriptively to avoid confusion.
Object.entries(pluginSettings).map(([pluginType, settings]) => { - let newSettings = settings; + let updatedSettings = settings; - if (newSettings.length > 0) { - newSettings = updateRunBehaviourForActionSettings( + if (updatedSettings.length > 0) { + updatedSettings = updateRunBehaviourForActionSettings( settings, flagValueForReactiveActions, ); } - return [pluginType, newSettings]; + return [pluginType, updatedSettings];
32-61
: Function correctly handles run behavior filtering.The implementation properly maps over settings to filter out options based on the feature flag state. The code maintains immutability by creating new objects at each level.
Consider adding JSDoc comments to document the purpose and behavior of this function:
/** * Filters out the "AUTOMATIC" run behavior option from plugin settings when the feature flag is disabled. * @param pluginSettings - The original plugin settings configuration * @param flagValueForReactiveActions - Whether the reactive actions feature is enabled * @returns Updated plugin settings with filtered run behavior options */ export const updateRunBehaviourForActionSettings = (
47-52
: The filter condition could be simplified for better readability.The current logic is correct but could be expressed more clearly.
options: [ ...settings.options.filter( (option) => - (!flagValueForReactiveActions && - option.value !== "AUTOMATIC") || - flagValueForReactiveActions, + flagValueForReactiveActions || option.value !== "AUTOMATIC", ), ],
1-62
: Naming inconsistency: British vs American spelling.There's an inconsistency in spelling between "Behaviour" in function names and "Behavior" in the imported constant.
Consider standardizing on either British English ("Behaviour") or American English ("Behavior") throughout the codebase. Since the imported constant uses "Behavior", it might be more consistent to use:
- export const updateRunBehaviourForActionSettings = ( + export const updateRunBehaviorForActionSettings = (And update all references accordingly.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro (Legacy)
📒 Files selected for processing (9)
app/client/src/PluginActionEditor/PluginActionContext.tsx
(1 hunks)app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx
(3 hunks)app/client/src/PluginActionEditor/types/PluginActionTypes.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/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx
(3 hunks)app/client/src/sagas/PluginSagas.ts
(4 hunks)app/client/src/utils/PluginUtils.ts
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- app/client/src/PluginActionEditor/PluginActionContext.tsx
🚧 Files skipped from review as they are similar to previous changes (7)
- app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts
- app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx
- app/client/src/sagas/PluginSagas.ts
- app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx
- app/client/src/PluginActionEditor/types/PluginActionTypes.ts
- app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts
- app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts
🧰 Additional context used
🧬 Code Graph Analysis (1)
app/client/src/utils/PluginUtils.ts (2)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (2)
PluginActionSettingsConfig
(26-30)PluginActionSettingsConfigChildren
(13-24)app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts (1)
RUN_BEHAVIOR_CONFIG_PROPERTY
(3-3)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: server-unit-tests / server-unit-tests
- GitHub Check: client-unit-tests / client-unit-tests
🔇 Additional comments (1)
app/client/src/utils/PluginUtils.ts (1)
1-7
: Import structure looks correct.The imports are well-organized, with clear type definitions and constants imported from their respective locations.
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/14936528708. |
Deploy-Preview-URL: https://ce-40629.dp.appsmith.com |
…ithorg/appsmith into chore/remove-unnecessary-code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🔭 Outside diff range comments (1)
app/client/src/PluginActionEditor/components/PluginActionToolbar/components/ActionSettings.tsx (1)
14-16
: 💡 Verification agent🧩 Analysis chain
Address TODO comments related to typing.
There are multiple TODO comments about fixing TypeScript types. This technical debt should be addressed to improve code quality and type safety.
Also applies to: 65-67, 75-77
🏁 Script executed:
#!/bin/bash # Find the actual type for actionSettingsConfig # Search for occurrences where ActionSettings is imported and used rg -A 3 "import.*ActionSettings" app/client/src/ # Search for the type definition that should be used rg "PluginActionSettingsConfig\[\]" app/client/src/Length of output: 6714
Fix actionSettingsConfig typing to PluginActionSettingsConfig[]
The prop
actionSettingsConfig
is always an array ofPluginActionSettingsConfig
—replace theany
and add the proper import to improve type safety.• In
app/client/src/PluginActionEditor/components/PluginActionToolbar/components/ActionSettings.tsx
- Import the config type:
import type { PluginActionSettingsConfig } from "PluginActionEditor/types/PluginActionTypes";- Change the interface definition at lines 14–16 (and similarly at 65–67, 75–77):
interface ActionSettingsProps { // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - actionSettingsConfig: any; + actionSettingsConfig: PluginActionSettingsConfig[]; // … }
🧹 Nitpick comments (2)
app/client/src/utils/PluginUtils.ts (2)
7-36
: Simplify the filtering logic for better readability.The conditional logic in lines 22-27 is unnecessarily complex. It could be simplified to make the intent clearer.
- options: [ - ...settings.options.filter( - (option) => - (!flagValueForReactiveActions && - option.value !== "AUTOMATIC") || - flagValueForReactiveActions, - ), - ], + options: flagValueForReactiveActions + ? settings.options + : settings.options.filter(option => option.value !== "AUTOMATIC"),This expresses the same logic more directly: if reactive actions are enabled, keep all options; otherwise, filter out the "AUTOMATIC" option.
7-8
: Consider consistent spelling between "Behaviour" and "Behavior".The function name uses British English spelling "Behaviour" while the imported constant uses American English "Behavior". Consider standardizing the spelling across the codebase.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro (Legacy)
📒 Files selected for processing (3)
app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx
(1 hunks)app/client/src/PluginActionEditor/components/PluginActionToolbar/components/ActionSettings.tsx
(3 hunks)app/client/src/utils/PluginUtils.ts
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx
🧰 Additional context used
🧬 Code Graph Analysis (2)
app/client/src/PluginActionEditor/components/PluginActionToolbar/components/ActionSettings.tsx (2)
app/client/src/ce/selectors/featureFlagsSelectors.ts (1)
selectFeatureFlagCheck
(19-30)app/client/src/utils/PluginUtils.ts (1)
updateRunBehaviourForActionSettings
(7-36)
app/client/src/utils/PluginUtils.ts (2)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (2)
PluginActionSettingsConfig
(26-30)PluginActionSettingsConfigChildren
(13-24)app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts (1)
RUN_BEHAVIOR_CONFIG_PROPERTY
(3-3)
🔇 Additional comments (1)
app/client/src/PluginActionEditor/components/PluginActionToolbar/components/ActionSettings.tsx (1)
47-54
: Implementation properly handles feature flag integration.The code correctly fetches the feature flag status and applies the utility function to filter options based on whether reactive actions are enabled.
Description
Removing unnecessary code and keeping the logic same for plugin based and other action settings only on frontend
Fixes #
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/14935879290
Commit: db1eb04
Cypress dashboard.
Tags:
@tag.All
Spec:
Fri, 09 May 2025 20:14:23 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
New Features
Improvements
Bug Fixes
Documentation
Chores