Skip to content

chore: added automatic option to run behaviour behind feature flag #40608

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

Merged
merged 25 commits into from
May 16, 2025

Conversation

AmanAgarwal041
Copy link
Contributor

@AmanAgarwal041 AmanAgarwal041 commented May 8, 2025

Description

Updated settings for different actions for adding new option (Automatic) to run behaviour drop down behind feature flag release_reactive_actions_enabled

Fixes #40456

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/15065485800
Commit: 4c4074c
Cypress dashboard.
Tags: @tag.All
Spec:


Fri, 16 May 2025 10:58:06 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Introduced a new "Automatic" option for the "Run behavior" setting across multiple plugins, enabling queries and APIs to run automatically on page load or when dependent variables change.
    • Added a feature flag to enable or disable the "Automatic" run behavior in the UI.
  • Enhancements

    • Improved the structure and type safety of plugin action settings for better configuration and reliability.
    • Updated UI components to conditionally display run behavior options based on the feature flag status.

@AmanAgarwal041 AmanAgarwal041 requested review from a team and riodeuno as code owners May 8, 2025 09:12
Copy link
Contributor

coderabbitai bot commented May 8, 2025

Walkthrough

This change introduces a new "Automatic" run behavior option across plugin action settings, updates type definitions and configuration schemas, and implements logic to conditionally show or hide the "Automatic" option based on a feature flag. Type safety is improved throughout, and plugin configuration files are updated to include the new option.

Changes

Files/Paths Change Summary
.../src/PluginActionEditor/types/PluginActionTypes.ts Added AUTOMATIC to ActionRunBehaviour enum; removed old constants; introduced new config interfaces and types.
.../src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts New module: defines RUN_BEHAVIOR_CONFIG_PROPERTY and RUN_BEHAVIOR_VALUES with "Automatic" option.
.../src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts,
.../GoogleSheetsSettingsConfig.ts,
.../QuerySettingsConfig.ts
Updated imports and usage to new run behavior constants and types; replaced string literals with constants.
.../src/constants/AppsmithActionConstants/ActionConstants.tsx Updated type annotation for defaultActionSettings to use new config type.
.../src/PluginActionEditor/PluginActionContext.tsx Updated settingsConfig type to ActionSettingsConfig[] for type safety.
.../src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/hooks/useGoogleSheetsSetDefaultProperty.ts Updated type assertion for settingsConfig to use new config type.
.../src/PluginActionEditor/components/PluginActionToolbar/components/ActionSettings.tsx Uses feature flag and utility to filter "Automatic" option in action settings config.
.../src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx Filters "Automatic" run behavior option based on feature flag; updates dropdown options accordingly.
.../src/ce/entities/FeatureFlag.ts Adds release_reactive_actions_enabled to feature flags and sets default to false.
.../src/utils/PluginUtils.ts Adds utility to filter "Automatic" run behavior option based on feature flag.
.../src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts,
.../src/pages/Editor/SaaSEditor/data/FinalState.json,
.../src/pages/Editor/SaaSEditor/data/InitialState.json,
.../test/factories/MockPluginsState.ts
Adds "Automatic" run behavior option to plugin settings in test and state JSONs.
.../appsmith-plugins/*/setting.json Adds "Automatic" run behavior option to plugin settings dropdowns in multiple server plugin configuration files.
app/client/package.json Adds a newline at end of file (no functional change).

Sequence Diagram(s)

sequenceDiagram
    participant UI
    participant Redux
    participant FeatureFlag
    participant PluginUtils

    UI->>Redux: Select run behavior dropdown
    Redux->>FeatureFlag: Check "release_reactive_actions_enabled"
    FeatureFlag-->>Redux: Return flag value (true/false)
    Redux->>PluginUtils: updateRunBehaviourForActionSettings(config, flag)
    PluginUtils-->>Redux: Return filtered config (with/without "Automatic")
    Redux-->>UI: Render dropdown with correct options
Loading

Assessment against linked issues

Objective Addressed Explanation
Show or hide automatic option in Run behavior settings dropdown based on flag (#40456)

Possibly related PRs

Suggested labels

Enhancement

Suggested reviewers

  • AmanAgarwal041
  • vsvamsi1

Poem

New run modes appear with a flag in tow,
"Automatic" joins the show!
Types are sharper, configs align,
Feature flags decide what you’ll find.
Plugins and settings, all in sync—
A dropdown’s dance, quicker than you think!
🚦✨

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 7220957 and 6193c86.

📒 Files selected for processing (3)
  • app/client/src/PluginActionEditor/components/PluginActionToolbar/components/ActionSettings.tsx (3 hunks)
  • app/client/src/ce/entities/FeatureFlag.ts (2 hunks)
  • app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • app/client/src/ce/entities/FeatureFlag.ts
  • app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx
  • app/client/src/PluginActionEditor/components/PluginActionToolbar/components/ActionSettings.tsx
⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: server-unit-tests / server-unit-tests
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: server-spotless / spotless-check
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-build / client-build
  • GitHub Check: client-unit-tests / client-unit-tests

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

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

Support

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

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

CodeRabbit Commands (Invoked using PR comments)

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

Other keywords and placeholders

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

Documentation and Community

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

@AmanAgarwal041
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

@AmanAgarwal041 AmanAgarwal041 requested review from ankitakinger and removed request for a team and riodeuno May 8, 2025 09:23
Copy link

github-actions bot commented May 8, 2025

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/14903155093.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 40608.
recreate: .

@AmanAgarwal041
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

Copy link

github-actions bot commented May 8, 2025

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/14903838178.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 40608.
recreate: .

Copy link

github-actions bot commented May 8, 2025

Deploy-Preview-URL: https://ce-40608.dp.appsmith.com

@AmanAgarwal041
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

Copy link

github-actions bot commented May 8, 2025

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/14904311492.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 40608.
recreate: .

Copy link

github-actions bot commented May 8, 2025

Deploy-Preview-URL: https://ce-40608.dp.appsmith.com

Copy link
Contributor

@ankitakinger ankitakinger left a comment

Choose a reason for hiding this comment

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

Should be merged only after Milestone 1 feature branches are merged.

Base automatically changed from feat/reactive-actions-run-behaviour to release May 13, 2025 05:56
@github-actions github-actions bot added skip-changelog Adding this label to a PR prevents it from being listed in the changelog Core Query Execution Issues related to the execution of all queries IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product Integrations Pod Integrations Product Issues related to a specific integration Query Settings Issues related to the settings of all queries Query Widgets & IDE Pod All issues related to Query, JS, Eval, Widgets & IDE Task A simple Todo labels May 13, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/hooks/useGoogleSheetsSetDefaultProperty.ts (1)

34-36: Guard against potentially undefined settingsConfig
Casting settingsConfig directly may break if it's ever undefined. Consider using a fallback:

- merge(initialValues,
-   getConfigInitialValues(settingsConfig as PluginActionSettingsConfig[]),
- );
+ merge(initialValues,
+   getConfigInitialValues(settingsConfig ?? []),
+ );
app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts (2)

10046-10051: Avoid duplicating run behavior options.
The "Automatic" option block is replicated in multiple dropdown definitions. Extract it into a shared constant (for example, automaticRunBehaviorOption) or import RUN_BEHAVIOR_VALUES from PluginSettings.ts to keep test fixtures DRY and aligned with production code.


10103-10108: Use enum reference for the option value.
Instead of hardcoding "AUTOMATIC", import and use the ActionRunBehaviour.AUTOMATIC enum from PluginActionTypes.ts. This ensures type safety and guards against typos if the enum is ever renamed.

app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts (1)

6-11: Consider removing duplication in option objects.

The label and children properties have identical values in each option. Consider either using a factory function to create these objects or removing one of the duplicated fields if the consuming components don't require both.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 04b3bc9 and 0793005.

📒 Files selected for processing (29)
  • app/client/package.json (1 hunks)
  • app/client/src/PluginActionEditor/PluginActionContext.tsx (1 hunks)
  • app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/hooks/useGoogleSheetsSetDefaultProperty.ts (2 hunks)
  • app/client/src/PluginActionEditor/components/PluginActionToolbar/components/ActionSettings.tsx (3 hunks)
  • app/client/src/PluginActionEditor/types/PluginActionTypes.ts (1 hunks)
  • app/client/src/ce/entities/FeatureFlag.ts (2 hunks)
  • app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts (4 hunks)
  • app/client/src/constants/AppsmithActionConstants/ActionConstants.tsx (2 hunks)
  • app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts (2 hunks)
  • app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts (2 hunks)
  • app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts (1 hunks)
  • app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts (2 hunks)
  • app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx (2 hunks)
  • app/client/src/pages/Editor/SaaSEditor/__data__/FinalState.json (7 hunks)
  • app/client/src/pages/Editor/SaaSEditor/__data__/InitialState.json (7 hunks)
  • app/client/src/utils/PluginUtils.ts (1 hunks)
  • app/client/test/factories/MockPluginsState.ts (4 hunks)
  • app/server/appsmith-plugins/amazons3Plugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-plugins/anthropicPlugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-plugins/appsmithAiPlugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-plugins/firestorePlugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-plugins/googleAiPlugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-plugins/mongoPlugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-plugins/mssqlPlugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-plugins/mysqlPlugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-plugins/openAiPlugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-plugins/oraclePlugin/src/main/resources/setting.json (1 hunks)
  • app/server/appsmith-plugins/postgresPlugin/src/main/resources/setting.json (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (8)
app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/hooks/useGoogleSheetsSetDefaultProperty.ts (1)
app/client/src/components/formControls/utils.ts (1)
  • getConfigInitialValues (404-528)
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 (8-36)
app/client/src/utils/PluginUtils.ts (2)
app/client/src/PluginActionEditor/types/PluginActionTypes.ts (2)
  • ActionSettingsConfig (26-30)
  • ActionSettingsConfigChildren (13-24)
app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts (1)
  • RUN_BEHAVIOR_CONFIG_PROPERTY (3-3)
app/client/src/PluginActionEditor/PluginActionContext.tsx (1)
app/client/src/api/ActionAPI.tsx (1)
  • ActionResponse (76-92)
app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx (1)
app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts (1)
  • RUN_BEHAVIOR_VALUES (5-24)
app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts (1)
app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts (1)
  • RUN_BEHAVIOR_CONFIG_PROPERTY (3-3)
app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts (1)
app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts (1)
  • RUN_BEHAVIOR_CONFIG_PROPERTY (3-3)
app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts (1)
app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts (1)
  • RUN_BEHAVIOR_CONFIG_PROPERTY (3-3)
🔇 Additional comments (51)
app/client/package.json (1)

430-430: Add a POSIX-compliant newline at end-of-file.

Including a trailing newline helps prevent issues with certain Unix tools and keeps diffs cleaner.

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

13-17: Add new "Automatic" run behavior option
The "Automatic" entry has been correctly inserted with the proper label, subText, and value. It aligns with the existing options and JSON schema. Ensure the client’s feature-flag logic (release_reactive_actions_enabled) filters this option as intended in the UI.

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

13-17: Add new "Automatic" run behavior option
The "Automatic" option is correctly added to the dropdown array with consistent formatting. Confirm that the UI respects the feature flag gating for this option.

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

13-17: Add new "Automatic" run behavior option
The inserted "Automatic" block matches the pattern in other plugins. Validate that the client-side filter via updateRunBehaviourForActionSettings hides this when the feature flag is off.

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

13-17: Add new "Automatic" run behavior option
The new option is inserted properly and JSON remains valid. Please verify that no downstream consumers assume only two options.

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

13-17: Add new "Automatic" run behavior option
The "Automatic" entry is in the correct position and format. Ensure consistency across all plugin UIs under the feature flag.

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

13-17: Add "Automatic" run behavior option
The new dropdown entry is correctly formatted and matches other plugins. Verify that the client‐side updateRunBehaviourForActionSettings utility properly hides this when release_reactive_actions_enabled is false.

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

13-17: Add "Automatic" run behavior option
Consistent addition here. Ensure the client filtering logic (release_reactive_actions_enabled) prevents display when the feature flag is off.

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

13-17: Add "Automatic" run behavior option
Looks good in the MySQL config. Confirm that on the frontend, ActionRunBehaviour.AUTOMATIC is only shown when the feature flag is enabled.

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

13-17: Add "Automatic" run behavior option
The JSON syntax is correct. Please test that the Oracle action settings dropdown respects the release_reactive_actions_enabled flag.

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

13-17: Add "Automatic" run behavior option
This addition aligns with other plugin schemas. Verify the UI hides this option when reactive actions are disabled.

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

13-17: Integrate new "Automatic" run behavior option
The new option is correctly inserted before existing entries, preserving "MANUAL" as the default. This aligns with the client-side feature flag filtering logic.

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

13-17: Integrate new "Automatic" run behavior option
Consistent addition for the Postgres plugin’s settings. Ordering and defaults match other plugins.

app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/hooks/useGoogleSheetsSetDefaultProperty.ts (1)

10-10: Refine import to use specific settings config type
Importing PluginActionSettingsConfig improves type safety over the previous generic record type.

app/client/src/PluginActionEditor/PluginActionContext.tsx (1)

11-17: Refine settingsConfig type for stronger typing
Updating from unknown[] to PluginActionSettingsConfig[] aligns this context with the new structured schema and prevents unsafe casts downstream.

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

2550-2554: Add new "Automatic" option to initial state run behavior
This aligns the mocked initial state with the updated plugin settings. Verify that any tests asserting on the run behavior options are updated to include this new choice.

app/client/src/ce/entities/FeatureFlag.ts (2)

63-63: New feature flag added correctly.

The new feature flag follows the naming convention documented in the link at the top of the file and is positioned appropriately in the object.


114-114: Default value appropriately set to false.

Setting the default to false is correct for a feature flag that controls a new feature, allowing for controlled rollout.

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

2-5: Good refactoring of imports.

The imports have been updated to use constants from a centralized location, which improves maintainability.


14-16: Improved type safety with enum replacement.

Replacing string literals with constants and using the enum ActionRunBehaviour.MANUAL instead of string values improves type safety and code maintainability.

app/client/src/constants/AppsmithActionConstants/ActionConstants.tsx (2)

11-11: Appropriate type import added.

The import for PluginActionSettingsConfig type is correctly added to support the type annotation changes.


170-173: Improved type safety by removing 'any'.

Replacing the generic Record<PluginType, any> with the more specific Record<PluginType, PluginActionSettingsConfig[]> improves type safety and helps prevent potential errors.

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

6960-6964: Implementation looks good for REST API plugin.

The "Automatic" run behavior option has been correctly added to the REST API plugin settings with appropriate label and descriptive subtext.


7045-7049: Implementation consistent for GraphQL API plugin.

The same "Automatic" run behavior option has been properly added to the GraphQL API plugin settings, maintaining consistency with other plugins.


7130-7134: Implementation matches pattern for Appsmith AI plugin.

The "Automatic" option has been correctly added to the Appsmith AI plugin settings following the same pattern as other plugins.


7179-7183: Implementation complete for PostgreSQL plugin.

The "Automatic" run behavior option has been successfully added to the PostgreSQL plugin settings, completing the implementation across all targeted plugins.

app/client/src/PluginActionEditor/components/PluginActionToolbar/components/ActionSettings.tsx (4)

9-11: Good integration of feature flag check

The implementation correctly imports the necessary selectors and uses them to check the feature flag status for reactive actions.


47-54: Well-structured feature flag check

The feature flag selector is properly implemented with the correct flag name. This ensures the "Automatic" option can be controlled via configuration.


51-54: Properly applying conditional settings logic

The code correctly uses the utility function to update settings configuration based on the feature flag status.


58-67: Appropriate conditional rendering

Good update to the rendering logic, now using the filtered settings config and maintaining the error handling.

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

2551-2555: Consistent implementation of Automatic option for MongoDB

The new "Automatic" run behavior option is correctly added with appropriate label and descriptive subtext.


2602-2606: Consistent implementation of Automatic option for SQL

The option is correctly implemented with the same structure as other plugins.


2653-2657: Consistent implementation of Automatic option for REST API

The implementation maintains consistency with other plugin configurations.


2710-2714: Consistent implementation of Automatic option for Firebase

The option is correctly added with appropriate description.


2754-2758: Consistent implementation of Automatic option for Google Sheets

The option is properly integrated with the same pattern as other plugins.


2805-2809: Consistent implementation of Automatic option for S3

The implementation follows the established pattern across all plugins.


2856-2860: Consistent implementation of Automatic option for Redis

The option is correctly added with consistent structure.

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

22-23: Good update to centralized constants usage

The code correctly imports run behavior values from the central constants file.


52-59: Well-implemented feature flag check and option filtering

The implementation properly uses the feature flag hook and filters options accordingly to conditionally show the Automatic option.

app/client/src/utils/PluginUtils.ts (2)

1-7: Clean imports with proper typing

The imports are correctly organized and include necessary types from the appropriate modules.


8-36: Well-designed utility function for conditional option filtering

The function efficiently filters out the "Automatic" option when the feature flag is disabled while maintaining immutability through proper mapping. The implementation follows functional programming principles by creating new objects rather than mutating existing ones.

This utility helps maintain consistent behavior across the application.

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

3-5: Import statements updated to use centralized constants

The changes properly refactor imports to use centralized run behavior constants from PluginSettings instead of direct imports, and introduce the ActionRunBehaviour enum.


14-14: Using constant instead of hardcoded string

Good refactoring to use the RUN_BEHAVIOR_CONFIG_PROPERTY constant instead of hardcoded "runBehaviour" string, improving maintainability.


16-16: Using enum value for better type safety

Appropriate update to use ActionRunBehaviour.MANUAL enum value instead of RUN_BEHAVIOR.MANUAL.label, improving type safety and enabling the automatic option feature.

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

10160-10165: Ensure test utils respect the feature flag.
These fixtures include the "Automatic" option unconditionally. If release_reactive_actions_enabled is false in tests, the dropdown behavior may diverge from production. Mock or set the flag to true in your unit test setup when using these utils.


10247-10251: Validate subText consistency.
Double-check that the subText here exactly matches the description in the centralized RUN_BEHAVIOR_VALUES. Keeping them in sync avoids confusing discrepancies between tests and UI.

app/client/src/constants/AppsmithActionConstants/formConfig/PluginSettings.ts (1)

1-24: Good centralization of run behavior constants.

This new file effectively centralizes the run behavior configuration, making it easier to maintain and reference across the codebase. The constants are well-defined with clear labels and descriptive text.

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

10-13: Good import refactoring.

The imports have been properly updated to use the new centralized constants from PluginSettings.


21-25: Improved type safety in run behavior configuration.

Using constants and enum values instead of string literals improves code maintainability and type safety.

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

8-8: Good addition of AUTOMATIC enum value.

Properly extends the enum to support the new Automatic run behavior option.


11-30: Improved type safety with new interfaces.

The new type alias and interfaces provide better type checking and structure for action settings configurations, making the code more robust and maintainable.

@ankitakinger ankitakinger added the ok-to-test Required label for CI label May 13, 2025
@ankitakinger ankitakinger self-requested a review May 13, 2025 06:49
ankitakinger
ankitakinger previously approved these changes May 13, 2025
@AmanAgarwal041 AmanAgarwal041 merged commit 5ffafd7 into release May 16, 2025
85 checks passed
@AmanAgarwal041 AmanAgarwal041 deleted the chore/run-behviour-with-ff branch May 16, 2025 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Query Execution Issues related to the execution of all queries IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product Integrations Pod Integrations Product Issues related to a specific integration ok-to-test Required label for CI Query Settings Issues related to the settings of all queries Query Widgets & IDE Pod All issues related to Query, JS, Eval, Widgets & IDE skip-changelog Adding this label to a PR prevents it from being listed in the changelog Task A simple Todo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task]: Show or hide automatic option based on flag
2 participants