Skip to content

chore: ai agent sing up flow#39943

Merged
KelvinOm merged 1 commit intoreleasefrom
chore/ai-agent-flag
Mar 27, 2025
Merged

chore: ai agent sing up flow#39943
KelvinOm merged 1 commit intoreleasefrom
chore/ai-agent-flag

Conversation

@KelvinOm
Copy link
Collaborator

@KelvinOm KelvinOm commented Mar 26, 2025

Description

Part of EE 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="@tag.Sanity"

🔍 Cypress test results

Warning

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/14106727889
Commit: 0fb8b6d
Cypress dashboard.
Tags: @tag.Sanity
Spec:
It seems like no tests ran 😔. We are not able to recognize it, please check workflow here.


Thu, 27 Mar 2025 12:53:30 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Introduced informative messaging for AI Agent features in the applications and sign-up experiences.
    • Enabled dynamic interface behavior that conditionally displays content based on the activation of AI Agent functionality.
  • Style

    • Enhanced text formatting in authentication views to improve readability and support multi-line content.

@KelvinOm KelvinOm added the ok-to-test Required label for CI label Mar 26, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 26, 2025

Walkthrough

This pull request introduces AI agent feature enhancements. Two new message constants are added to improve user guidance and the feature flag license_ai_agent_enabled is introduced with a default disabled state. The application’s display logic now conditionally renders components based on whether the AI agent flow is enabled, using a new selector. Additionally, minor styling updates and adjustments in feature flag override configuration are applied.

Changes

File(s) Change Summary
app/client/src/ce/constants/messages.ts Added exported constants: AI_APPLICATION_CARD_LIST_ZERO_STATE and AI_AGENT_AUTH_SUBTITLE to guide AI agent-related UI.
app/client/src/ce/entities/FeatureFlag.ts
app/client/src/utils/hooks/useFeatureFlagOverride.ts
Introduced new feature flag license_ai_agent_enabled (default false) and updated available overrides accordingly.
app/client/src/ce/pages/Applications/index.tsx
app/client/src/ce/selectors/aiAgentSelectors.ts
app/client/src/pages/UserAuth/SignUp.tsx
Integrated AI agent flow using the new selector getIsAiAgentFlowEnabled; modified rendering logic for application cards and sign-up components based on the flag.
app/client/src/pages/UserAuth/Container.tsx Updated paragraph CSS to include whitespace-pre-line for improved subtitle text formatting.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant SU as SignUp Component
    participant SA as AI Agent Selector
    participant RF as Redux Store

    U->>SU: Navigate to SignUp Page
    SU->>SA: Invoke getIsAiAgentFlowEnabled(state)
    SA->>RF: Check "license_ai_agent_enabled" flag
    RF-->>SA: Return flag state
    SA-->>SU: Provide flag result
    alt AI Agent Flow Enabled
        SU->>SU: Render AI_AGENT_AUTH_SUBTITLE and LOGIN_PAGE_TITLE<br/>(Hide cloud hosting message)
    else
        SU->>SU: Render default SignUp title and subtitle
    end
Loading
sequenceDiagram
    participant U as User
    participant A as Applications Component
    participant SEL as AI Agent Selector
    participant R as Redux Store

    U->>A: Load Applications Page
    A->>SEL: Invoke getIsAiAgentFlowEnabled(state)
    SEL->>R: Request flag status for "license_ai_agent_enabled"
    R-->>SEL: Return flag state
    SEL-->>A: Provide flag result
    alt AI Agent Flow Enabled
        A->>A: Render Anvil applications with conditional empty state message
    else
        A->>A: Render standard application cards list
    end
Loading

Possibly related PRs

Suggested labels

Task, Bug, Google Sheets, Query & JS Pod, Integrations Product, Integrations Pod General

Suggested reviewers

  • ApekshaBhosale
  • hetunandu
  • jsartisan

Poem

In the code's embrace, new features gleam,
AI flows waltz into our digital dream.
Flags and messages now lead the way,
Guiding users with words that brightly sway.
A merge well-done, we cheer and beam! 🚀


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 98ad70e and 0fb8b6d.

📒 Files selected for processing (7)
  • app/client/src/ce/constants/messages.ts (1 hunks)
  • app/client/src/ce/entities/FeatureFlag.ts (2 hunks)
  • app/client/src/ce/pages/Applications/index.tsx (4 hunks)
  • app/client/src/ce/selectors/aiAgentSelectors.ts (1 hunks)
  • app/client/src/pages/UserAuth/Container.tsx (1 hunks)
  • app/client/src/pages/UserAuth/SignUp.tsx (5 hunks)
  • app/client/src/utils/hooks/useFeatureFlagOverride.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (6)
  • app/client/src/pages/UserAuth/Container.tsx
  • app/client/src/ce/selectors/aiAgentSelectors.ts
  • app/client/src/utils/hooks/useFeatureFlagOverride.ts
  • app/client/src/ce/constants/messages.ts
  • app/client/src/ce/entities/FeatureFlag.ts
  • app/client/src/ce/pages/Applications/index.tsx
🧰 Additional context used
🧬 Code Definitions (1)
app/client/src/pages/UserAuth/SignUp.tsx (2)
app/client/src/ce/selectors/aiAgentSelectors.ts (1)
  • getIsAiAgentFlowEnabled (9-11)
app/client/src/ce/constants/messages.ts (3)
  • AI_AGENT_AUTH_SUBTITLE (219-220)
  • SIGNUP_PAGE_TITLE (74-74)
  • LOGIN_PAGE_TITLE (67-67)
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: client-unit-tests / client-unit-tests
  • 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 (6)
app/client/src/pages/UserAuth/SignUp.tsx (6)

31-32: Import constants for AI agent flow
These newly imported constants for the AI agent flow look appropriate and well integrated.


68-68: Use of new AI agent selector
Importing getIsAiAgentFlowEnabled aligns with the rest of the code’s logic.


106-106: Redux selector usage
Using the getIsAiAgentFlowEnabled selector here cleanly retrieves the feature-flagged state.


109-109: Conditional redirect check
This ensures that sign-up is only possible when at least one option (form login or AI agent flow) is enabled.


233-234: Conditional display of self-host info
Omitting the self-hosting prompt when the AI agent flow is active prevents user confusion and streamlines the UI.


253-262: Discrepancy in page titles vs. summary
The code displays the “Sign Up” title if the AI agent flow is enabled, whereas the AI-generated summary suggests the reverse.

Likely an incorrect or invalid review comment.


🪧 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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.

@KelvinOm KelvinOm requested a review from jsartisan March 26, 2025 19:40
@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 26, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

🧹 Nitpick comments (1)
app/client/src/ce/constants/messages.ts (1)

219-220: Consider handling line breaks in component rather than message string.

The newline (\n) in this message string might not render as expected in HTML contexts unless handled properly in the component.

-export const AI_AGENT_AUTH_SUBTITLE = () =>
-  `Sign up with any Google account.\n Support for email will be available soon.`;
+export const AI_AGENT_AUTH_SUBTITLE = () =>
+  `Sign up with any Google account. Support for email will be available soon.`;
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c6b1b9a and 98ad70e.

📒 Files selected for processing (8)
  • app/client/src/ce/constants/messages.ts (1 hunks)
  • app/client/src/ce/entities/FeatureFlag.ts (2 hunks)
  • app/client/src/ce/pages/Applications/index.tsx (4 hunks)
  • app/client/src/ce/selectors/aiAgentSelectors.ts (1 hunks)
  • app/client/src/ee/selectors/aiAgentSelectors.ts (1 hunks)
  • app/client/src/pages/UserAuth/Container.tsx (1 hunks)
  • app/client/src/pages/UserAuth/SignUp.tsx (5 hunks)
  • app/client/src/utils/hooks/useFeatureFlagOverride.ts (1 hunks)
🧰 Additional context used
🧬 Code Definitions (3)
app/client/src/ce/selectors/aiAgentSelectors.ts (1)
app/client/src/ce/entities/FeatureFlag.ts (1)
  • FEATURE_FLAG (2-60)
app/client/src/pages/UserAuth/SignUp.tsx (2)
app/client/src/ce/selectors/aiAgentSelectors.ts (1)
  • getIsAiAgentFlowEnabled (5-7)
app/client/src/ce/constants/messages.ts (3)
  • AI_AGENT_AUTH_SUBTITLE (219-220)
  • SIGNUP_PAGE_TITLE (74-74)
  • LOGIN_PAGE_TITLE (67-67)
app/client/src/ce/pages/Applications/index.tsx (2)
app/client/src/ce/selectors/aiAgentSelectors.ts (1)
  • getIsAiAgentFlowEnabled (5-7)
app/client/src/ce/constants/messages.ts (3)
  • APPLICATIONS (214-214)
  • AI_APPLICATION_CARD_LIST_ZERO_STATE (217-218)
  • AI_AGENTS_APPLICATIONS (216-216)
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: client-build / client-build
  • GitHub Check: client-lint / client-lint
🔇 Additional comments (18)
app/client/src/ce/entities/FeatureFlag.ts (2)

20-20: Feature flag naming follows conventions

The new feature flag license_ai_agent_enabled follows the established naming convention for license-based features.


79-79: Default value set correctly

Setting the default value to false is appropriate for a new license-dependent feature.

app/client/src/ee/selectors/aiAgentSelectors.ts (1)

1-2: Follows EE module pattern

The re-export of CE selectors follows the established pattern for Enterprise Edition modules. This allows for potential extensions or overrides in the enterprise version.

app/client/src/utils/hooks/useFeatureFlagOverride.ts (1)

18-18: Added to override list correctly

The feature flag has been properly added to the available overrides, which will enable testing and development of this feature.

app/client/src/pages/UserAuth/Container.tsx (1)

71-71: Enhanced subtitle text formatting

Adding whitespace-pre-line is appropriate for maintaining line breaks in multi-line text, which likely supports the AI agent flow subtitle formatting.

app/client/src/ce/selectors/aiAgentSelectors.ts (1)

1-7: Well-structured AI agent selector that follows Redux selector patterns.

The implementation correctly uses the feature flag license_ai_agent_enabled to determine if the AI agent flow should be enabled. The code is concise and follows the functional selector pattern.

app/client/src/ce/constants/messages.ts (1)

217-218: Message constant follows consistent naming and implementation pattern.

This message constant for the zero state of AI agent card list follows the project's convention of using uppercase function constants.

app/client/src/ce/pages/Applications/index.tsx (5)

11-12: Adding new constant for AI agent application list zero state.

The new constant AI_APPLICATION_CARD_LIST_ZERO_STATE will be used to display a message when no AI agents are available in the workspace.


21-21: New selector import for AI agent flow state.

Importing getIsAiAgentFlowEnabled selector to determine if the AI agent feature is enabled through the feature flag system.


557-557: Added new feature flag state for AI agent flow.

The component now uses the getIsAiAgentFlowEnabled selector to conditionally render UI elements based on whether the AI agent feature is enabled.


902-918: Conditionally rendering application card list based on AI agent flow.

The non-Anvil applications list is now only displayed when the AI agent flow is disabled. This implements the UI switching behavior needed for the new feature.


919-942: Enhanced conditional rendering for AI applications.

Now displaying Anvil applications when either:

  1. Anvil is enabled and there are Anvil applications
  2. AI agent flow is enabled

The component also conditionally provides an empty state message for AI agents when appropriate.

app/client/src/pages/UserAuth/SignUp.tsx (6)

31-32: Added new message constants for AI agent auth flow.

Importing AI_AGENT_AUTH_SUBTITLE and LOGIN_PAGE_TITLE constants to support the new AI agent authentication flow.


68-68: New selector import for AI agent flow state.

Importing the getIsAiAgentFlowEnabled selector to determine if the AI agent feature is enabled.


106-106: Added AI agent flow state in the SignUp component.

Using the selector to track whether the AI agent feature is enabled to modify component behavior.


109-109: Updated redirection logic to consider AI agent flow state.

The redirect to login URL now only happens when both isFormLoginEnabled and isAiAgentFlowEnabled are false, allowing the signup page to be displayed for AI agent flow.


233-233: Conditionally displaying cloud hosting information.

The cloud hosting section is now only displayed when the AI agent flow is disabled, simplifying the UI for AI agent signup.


254-262: Updated container props based on AI agent flow state.

Modified the Container component to:

  1. Set the subtitle to AI agent authentication message when applicable
  2. Use different title text based on the AI agent flow state
  3. Maintain the footer section

This provides appropriate context for users in the AI agent flow.

jsartisan
jsartisan previously approved these changes Mar 27, 2025
@KelvinOm KelvinOm force-pushed the chore/ai-agent-flag branch from 98ad70e to 0fb8b6d Compare March 27, 2025 12:36
@KelvinOm KelvinOm merged commit 7f3a66d into release Mar 27, 2025
24 checks passed
@KelvinOm KelvinOm deleted the chore/ai-agent-flag branch March 27, 2025 12:48
github-actions bot pushed a commit to Zeral-Zhang/appsmith that referenced this pull request Apr 12, 2025
## Description
Part of [EE PR](appsmithorg/appsmith-ee#6704)


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="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]
> 🟣 🟣 🟣 Your tests are running.
> Tests running at:
<https://github.com/appsmithorg/appsmith/actions/runs/14106727889>
> Commit: 0fb8b6d
> Workflow: `PR Automation test suite`
> Tags: `@tag.Sanity`
> Spec: ``
> <hr>Thu, 27 Mar 2025 12:36:47 UTC
<!-- 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

- **New Features**
- Introduced informative messaging for AI Agent features in the
applications and sign-up experiences.
- Enabled dynamic interface behavior that conditionally displays content
based on the activation of AI Agent functionality.

- **Style**
- Enhanced text formatting in authentication views to improve
readability and support multi-line content.
<!-- 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

ok-to-test Required label for CI 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