Skip to content

UN-3020 [FIX] Agentic prompt studio side navbar fix#1762

Merged
athul-rs merged 2 commits intomainfrom
UN-3020-agentic-prompt-studio-navbar-fix
Jan 29, 2026
Merged

UN-3020 [FIX] Agentic prompt studio side navbar fix#1762
athul-rs merged 2 commits intomainfrom
UN-3020-agentic-prompt-studio-navbar-fix

Conversation

@Deepak-Kesavan
Copy link
Contributor

What

  • Agentic prompt studio side navbar fix

Why

  • Agentic prompt studio side navbar is visible in other products

How

  • Added selected product conditional check.

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)

Database Migrations

Env Config

Relevant Docs

Related Issues or PRs

Dependencies Versions

Notes on Testing

Screenshots

Checklist

I have read and understood the Contribution Guidelines.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 28, 2026

Summary by CodeRabbit

  • Improvements

    • Refined Agentic Prompt Studio menu item availability logic. The menu item now considers both plugin enablement status and product state configuration to determine visibility, providing more granular control over when the feature is accessible.
  • Refactor

    • Optimized internal menu state calculations through selective memoization and streamlined state dependency management.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Modified SideNavBar component to introduce memoized isUnstract flag computed from selected product state. Agentic Prompt Studio menu item is now conditionally rendered when both plugin is enabled and product is "unstract". Refactored isUnstract computation to top-level memoization with updated dependency arrays.

Changes

Cohort / File(s) Summary
Memoized Product State & Conditional Menu Rendering
frontend/src/components/navigations/side-nav-bar/SideNavBar.jsx
Introduced useMemo hook to compute isUnstract flag from selectedProduct. Added dual-condition gating for Agentic Prompt Studio menu item: requires both agenticPromptStudioEnabled and isUnstract to be true. Updated shouldDisableAll dependency array to include isUnstract in addition to unstractSubscriptionPlan.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description follows the required template with most sections included. However, the critical 'Can this PR break existing features' section is incomplete (only contains a dash with no content), which is flagged as mandatory by the template. Complete the 'Can this PR break existing features' section by explicitly stating whether this change could break existing features and explaining why or why not.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the specific fix (Agentic prompt studio side navbar) and references the issue number (UN-3020), directly matching the main change in the changeset.
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

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

@muhammad-ali-e muhammad-ali-e left a comment

Choose a reason for hiding this comment

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

left a NIT

@sonarqubecloud
Copy link

@athul-rs athul-rs merged commit 290ca69 into main Jan 29, 2026
6 checks passed
@athul-rs athul-rs deleted the UN-3020-agentic-prompt-studio-navbar-fix branch January 29, 2026 09:11
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.

5 participants