-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
fix: Update SelfReferenceRule to show entity's other property completion #34686
Conversation
WalkthroughThe changes in the code update the logic in autocomplete functionality to consider both Changes
Sequence DiagramsAssessment against linked issues
Poem
Tip AI model upgrade
|
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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- app/client/src/utils/autocomplete/AutocompleteSortRules.ts (1 hunks)
- app/client/src/utils/autocomplete/tests/AutocompleteSortRules.test.ts (1 hunks)
- app/client/src/utils/autocomplete/tests/TernServer.test.ts (1 hunks)
Additional context used
Path-based instructions (3)
app/client/src/utils/autocomplete/__tests__/AutocompleteSortRules.test.ts (1)
Pattern
**/*.*
: Do not use cy.wait in code.
Do call the add function.
Do not keep duplicate lines in code.
Descriptive test names are used to clearly convey the intent of each test.app/client/src/utils/autocomplete/AutocompleteSortRules.ts (1)
Pattern
**/*.*
: Do not use cy.wait in code.
Do call the add function.
Do not keep duplicate lines in code.
Descriptive test names are used to clearly convey the intent of each test.app/client/src/utils/autocomplete/__tests__/TernServer.test.ts (1)
Pattern
**/*.*
: Do not use cy.wait in code.
Do call the add function.
Do not keep duplicate lines in code.
Descriptive test names are used to clearly convey the intent of each test.
Learnings (1)
app/client/src/utils/autocomplete/__tests__/TernServer.test.ts (1)
Learnt from: ankitakinger PR: appsmithorg/appsmith#29573 File: app/client/src/utils/autocomplete/__tests__/TernServer.test.ts:254-0 Timestamp: 2023-12-13T11:34:08.028Z Learning: Integration tests cover the `hasCreateDSActionPermissionInApp` function, as clarified by the user.
Additional comments not posted (4)
app/client/src/utils/autocomplete/__tests__/AutocompleteSortRules.test.ts (2)
190-354
: Test case looks good!The test case for blocking self-reference of entities is well-implemented and follows the existing pattern.
Line range hint
417-417
: Test case looks good!The test case for scoring completions is well-implemented and follows the existing pattern.
app/client/src/utils/autocomplete/AutocompleteSortRules.ts (1)
150-154
: Logic update looks good!The update to include
propertyPath
in the self-reference check is correctly implemented and follows the existing pattern.app/client/src/utils/autocomplete/__tests__/TernServer.test.ts (1)
417-417
: Test case looks good!The test case for scoring completions is well-implemented and follows the existing pattern.
/build-deploy-preview skip-test=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9789217718. |
Deploy-Preview-URL: https://ce-34686.dp.appsmith.com |
…ion (appsmithorg#34686) ## Description Update the selfReference autocomplete rule to show completion for the entity's other property when writing JS in one of its property. Fixes appsmithorg#34684 ## Automation /test js ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/9780079455> > Commit: 03eb92f > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9780079455&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.JS` <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved accuracy of autocomplete suggestions by refining self-reference detection logic. - **Tests** - Added new test cases to verify proper blocking of self-referencing completions. - Updated existing tests to include `propertyPath` in entity sorting validation. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Description
Update the selfReference autocomplete rule to show completion for the entity's other property when writing JS in one of its property.
Fixes #34684
Automation
/test js
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9780079455
Commit: 03eb92f
Cypress dashboard.
Tags:
@tag.JS
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
Bug Fixes
Tests
propertyPath
in entity sorting validation.