-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat: block new Appsmith AI datasource creation and show deprecation banner #42015
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
Open
salevine
wants to merge
1
commit into
release
Choose a base branch
from
feat/9316/disable-appsmith-ai
base: release
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
app/client/src/components/editorComponents/AppsmithAIDeprecationCallout.test.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| import React from "react"; | ||
| import { render, screen } from "@testing-library/react"; | ||
| import "@testing-library/jest-dom"; | ||
| import { ThemeProvider } from "styled-components"; | ||
| import { BrowserRouter as Router } from "react-router-dom"; | ||
| import { lightTheme } from "selectors/themeSelectors"; | ||
| import AppsmithAIDeprecationCallout from "./AppsmithAIDeprecationCallout"; | ||
| import { | ||
| APPSMITH_AI_DEPRECATION_LEARN_MORE, | ||
| APPSMITH_AI_KILL_DATE, | ||
| createMessage, | ||
| } from "ee/constants/messages"; | ||
|
|
||
| const renderCallout = () => | ||
| render( | ||
| <ThemeProvider theme={lightTheme}> | ||
| <Router> | ||
| <AppsmithAIDeprecationCallout /> | ||
| </Router> | ||
| </ThemeProvider>, | ||
| ); | ||
|
|
||
| describe("AppsmithAIDeprecationCallout", () => { | ||
| it("renders the deprecation message with the kill date", () => { | ||
| renderCallout(); | ||
|
|
||
| expect( | ||
| screen.getByTestId("t--appsmith-ai-deprecation-callout"), | ||
| ).toBeInTheDocument(); | ||
| expect(screen.getByText(/Appsmith AI is deprecated/i)).toBeInTheDocument(); | ||
| expect( | ||
| screen.getByText(new RegExp(APPSMITH_AI_KILL_DATE)), | ||
| ).toBeInTheDocument(); | ||
| }); | ||
|
|
||
| it("renders the migration docs link", () => { | ||
| renderCallout(); | ||
|
|
||
| expect( | ||
| screen.getByText(createMessage(APPSMITH_AI_DEPRECATION_LEARN_MORE)), | ||
| ).toBeInTheDocument(); | ||
| }); | ||
| }); |
39 changes: 39 additions & 0 deletions
39
app/client/src/components/editorComponents/AppsmithAIDeprecationCallout.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| import React from "react"; | ||
| import styled from "styled-components"; | ||
| import { Callout } from "@appsmith/ads"; | ||
| import { DocsLink, openDoc } from "constants/DocumentationLinks"; | ||
| import { | ||
| APPSMITH_AI_DEPRECATION_LEARN_MORE, | ||
| APPSMITH_AI_DEPRECATION_MESSAGE, | ||
| createMessage, | ||
| } from "ee/constants/messages"; | ||
|
|
||
| const CalloutWrapper = styled.div` | ||
| width: 100%; | ||
| margin-bottom: var(--ads-v2-spaces-4); | ||
| `; | ||
|
|
||
| /** | ||
| * Deprecation notice for the managed Appsmith AI plugin (release 2.3). | ||
| * Shown on existing Appsmith AI datasources and queries; creating new | ||
| * Appsmith AI datasources is blocked separately (client filter + server guard). | ||
| */ | ||
| function AppsmithAIDeprecationCallout() { | ||
| return ( | ||
| <CalloutWrapper data-testid="t--appsmith-ai-deprecation-callout"> | ||
| <Callout | ||
| kind="warning" | ||
| links={[ | ||
| { | ||
| children: createMessage(APPSMITH_AI_DEPRECATION_LEARN_MORE), | ||
| onClick: () => openDoc(DocsLink.APPSMITH_AI_DEPRECATION), | ||
| }, | ||
| ]} | ||
| > | ||
| {createMessage(APPSMITH_AI_DEPRECATION_MESSAGE)} | ||
| </Callout> | ||
| </CalloutWrapper> | ||
| ); | ||
| } | ||
|
|
||
| export default AppsmithAIDeprecationCallout; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
app/client/src/pages/Editor/IntegrationEditor/__tests__/aiPlugins.test.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| import React from "react"; | ||
| import { ReduxActionTypes } from "ee/constants/ReduxActionConstants"; | ||
| import store from "store"; | ||
| import { render } from "test/testUtils"; | ||
| import { PluginPackageName } from "entities/Plugin"; | ||
| import AIPlugins from "../AIPlugins"; | ||
|
|
||
| const aiPlugins = [ | ||
| { | ||
| id: "appsmith-ai-plugin-id", | ||
| name: "Appsmith AI", | ||
| type: "AI", | ||
| packageName: PluginPackageName.APPSMITH_AI, | ||
| iconLocation: "", | ||
| }, | ||
| { | ||
| id: "openai-plugin-id", | ||
| name: "OpenAI", | ||
| type: "AI", | ||
| packageName: "openai-plugin", | ||
| iconLocation: "", | ||
| }, | ||
| ]; | ||
|
|
||
| describe("AIPlugins create-new list", () => { | ||
| it("hides deprecated Appsmith AI but keeps other AI plugins", () => { | ||
| store.dispatch({ | ||
| type: ReduxActionTypes.FETCH_PLUGINS_SUCCESS, | ||
| payload: aiPlugins, | ||
| }); | ||
|
|
||
| const { container } = render( | ||
| <AIPlugins pageId="pageId" showUnsupportedPluginDialog={() => {}} />, | ||
| ); | ||
|
|
||
| // BYOK AI plugins must remain creatable | ||
| expect( | ||
| container.querySelector(".t--createBlankApi-openai-plugin"), | ||
| ).not.toBeNull(); | ||
| // The deprecated managed Appsmith AI plugin must not be offered for creation | ||
| expect( | ||
| container.querySelector( | ||
| `.t--createBlankApi-${PluginPackageName.APPSMITH_AI}`, | ||
| ), | ||
| ).toBeNull(); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Point the migration link at migration guidance.
The configured destination currently opens the Appsmith AI reference page, which documents connecting and querying Appsmith AI rather than the BYOK migration path promised by “Learn how to migrate.” Users will be sent to the wrong documentation from the deprecation banner. Replace it with the published migration guide, or avoid labeling this link as migration guidance until that guide exists. (docs.appsmith.com)
🤖 Prompt for AI Agents
Source: MCP tools