Skip to content

chore: Remove function calling flag#39790

Merged
nidhi-nair merged 1 commit intoreleasefrom
chore/rm-fn-calling-server
Mar 18, 2025
Merged

chore: Remove function calling flag#39790
nidhi-nair merged 1 commit intoreleasefrom
chore/rm-fn-calling-server

Conversation

@nidhi-nair
Copy link
Contributor

@nidhi-nair nidhi-nair commented Mar 18, 2025

Description

Tip

Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).

Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.

Fixes #Issue Number
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=""

🔍 Cypress test results

Caution

If you modify the content in this section, you are likely to disrupt the CI result for your PR.

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • Refactor

    • Updated the logic that determines when the visualization view is enabled, now relying on a refined integration check.
  • Chores

    • Removed an outdated configuration toggle from overall feature settings.
    • Streamlined override options by eliminating an unnecessary flag.

@nidhi-nair nidhi-nair requested a review from a team as a code owner March 18, 2025 15:26
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 18, 2025

Walkthrough

The PR removes the deprecated release_fn_calling_enabled feature flag from the codebase. The flag has been deleted from the FEATURE_FLAG and DEFAULT_FEATURE_FLAG_VALUE constants, its selector function has been removed, and related override logic has been updated. In the JSResponseView component, the old flag check has been replaced with an Anvil integration flag check (isAnvilEnabled), altering the control flow for conditionally displaying UI elements.

Changes

File(s) Change Summary
app/client/.../FeatureFlag.ts Removed release_fn_calling_enabled from both FEATURE_FLAG and DEFAULT_FEATURE_FLAG_VALUE constants.
app/client/.../JSResponseView.tsx Renamed variable from isFnCallingEnabled to isAnvilEnabled and updated the selector from getReleaseFnCallingEnabled to getIsAnvilEnabledInCurrentApplication for conditional UI rendering.
app/client/.../selectors.ts Removed the getReleaseFnCallingEnabled function.
app/client/.../useFeatureFlagOverride.ts Removed "release_fn_calling_enabled" from the AvailableFeaturesToOverride array.

Sequence Diagram(s)

sequenceDiagram
    participant JSV as JSResponseView Component
    participant Store as Redux Store
    participant Selector as getIsAnvilEnabledInCurrentApplication
    JSV->>Store: useSelector(getIsAnvilEnabledInCurrentApplication)
    Store-->>Selector: Pass current state
    Selector-->>Store: Return isAnvilEnabled flag
    Store-->>JSV: Deliver flag value
    JSV->>JSV: Conditionally add visualization tab if flag is true
Loading

Possibly related PRs

Suggested labels

skip-changelog, Anvil Pod, ok-to-test, AI Agents

Suggested reviewers

  • AmanAgarwal041
  • jacquesikot

Poem

In the realm of code so bright,
Old flags take their final flight.
Anvil now leads the way,
Bringing clarity to each new day.
Clean and crisp, our code ascends—
A streamlined future now extends!
🚀✨

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.

📜 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 80eefe7 and 5b9055d.

📒 Files selected for processing (4)
  • app/client/src/ce/entities/FeatureFlag.ts (0 hunks)
  • app/client/src/components/editorComponents/JSResponseView.tsx (3 hunks)
  • app/client/src/layoutSystems/anvil/integrations/selectors.ts (0 hunks)
  • app/client/src/utils/hooks/useFeatureFlagOverride.ts (0 hunks)
💤 Files with no reviewable changes (3)
  • app/client/src/ce/entities/FeatureFlag.ts
  • app/client/src/utils/hooks/useFeatureFlagOverride.ts
  • app/client/src/layoutSystems/anvil/integrations/selectors.ts
🧰 Additional context used
🧬 Code Definitions (1)
app/client/src/components/editorComponents/JSResponseView.tsx (1)
app/client/src/layoutSystems/anvil/integrations/selectors.ts (1) (1)
  • getIsAnvilEnabledInCurrentApplication (19:24)
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-build / client-build
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-prettier / prettier-check
🔇 Additional comments (3)
app/client/src/components/editorComponents/JSResponseView.tsx (3)

45-45: Updated import to use Anvil-specific selector.

The import has been updated to use getIsAnvilEnabledInCurrentApplication instead of the deprecated getReleaseFnCallingEnabled selector, aligning with the removal of the function calling feature flag.


217-217: Variable and selector updated to use Anvil status.

The switch from isFnCallingEnabled to isAnvilEnabled properly reflects the change in what's being checked - now we're looking at the Anvil layout system status rather than a dedicated feature flag.


230-230: Updated condition for visualization tab.

The condition for showing the visualization tab now depends on the Anvil layout system being enabled rather than the deprecated function calling flag. This ensures the visualization functionality remains available when using the Anvil layout system.

✨ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 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 skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Mar 18, 2025
const ideViewMode = useSelector(getIDEViewMode);
const location = useLocation();
const isFnCallingEnabled = useSelector(getReleaseFnCallingEnabled);
const isAnvilEnabled = useSelector(getIsAnvilEnabledInCurrentApplication);
Copy link
Contributor

Choose a reason for hiding this comment

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

You should getIsAnvilLayoutEnabled if you want to check release_anvil_enabled flag

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The current app check is required because you might be have anvil enabled but be working with a non-anvil app as well right?

Copy link
Contributor

@znamenskii-ilia znamenskii-ilia Mar 18, 2025

Choose a reason for hiding this comment

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

Valid point. Let's keep it and and use getIsAnvilLayoutEnabled if we need to show the tab only if release_anvil_enabled: true

@nidhi-nair nidhi-nair merged commit 919b290 into release Mar 18, 2025
17 checks passed
@nidhi-nair nidhi-nair deleted the chore/rm-fn-calling-server branch March 18, 2025 15:36
github-actions bot pushed a commit to Zeral-Zhang/appsmith that referenced this pull request Apr 12, 2025
## Description
> [!TIP]  
> _Add a TL;DR when the description is longer than 500 words or
extremely technical (helps the content, marketing, and DevRel team)._
>
> _Please also include relevant motivation and context. List any
dependencies that are required for this change. Add links to Notion,
Figma or any other documents that might be relevant to the PR._


Fixes #`Issue Number`  
_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=""

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]  
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.

<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Updated the logic that determines when the visualization view is
enabled, now relying on a refined integration check.
  
- **Chores**
- Removed an outdated configuration toggle from overall feature
settings.
  - Streamlined override options by eliminating an unnecessary flag.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Adding this label to a PR prevents it from being listed in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants