Skip to content

fix: explicit automatic actions to be included in layout on load actions as well #40778

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

Conversation

sneha122
Copy link
Contributor

@sneha122 sneha122 commented May 27, 2025

Description

This PR fixes an issue in reactivity where if we have configured any action to be automatic explicitly (By changing from settings in action editor), then this action was not getting included in the layoutOnLoadActions (This matrix informs frontend on what actions it needs to execute on page load). Since we want all automatic actions to be on page load as well, whatever actions user configure explicitly to be automatic, should be included in page load as well. This PR fixes that.

Steps to test:

  1. Create an app with 2 queries -> Query1 and Query2
  2. Go to Query1 -> settings and change run behaviour to be automatic.
  3. Bind this query Query1 to Table1 widget
  4. Reload the page and see if the table is getting populated or not

Fixes #40781
or
Fixes Issue URL

Warning

If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.

Automation

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

🔍 Cypress test results

Tip

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


Thu, 29 May 2025 08:24:56 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

Summary by CodeRabbit

  • Bug Fixes
    • Improved detection of actions set to run automatically on page load, ensuring both "ON_PAGE_LOAD" and "AUTOMATIC" run behaviors are now recognized. This enhances reliability for users who configure actions to execute when a page loads.
    • Refined the logic for identifying user-configured executables that should not run on page load, now accurately recognizing only those set to "MANUAL" run behavior.

Copy link
Contributor

coderabbitai bot commented May 27, 2025

Walkthrough

The query in CustomNewActionRepositoryCEImpl was updated to include both ON_PAGE_LOAD and AUTOMATIC values when filtering the unpublishedAction_runBehaviour field, instead of only ON_PAGE_LOAD. Additionally, the method hasUserSetExecutableToNotRunOnPageLoad in OnLoadExecutablesUtilCEImpl was refined to return true only when the run behaviour is exactly MANUAL and userSetOnLoad is TRUE. No changes were made to method signatures or public interfaces.

Changes

File(s) Change Summary
.../CustomNewActionRepositoryCEImpl.java Expanded filtering in a query to include both ON_PAGE_LOAD and AUTOMATIC run behaviours.
.../OnLoadExecutablesUtilCEImpl.java Modified condition to return true only if userSetOnLoad is TRUE and runBehaviour is exactly MANUAL.

Assessment against linked issues

Objective Addressed Explanation
Fix backend issues related to run behaviour filtering during UI package tests (#40781)
Ensure correct filtering of unpublished actions by run behaviour including new AUTOMATIC type
Correct logic for detecting user-set executables not running on page load

Possibly related PRs

Suggested labels

Core Query Execution

Suggested reviewers

  • subrata71

Poem

When actions must run, not just on page load,
Now "AUTOMATIC" joins the code's new road.
Filters expanded, queries refined,
Two run behaviours, now aligned.
And manual checks now sharpened too,
Precision guides what code will do! 🚦✨


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0193f3f and 0eca6f9.

📒 Files selected for processing (1)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/onload/internal/OnLoadExecutablesUtilCEImpl.java (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/onload/internal/OnLoadExecutablesUtilCEImpl.java
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • 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: server-unit-tests / server-unit-tests
  • GitHub Check: server-spotless / spotless-check
✨ Finishing Touches
  • 📝 Generate Docstrings

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

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

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

Support

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

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

CodeRabbit Commands (Invoked using PR comments)

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

Other keywords and placeholders

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

Documentation and Community

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

@github-actions github-actions bot added the Bug Something isn't working label May 27, 2025
@sneha122 sneha122 added the ok-to-test Required label for CI label May 28, 2025
@sneha122
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

@github-actions github-actions bot added High This issue blocks a user from building or impacts a lot of users Integrations Pod General Issues related to the Integrations Pod that don't fit into other tags. Integrations Pod Integrations Product Issues related to a specific integration Needs Triaging Needs attention from maintainers to triage Production Query Widgets & IDE Pod All issues related to Query, JS, Eval, Widgets & IDE labels May 29, 2025
Copy link

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

@sneha122 sneha122 requested a review from subrata71 May 29, 2025 07:03
Copy link

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

@sneha122 sneha122 merged commit 0377b37 into release May 29, 2025
45 checks passed
@sneha122 sneha122 deleted the fix/explicit-automatic-actions-should-run-on-page-load branch May 29, 2025 09:31
@laveena-en laveena-en mentioned this pull request May 30, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working High This issue blocks a user from building or impacts a lot of users Integrations Pod General Issues related to the Integrations Pod that don't fit into other tags. Integrations Pod Integrations Product Issues related to a specific integration Needs Triaging Needs attention from maintainers to triage ok-to-test Required label for CI Production Query Widgets & IDE Pod All issues related to Query, JS, Eval, Widgets & IDE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Backend issues found during UI packages test party
2 participants