Skip to content

UN-3234 [FIX] Added beta tag to agentic prompt studio#1794

Merged
Deepak-Kesavan merged 5 commits intomainfrom
UN-3234-Add-beta-tag-to-agentic-prompt-studio-navigation-item
Feb 26, 2026
Merged

UN-3234 [FIX] Added beta tag to agentic prompt studio#1794
Deepak-Kesavan merged 5 commits intomainfrom
UN-3234-Add-beta-tag-to-agentic-prompt-studio-navigation-item

Conversation

@Deepak-Kesavan
Copy link
Contributor

What

  • Added beta tag to agentic prompt studio

Why

  • Added beta tag to agentic prompt studio because its not fully stable yet

How

  • Used antd tags

Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)

  • No

Database Migrations

Env Config

Relevant Docs

Related Issues or PRs

Dependencies Versions

Notes on Testing

Screenshots

image

Checklist

I have read and understood the Contribution Guidelines.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 16, 2026

Summary by CodeRabbit

  • UI Improvements

    • Added a blue BETA badge next to the Agentic Prompt Studio menu item to highlight in-progress features.
    • Adjusted spacing and alignment for the sidebar title row to improve visual consistency.
  • Style

    • Introduced styling helpers to separate the BETA tag from adjacent content and center sidebar title elements.

Walkthrough

Adds a blue BETA tag next to the Agentic Prompt Studio entry in the side navigation and two CSS helpers for title layout and badge spacing; JSX imports antd Tag and wraps the menu item title with the badge.

Changes

Cohort / File(s) Summary
Side navigation — BETA badge & styles
frontend/src/components/navigations/side-nav-bar/SideNavBar.css, frontend/src/components/navigations/side-nav-bar/SideNavBar.jsx
Introduced .sidebar-title-row and .sidebar-beta-tag CSS classes. Imported Tag from antd and added a blue "BETA" tag next to the Agentic Prompt Studio menu item; refactored that menu item into a local agenticMenuItem object and applied sidebar-title-row to relevant Typography elements.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a beta tag to the agentic prompt studio navigation item.
Description check ✅ Passed The description covers all critical sections with adequate detail including What, Why, How, breaking changes assessment, and screenshots.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch UN-3234-Add-beta-tag-to-agentic-prompt-studio-navigation-item

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
frontend/src/components/navigations/side-nav-bar/SideNavBar.jsx (1)

339-361: ⚠️ Potential issue | 🟡 Minor

Collapsed sidebar tooltip will render the BETA tag inside it.

When the sidebar is collapsed, el.title is used as the Tooltip content (Line 462). For the agentic item, title is now a JSX fragment containing both the text and the <Tag>. This means the tooltip will render "Agentic Prompt Studio" with a styled BETA badge crammed inside it, which likely isn't the intended UX.

Consider keeping the original string title for tooltip use and only rendering the JSX version in the expanded sidebar.

Proposed fix
     const agenticMenuItem = {
       id: 1.2,
       title: "Agentic Prompt Studio",
       description: "Build and manage AI-powered extraction workflows",
       image: CustomTools,
       path: `/${orgName}/agentic-prompt-studio`,
       active: globalThis.location.pathname.startsWith(
         `/${orgName}/agentic-prompt-studio`
       ),
+      isBeta: true,
     };
-
-    // Add beta tag to title
-    agenticMenuItem.title = (
-      <>
-        {agenticMenuItem.title}
-        <Tag color="blue" className="sidebar-beta-tag">
-          BETA
-        </Tag>
-      </>
-    );

     data[0]?.subMenu?.splice(1, 0, agenticMenuItem);

Then in the rendering section (around Line 481), render the tag conditionally:

<Typography className="sidebar-item-text fs-14 sidebar-title-row">
  {el.title}
  {el.isBeta && (
    <Tag color="blue" className="sidebar-beta-tag">
      BETA
    </Tag>
  )}
</Typography>

This keeps el.title as a plain string for tooltip display while showing the badge only in the expanded sidebar.

🧹 Nitpick comments (1)
frontend/src/components/navigations/side-nav-bar/SideNavBar.jsx (1)

481-483: sidebar-title-row applied to all menu items, not just the one with a badge.

The sidebar-title-row class (which sets display: flex; align-items: center) is now on every menu item's title Typography. It's harmless for plain-text items but unnecessary — and if you adopt the isBeta flag approach above, you could scope this class conditionally to only items that need the flex layout.

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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
frontend/src/components/navigations/side-nav-bar/SideNavBar.jsx (1)

343-366: ⚠️ Potential issue | 🟠 Major

Make Agentic menu insertion idempotent to avoid duplicate entries.

At Line 365, splice runs on each render. If data[0].subMenu is backed by persistent menu state (plugin hook), the "Agentic Prompt Studio" item can be inserted multiple times.

💡 Proposed fix
   if (agenticPromptStudioEnabled && isUnstract) {
+    const agenticPath = `/${orgName}/agentic-prompt-studio`;
     const agenticMenuItem = {
       id: 1.2,
       title: "Agentic Prompt Studio",
       description: "Build and manage AI-powered extraction workflows",
       image: CustomTools,
-      path: `/${orgName}/agentic-prompt-studio`,
+      path: agenticPath,
       active: globalThis.location.pathname.startsWith(
-        `/${orgName}/agentic-prompt-studio`,
+        agenticPath,
       ),
     };

     // Add beta tag to title
     agenticMenuItem.title = (
       <>
         {agenticMenuItem.title}
         <Tag color="blue" className="sidebar-beta-tag">
           BETA
         </Tag>
       </>
     );

-    data[0]?.subMenu?.splice(1, 0, agenticMenuItem);
+    const buildSubMenu = data[0]?.subMenu;
+    const alreadyExists = buildSubMenu?.some((item) => item.path === agenticPath);
+    if (!alreadyExists) {
+      buildSubMenu?.splice(1, 0, agenticMenuItem);
+    }
   }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/src/components/navigations/side-nav-bar/SideNavBar.jsx` around lines
343 - 366, The Agentic Prompt Studio menu is inserted unconditionally causing
duplicates because data[0]?.subMenu?.splice(1, 0, agenticMenuItem) runs on every
render; before splicing, check for an existing entry (e.g., match on
agenticMenuItem.path or id like 1.2 or title) in data[0].subMenu and only insert
if not already present, using the existing symbols agenticPromptStudioEnabled,
isUnstract, agenticMenuItem and the data[0]?.subMenu array to locate and guard
the insertion.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@frontend/src/components/navigations/side-nav-bar/SideNavBar.jsx`:
- Around line 343-366: The Agentic Prompt Studio menu is inserted
unconditionally causing duplicates because data[0]?.subMenu?.splice(1, 0,
agenticMenuItem) runs on every render; before splicing, check for an existing
entry (e.g., match on agenticMenuItem.path or id like 1.2 or title) in
data[0].subMenu and only insert if not already present, using the existing
symbols agenticPromptStudioEnabled, isUnstract, agenticMenuItem and the
data[0]?.subMenu array to locate and guard the insertion.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to Reviews > Disable Cache setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 9475f8d and c41a323.

📒 Files selected for processing (1)
  • frontend/src/components/navigations/side-nav-bar/SideNavBar.jsx

@github-actions
Copy link
Contributor

Frontend Lint Report (Biome)

All checks passed! No linting or formatting issues found.

@sonarqubecloud
Copy link

@Deepak-Kesavan Deepak-Kesavan merged commit a5ce33c into main Feb 26, 2026
7 checks passed
@Deepak-Kesavan Deepak-Kesavan deleted the UN-3234-Add-beta-tag-to-agentic-prompt-studio-navigation-item branch February 26, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants