Skip to content
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: AI query not showing any bottom tabs #38687

Merged
merged 1 commit into from
Jan 16, 2025
Merged

Conversation

hetunandu
Copy link
Member

@hetunandu hetunandu commented Jan 16, 2025

Description

fixes an incorrect merge resolution that happened in https://github.com/appsmithorg/appsmith/pull/38368/files#diff-b600a43ecf839dcfa5626f565229391ac7eedf26c2c51e201f379e26bda3a5a2L111

Automation

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

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12803566566
Commit: bf2ad25
Cypress dashboard.
Tags: @tag.Datasource
Spec:


Thu, 16 Jan 2025 07:35:26 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • New Features
    • Added support for AI plugin type in the plugin action response tabs configuration.
    • Enabled "Datasource" tab display for AI plugins when specific conditions are met.

Copy link
Contributor

coderabbitai bot commented Jan 16, 2025

Walkthrough

The pull request introduces support for a new plugin type PluginType.AI in the usePluginActionResponseTabs hook within the client-side application. The modification allows the "Datasource" tab to be displayed for AI plugins, expanding the existing logic that previously supported other plugin types like DB, REMOTE, SAAS, etc. The change seamlessly integrates the new plugin type without altering the core functionality of the hook.

Changes

File Change Summary
app/client/src/ce/PluginActionEditor/components/PluginActionResponse/hooks/usePluginActionResponseTabs.tsx Added PluginType.AI to the array of plugin types that can trigger "Datasource" tab display

Suggested labels

Bug, Query & JS Pod, ok-to-test, Integrations Product

Suggested reviewers

  • ankitakinger
  • albinAppsmith

Possibly related PRs

Poem

🤖 In the realm of plugins, a new star rises bright,
AI joins the dance, with tabs shining light,
Code weaves magic, types expand their might,
Datasources whisper secrets of digital flight!
Flexibility blooms in this coding delight 🌟


📜 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 71ff3ee and bf2ad25.

📒 Files selected for processing (1)
  • app/client/src/ce/PluginActionEditor/components/PluginActionResponse/hooks/usePluginActionResponseTabs.tsx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: build
  • GitHub Check: build
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-build / client-build
  • GitHub Check: client-prettier / prettier-check
🔇 Additional comments (1)
app/client/src/ce/PluginActionEditor/components/PluginActionResponse/hooks/usePluginActionResponseTabs.tsx (1)

115-115: LGTM! Addition of AI plugin type looks correct.

The change appropriately adds AI plugin type to the list of plugins that can show the datasource tab, following the existing pattern.

Let's verify that this fixes the bottom tabs for AI queries:

✅ Verification successful

✅ Change verified: Adding AI plugin type follows established patterns

The addition of PluginType.AI to the list of plugin types that can show datasource and response tabs is consistent with how other similar plugin types (DB, REMOTE, SAAS) are handled in the codebase. The implementation is safe and follows the existing pattern.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any special handling of AI plugin type that might affect tab visibility
rg -l 'PluginType.AI.*tab|tab.*PluginType.AI' 

# Look for any tests related to AI plugin tabs
rg -l 'test.*AI.*tab|tab.*test.*AI'

Length of output: 181


Script:

#!/bin/bash
# Get the hook implementation
ast-grep --pattern 'const usePluginActionResponseTabs = $$$'

# Look for AI plugin type usage patterns
rg -A 5 'PluginType\.AI' 

# Check for tab visibility related code
rg -A 5 'showDatasourceTab|showPaginationTab|showResponseTab'

Length of output: 76715


Script:

#!/bin/bash
# Get the specific file content
cat app/client/src/ce/PluginActionEditor/components/PluginActionResponse/hooks/usePluginActionResponseTabs.tsx

# Look for plugin type enum definitions and usage
rg -A 5 "enum PluginType" 

# Find tab visibility related code in the specific file
rg -A 10 "showDatasourceTab|showPaginationTab|showResponseTab" app/client/src/ce/PluginActionEditor/components/PluginActionResponse/hooks/usePluginActionResponseTabs.tsx

Length of output: 7163


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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. (Beta)
  • @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.

@hetunandu hetunandu requested a review from KelvinOm January 16, 2025 06:45
@hetunandu hetunandu added the ok-to-test Required label for CI label Jan 16, 2025
@github-actions github-actions bot added the Bug Something isn't working label Jan 16, 2025
@hetunandu hetunandu enabled auto-merge (squash) January 16, 2025 06:55
@hetunandu hetunandu merged commit 2b8ba77 into release Jan 16, 2025
51 checks passed
@hetunandu hetunandu deleted the fix/ai-query-bottom-tabs branch January 16, 2025 07:35
@coderabbitai coderabbitai bot mentioned this pull request Jan 27, 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 ok-to-test Required label for CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants