Skip to content

Conversation

@jagadeeswaran-zipstack
Copy link
Contributor

@jagadeeswaran-zipstack jagadeeswaran-zipstack commented Dec 14, 2025

What

  • Remove the CheckableTag enabled/disabled toggle from prompt card LLM profiles
  • Remove related CSS styles and state management code

Why

  • When a second LLM profile is added in Prompt Studio, it appears as disabled by default
  • Only after page refresh does it show as enabled
  • This creates confusing UX and makes users think profiles aren't working

How

  • Removed CheckableTag component and its imports from PromptOutput.jsx
  • Removed enabledProfiles state and setEnabledProfiles from PromptCardItems.jsx
  • Removed handleTagChange function that managed the toggle state
  • Removed related CSS classes .prompt-output-icon-enabled and .prompt-output-icon-disabled
  • Simplified LLM profile sorting logic (now only sorts by default profile)

Can this PR break any existing features? If yes, please list possible items. If no, please explain why.

  • No. The enabled/disabled toggle was purely UI state that wasn't persisted or used elsewhere. Removing it simplifies the code and fixes the confusing default state behavior.

Relevant Docs

  • N/A

Related Issues or PRs

  • UN-1725

Dependencies Versions / Env Variables

  • No changes

Notes on Testing

  • Add multiple LLM profiles in Prompt Studio
  • Verify all profiles appear correctly without disabled state
  • Verify profiles can still be run individually or all together

Screenshots

image

...

Checklist

I have read and understood the Contribution Guidelines.

…ofiles

Remove the enabled/disabled toggle feature from prompt card LLM profiles
as it caused newly added profiles to appear disabled by default.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 14, 2025

Summary by CodeRabbit

Release Notes

  • UI Improvements
    • Replaced profile enable/disable toggle with two dedicated action buttons for running single documents and all documents simultaneously.
    • Added tooltips and improved disabled state handling for run controls.
    • Refined layout and styling for better visual organization of prompt execution options.

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

Walkthrough

The changes remove profile-level enable/disable functionality from the prompt card components. This involves eliminating state management for enabled profiles in PromptCardItems, replacing the CheckableTag UI with dedicated action buttons in PromptOutput, removing related props and dependencies, and simplifying CSS styling.

Changes

Cohort / File(s) Summary
CSS Styling Updates
frontend/src/components/custom-tools/prompt-card/PromptCard.css
Updated .prompt-info alignment from space-between to flex-end; removed selectors for .prompt-output-icon-enabled and .prompt-output-icon-disabled
Component Logic Refactoring
frontend/src/components/custom-tools/prompt-card/PromptCardItems.jsx
Removed enabledProfiles state and associated initialization; removed isEnabled property computation and sorting logic; updated useEffect dependencies; removed enabledProfiles prop passing to child components
UI and Props Refactoring
frontend/src/components/custom-tools/prompt-card/PromptOutput.jsx
Replaced CheckableTag enable/disable UI with two dedicated action buttons (single document and all documents); removed enabledProfiles and setEnabledProfiles props and PropTypes; updated disabled state logic to use isPromptLoading and isPublicSource

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • The changes follow a consistent pattern of removing enable/disable profile functionality across the component hierarchy
  • Most edits are straightforward removals of state, props, and related logic
  • Verify the new button onClick handlers in PromptOutput are correctly wired with appropriate PROMPT_RUN_TYPES values
  • Confirm all enabledProfiles prop references are fully removed from the component tree and that the CSS alignment change doesn't cause layout issues

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly addresses the main change: removing the CheckableTag enabled/disabled toggle from LLM profiles, which is the primary objective of this PR.
Description check ✅ Passed The PR description covers all required template sections with substantive information: What, Why, How, breakage assessment, testing notes, and related issues.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch UN-1725-bug-0-86-9-staging-prompt-studio-when-second-ll-mprofile-is-added-by-default-it-is-in-d-isabled-state-only-on-page-refresh-it-is-getting-enabled-pfa

📜 Recent review details

Configuration used: CodeRabbit 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 a1344ed and c36e04e.

📒 Files selected for processing (3)
  • frontend/src/components/custom-tools/prompt-card/PromptCard.css (1 hunks)
  • frontend/src/components/custom-tools/prompt-card/PromptCardItems.jsx (1 hunks)
  • frontend/src/components/custom-tools/prompt-card/PromptOutput.jsx (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
frontend/src/components/custom-tools/prompt-card/PromptOutput.jsx (2)
frontend/src/components/custom-tools/prompt-card/PromptCard.jsx (1)
  • handleRun (253-313)
frontend/src/helpers/GetStaticData.js (1)
  • PROMPT_RUN_TYPES (571-578)
frontend/src/components/custom-tools/prompt-card/PromptCardItems.jsx (1)
frontend/src/components/custom-tools/prompt-card/PromptCard.jsx (1)
  • selectedLlmProfileId (42-42)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (5)
frontend/src/components/custom-tools/prompt-card/PromptCard.css (1)

169-169: LGTM - Layout adjustment supports simplified UI.

The change from space-between to flex-end aligns with removing the CheckableTag component, ensuring the new action buttons are properly positioned.

frontend/src/components/custom-tools/prompt-card/PromptCardItems.jsx (2)

154-169: LGTM - Simplified profile sorting logic.

The removal of isEnabled from profile mapping and sorting logic correctly implements the PR objective. Profiles now sort only by default status, which is clearer and eliminates the confusing disabled state for newly added profiles.


178-178: LGTM - Dependencies correctly updated.

The useEffect dependency array correctly reflects the removal of enabledProfiles state, now depending only on llmProfiles and selectedLlmProfileId.

frontend/src/components/custom-tools/prompt-card/PromptOutput.jsx (2)

372-418: LGTM - Clear replacement of toggle with explicit action buttons.

The new UI replaces the confusing CheckableTag toggle with two dedicated action buttons:

  • PlayCircleOutlined for running the current document
  • PlayCircleFilled for running all documents

The tooltips clearly communicate each button's purpose, and the disabled state logic (based on isPromptLoading and isPublicSource) is simpler and more intuitive than the previous enabled/disabled toggle approach. The handlers correctly invoke handleRun with appropriate PROMPT_RUN_TYPES values.


466-481: LGTM - PropTypes correctly updated.

The PropTypes definition correctly reflects the removal of enabledProfiles and setEnabledProfiles props, maintaining type safety for the simplified component API.


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.

@sonarqubecloud
Copy link

@jaseemjaskp jaseemjaskp merged commit 255dc06 into main Dec 30, 2025
6 checks passed
@jaseemjaskp jaseemjaskp deleted the UN-1725-bug-0-86-9-staging-prompt-studio-when-second-ll-mprofile-is-added-by-default-it-is-in-d-isabled-state-only-on-page-refresh-it-is-getting-enabled-pfa branch December 30, 2025 04:41
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