Skip to content

Conversation

ankitakinger
Copy link
Contributor

@ankitakinger ankitakinger commented May 20, 2025

Description

Handling the case when reactive actions feature flag is turned off and the run behaviour is Automatic. We are updating the run behaviour in UI alone (not DB) to show page load instead in this case.

Fixes #40703

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/15144630350
Commit: ae4b5b6
Cypress dashboard.
Tags: @tag.All
Spec:


Tue, 20 May 2025 19:22:57 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Updated dropdown and function settings to respect feature flags, ensuring certain options are shown or hidden based on feature availability.
  • Bug Fixes

    • Improved handling of run behavior selection when specific feature flags are disabled, automatically adjusting selections to maintain consistent user experience.

… in dropdown should be on page load for run behaviour
Copy link
Contributor

coderabbitai bot commented May 20, 2025

Walkthrough

This update integrates feature flag checks into dropdown controls related to action run behavior. When the release_reactive_actions_enabled feature flag is disabled, any selection or display of the AUTOMATIC run behavior is overridden to ON_PAGE_LOAD. The logic is applied in both the dropdown form control and the JS function settings toolbar.

Changes

File(s) Change Summary
app/client/src/components/formControls/DropDownControl.tsx Added featureFlags prop, mapped Redux feature flags, and implemented logic to override AUTOMATIC with ON_PAGE_LOAD when the feature flag is off.
app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx Renamed feature flag variable, filtered out AUTOMATIC option when flag is off, and forced override to ON_PAGE_LOAD in UI when necessary.
app/client/src/components/formControls/DropDownControl.test.tsx Added Jest mock for selectFeatureFlags selector returning empty object; no other test logic changed.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant DropDownControl
    participant ReduxStore

    User->>DropDownControl: Selects run behavior
    DropDownControl->>ReduxStore: Retrieves featureFlags
    alt Feature flag disabled AND selection is AUTOMATIC
        DropDownControl->>User: Display ON_PAGE_LOAD as selected
    else Feature flag enabled or selection is not AUTOMATIC
        DropDownControl->>User: Display selected value
    end
Loading

Assessment against linked issues

Objective Addressed Explanation
Handle the run behaviour to change from automatic to page load when feature flag is off (#40703)

Suggested reviewers

  • vivek-appsmith

Poem

When feature flags say "No, not today,"
AUTOMATIC must give way.
ON_PAGE_LOAD steps in, takes the lead,
The dropdown listens, pays good heed.
Flags and logic, hand in hand,
Ensuring controls do as planned! 🚦✨

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 1119623 and ae4b5b6.

📒 Files selected for processing (1)
  • app/client/src/components/formControls/DropDownControl.test.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • app/client/src/components/formControls/DropDownControl.test.tsx
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-build / client-build

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

@github-actions github-actions bot added Core Query Execution Issues related to the execution of all queries IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product Integrations 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 20, 2025
@ankitakinger
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

@github-actions github-actions bot added the Enhancement New feature or request label May 20, 2025
@ankitakinger ankitakinger added ok-to-test Required label for CI and removed Enhancement New feature or request labels May 20, 2025
Copy link

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

@github-actions github-actions bot added the Enhancement New feature or request label May 20, 2025
@ankitakinger
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

Copy link

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

Copy link

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

Copy link
Contributor

@AmanAgarwal041 AmanAgarwal041 left a comment

Choose a reason for hiding this comment

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

LGTM

@ankitakinger ankitakinger merged commit e2515ab into release May 21, 2025
83 checks passed
@ankitakinger ankitakinger deleted the feat/switch-to-page-load branch May 21, 2025 08:27
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 Enhancement New feature or request 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 Task A simple Todo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task]: Handle the run behaviour to change from automatic to page load when feature flag is turned off
2 participants