Skip to content

fix: Updating logic for reactive actions to fix cyclic dependency issue with App templates and Generate page flow of a DB #41144

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 3 commits into from
Jul 29, 2025

Conversation

ankitakinger
Copy link
Contributor

@ankitakinger ankitakinger commented Jul 29, 2025

Description

Updating logic for reactive actions to fix cyclic dependency issue with App templates and Generate page flow of a DB. Currently, both flows were leading to cyclic dependency errors which shouldn't show up.
App template used - Order Fulfilment Tracker
DB used - Mock DB Movies

Fixes #41125 41113

EE PR for tests: https://github.com/appsmithorg/appsmith-ee/pull/8029

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


Tue, 29 Jul 2025 09:46:35 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

Summary by CodeRabbit

  • Refactor

    • Improved dependency detection logic for actions and JS actions, refining how data paths are identified and handled.
    • Unified data path detection by using a shared utility function across the application.
    • Enhanced filtering of entities during dependency calculations for greater accuracy.
  • Bug Fixes

    • Corrected detection of reactive dependency misuse to reduce false positives for certain entity types.

@ankitakinger ankitakinger self-assigned this Jul 29, 2025
Copy link
Contributor

coderabbitai bot commented Jul 29, 2025

Walkthrough

The changes update type annotations and unify data path detection logic by using a shared utility function. Dependency handling for JS action functions is refined, and the logic for detecting reactive dependency misuse is adjusted to focus on action entities. The code now consistently uses the imported isDataPath function for data path checks.

Changes

Cohort / File(s) Change Summary
Type Annotation Update in Utility
app/client/src/ce/workers/Evaluation/evaluationUtils.ts
The isDataPath function's entity parameter type is changed from DataTreeEntity to DataTreeEntity | Partial<DataTreeEntityConfig>. No logic changes.
JS Action Dependency Logic Removal
app/client/src/ce/workers/common/DependencyMap/utils/getEntityDependenciesByType.ts
Removes logic that added .data dependencies for JS action functions. No changes to function signatures.
Dependency Map Logic Refinement
app/client/src/entities/DependencyMap/DependencyMapUtils.ts
Replaces a local isDataPath implementation with the imported version; refines dependency misuse detection to focus on actions; adjusts entity filtering in transitive dependency calculations. Removes the static isDataPath method.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Assessment against linked issues

Objective Addressed Explanation
Fix reactive dependency misuse error toast when generating CRUD page with sample Mongo datasource (#41125)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes identified.

Poem

A path once checked by local hand,
Now unified across the land.
JS actions trimmed, dependencies neat,
With types improved, the code’s complete.
From widgets skipped to actions true,
The map is clearer—cheers to you!
🗺️✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 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 9eb4d11 and 9079357.

📒 Files selected for processing (1)
  • app/client/src/entities/DependencyMap/DependencyMapUtils.ts (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/client/src/entities/DependencyMap/DependencyMapUtils.ts
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/reactive-actions-issues

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 generate unit tests to generate unit tests for 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.

@ankitakinger ankitakinger added the ok-to-test Required label for CI label Jul 29, 2025
@github-actions github-actions bot added the Bug Something isn't working label Jul 29, 2025
@ankitakinger ankitakinger changed the title fix: reactive actions issues fix: Updating logic for reactive actions to fix cyclic dependency issue with App templates and Generate page flow of a DB Jul 29, 2025
@github-actions github-actions bot added Core Query Execution Issues related to the execution of all queries High This issue blocks a user from building or impacts a lot of users Integrations Product Issues related to a specific integration Medium Issues that frustrate users due to poor UX Needs Triaging Needs attention from maintainers to triage Production Query Widgets & IDE Pod All issues related to Query, JS, Eval, Widgets & IDE labels Jul 29, 2025
@ankitakinger
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

Copy link

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

Copy link

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

@ankitakinger ankitakinger merged commit 38ae03b into release Jul 29, 2025
85 checks passed
@ankitakinger ankitakinger deleted the fix/reactive-actions-issues branch July 29, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Core Query Execution Issues related to the execution of all queries High This issue blocks a user from building or impacts a lot of users Integrations Product Issues related to a specific integration Medium Issues that frustrate users due to poor UX 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]: Reactive dependency misuse error toast is displayed when user generate CRUD page using Sample mongo movies datasource
2 participants