Skip to content

Conversation

@chandrasekharan-zipstack
Copy link
Contributor

@chandrasekharan-zipstack chandrasekharan-zipstack commented Jan 24, 2026

What

Remove success alerts from various frontend components to reduce notification clutter:

Delete Success Alerts Removed:

  • DocumentParser.jsx - "Deleted successfully" (prompt deletion)
  • Users.jsx - "User deleted successfully"
  • ListOfTools.jsx - Tool deletion success alert
  • FileHistoryModal.jsx - Single/bulk file history deletion alerts (3 alerts)

Settings/Config Save Alerts Removed:

  • DefaultTriad.jsx - "Default triad setting saved successfully"
  • ManageLlmProfiles.jsx - "Default LLM Profile updated successfully"
  • PreAndPostAmbleModal.jsx - "Saved successfully"
  • CustomDataSettings.jsx - "Custom data saved successfully"
  • CustomSynonyms.jsx - Save/delete synonyms success alerts
  • ToolSettings.jsx - Adapter deletion and sharing settings alerts
  • ConfigureDs.jsx - Test connection and connector add/update alerts
  • ListOfTools.jsx - Sharing settings success alert

Previously Removed (first commit):

  • ApiDeployment.jsx - Success alert
  • Pipelines.jsx - Success alert
  • useClearFileHistory.js - Success alert

Why

  • Success alerts create notification clutter in the UI
  • Users don't need confirmation for every successful action
  • Reducing unnecessary alerts improves user experience
  • Clipboard copy alerts are intentionally kept (user needs feedback for copy actions)

How

  • Removed setAlertDetails({ type: "success", ... }) blocks
  • Kept all error handling and business logic intact
  • Cleaned up unused variables (e.g., successMsg in CustomSynonyms.jsx)

Can this PR break any existing features?

No, this only removes success notifications. All core functionality and error handling remains unchanged.

Database Migrations

  • None

Env Config

  • None

Relevant Docs

  • None

Related Issues or PRs

  • None

Dependencies Versions

  • None

Notes on Testing

Verify that success alerts no longer appear when:

  • Deleting prompts in Prompt Studio
  • Deleting users from settings
  • Deleting tools/projects from list
  • Deleting file history records
  • Saving default triad settings
  • Updating default LLM profile
  • Saving pre/post amble settings
  • Saving custom data settings
  • Saving custom synonyms
  • Deleting adapters
  • Updating sharing settings
  • Test connection and connector submission

Verify that these still work:

  • All error alerts should still display normally
  • Clipboard copy alerts should still appear

Screenshots

  1. Before these changes we get such a pop up on saving / deleting entities which is pretty obvious
image 2. Similar alerts are shown while saving settings, which we no longer do with this PR image
  • None

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 [email protected]

Remove success alerts from API deployments, pipelines, and file history operations to reduce notification clutter.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 24, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Removed success notification alerts across many workflows (deployments, pipelines, file history, connectors, custom tools, LLM profile updates, users, tool settings); error handling remains.
  • New Features

    • Custom tools UI improvements: new default action buttons, saved-state indicator, and refined save button behavior (disabled/loading states and "Saved" label).

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

Walkthrough

Removed many user-facing success alerts, simplified a file-history hook signature, added local hasChanges/isSaved state in several editor components, and refactored the tools list to introduce an internal DefaultCustomButtons component and consolidated rendering.

Changes

Cohort / File(s) Summary
Remove success alert side effects
frontend/src/components/deployments/api-deployment/ApiDeployment.jsx, frontend/src/components/pipelines-or-deployments/pipelines/Pipelines.jsx, frontend/src/components/custom-tools/document-parser/DocumentParser.jsx, frontend/src/components/pipelines-or-deployments/file-history-modal/FileHistoryModal.jsx, frontend/src/components/settings/default-triad/DefaultTriad.jsx, frontend/src/components/settings/users/Users.jsx, frontend/src/components/tool-settings/tool-settings/ToolSettings.jsx, frontend/src/components/input-output/configure-ds/ConfigureDs.jsx, frontend/src/components/custom-tools/manage-llm-profiles/ManageLlmProfiles.jsx
Deleted success-alert dispatches after successful API operations (status updates, pipeline sync/enable, saves/deletes/sharing, connector add/update). Preserved error handling, state updates, data refreshes, and modal flows.
Add/adjust local save-state and change-tracking
frontend/src/components/custom-tools/custom-data-settings/CustomDataSettings.jsx, frontend/src/components/custom-tools/custom-synonyms/CustomSynonyms.jsx, frontend/src/components/custom-tools/pre-and-post-amble-modal/PreAndPostAmbleModal.jsx
Added hasChanges and isSaved flags, updated effects to reset on tool/tab switch, adjusted save button disabled/label logic, and replaced in-app success alerts with local saved-state UI changes.
Simplify file-history hook
frontend/src/hooks/useClearFileHistory.js
Removed successMessage parameter from clearFileHistory, eliminated success-alert emission, added finally to reset isClearing, return boolean success, and updated internal success path to simply await clearFileMarkers. Update callers that passed a message.
Tools list UI refactor + new internal buttons
frontend/src/components/custom-tools/list-of-tools/ListOfTools.jsx
Introduced internal DefaultCustomButtons component and PropTypes usage, consolidated rendering into defaultContent, replaced prior CustomButtons usage with a CustomButtonsComponent, removed duplicate exception hook, moved/import logic into new buttons, wired import loading state, and removed delete-success alert. Review rendering and import flow changes.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title '[MISC] Remove success alerts from deployments and pipelines' is overly narrow and misleading, as the PR removes success alerts from 13+ components across settings, tools, file history, and other areas, not just deployments and pipelines. Update the title to accurately reflect the broader scope, such as '[MISC] Remove success alerts from frontend components' or '[MISC] Remove success notifications across settings and tools'.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The PR description is comprehensive, well-structured, and addresses all required template sections including What, Why, How, testing notes, and screenshots with clear explanations.

✏️ 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.

@chandrasekharan-zipstack chandrasekharan-zipstack changed the title [FEAT] Remove success alerts from deployments and pipelines [MISC] Remove success alerts from deployments and pipelines Jan 24, 2026
Remove non-critical success alerts from 11 frontend components:
- Document parser, users, list of tools, file history modal
- Default triad, LLM profiles, pre/post amble modal
- Custom data/synonyms, tool settings, configure data source

Co-Authored-By: Claude Opus 4.5 <[email protected]>
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: 1

🤖 Fix all issues with AI agents
In `@frontend/src/components/custom-tools/list-of-tools/ListOfTools.jsx`:
- Around line 25-33: The Space component usage currently sets an unsupported
prop gap={16}; replace it with size={16} (e.g., update the Space containing
CustomButton in ListOfTools.jsx) so the spacing is applied correctly; ensure any
other Space instances in this component also use size instead of gap to match
antd 5.5.1 API.
🧹 Nitpick comments (1)
frontend/src/components/custom-tools/list-of-tools/ListOfTools.jsx (1)

362-371: Complete useCallback deps (or drop memoization)

CustomButtonsComponent closes over handleNewProjectBtnClick, but it’s not in the dependency array. Either add the missing deps or remove useCallback if memoization isn’t needed.

♻️ Proposed tweak
-  const CustomButtonsComponent = useCallback(
+  const CustomButtonsComponent = useCallback(
     () => (
       <DefaultCustomButtons
         setOpenImportTool={setOpenImportTool}
         isImportLoading={isImportLoading}
         handleNewProjectBtnClick={handleNewProjectBtnClick}
       />
     ),
-    [isImportLoading]
+    [isImportLoading, handleNewProjectBtnClick, setOpenImportTool]
   );

@hari-kuriakose
Copy link
Contributor

hari-kuriakose commented Jan 27, 2026

@chandrasekharan-zipstack Request to get the list of places where we have taken out success alerts reviewed by the product owners too, before proceeding to merge.

That being said, appreciate the effort. Keep it coming!

[FIX] Fix Save→Saved button text not showing in settings components

Fix useEffect dependency bug that was resetting isSaved state immediately
after save, preventing "Saved" text from displaying on Save button.

Co-authored-by: Claude Opus 4.5 <[email protected]>
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: 1

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/custom-tools/custom-data-settings/CustomDataSettings.jsx (1)

65-75: Add details?.custom_data to the useEffect dependency array to sync editor state after save.

The effect depends only on details?.tool_id, but when you save, the API response updates details?.custom_data without changing tool_id. The editor won't refresh, leaving stale data in the UI while the store has the correct server response. Include details?.custom_data in dependencies so edits sync after save, or explicitly refresh jsonValue in the .then() block when updateCustomTool is called.

🤖 Fix all issues with AI agents
In `@frontend/src/components/custom-tools/custom-synonyms/CustomSynonyms.jsx`:
- Around line 249-251: When the component's details prop changes, reset the save
state to avoid showing a stale "Saved"; add an effect that watches details and
sets isSaved = false and hasChanges = false (or recalculates hasChanges) so the
Save button reflects the new tool context — update the CustomSynonyms.jsx
component to reset these flags in a useEffect (or equivalent lifecycle) that
references details, isSaved, and hasChanges.

@chandrasekharan-zipstack
Copy link
Contributor Author

@chandrasekharan-zipstack Request to get the list of places where we have taken out success alerts reviewed by the product owners too, before proceeding to merge.

That being said, appreciate the effort. Keep it coming!

@harini-venkataraman @Deepak-Kesavan @muhammad-ali-e FYI regarding this success alert removal in Prompt Studio and Pipeline pages. This was also agreed over slack

- Add hasChanges/isSaved state to track modifications
- Reset state on tool_id change to prevent stale button state
- Disable Save button until changes are made
- Show "Saved" feedback after successful save

Co-Authored-By: Claude Opus 4.5 <[email protected]>
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

Caution

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

⚠️ Outside diff range comments (2)
frontend/src/components/custom-tools/custom-synonyms/CustomSynonyms.jsx (1)

198-213: Race condition: edits during save may leave changes unmarked.

If the user modifies a synonym while an API request is in flight, the .then() callback will set hasChanges=false and isSaved=true, even though the new edits haven't been persisted. The Save button will incorrectly show "Saved" and remain disabled.

Consider capturing a "dirty" snapshot before the request or comparing state after completion.

🔧 Suggested fix using a ref to track in-flight changes
+ const pendingChangesRef = useRef(false);
+
  const handleChange = (index, propertyName, value) => {
    const updatedSynonyms = [...synonyms];
    updatedSynonyms[index][propertyName] = value;
    setSynonyms(updatedSynonyms);
    setHasChanges(true);
    setIsSaved(false);
+   if (isLoading) {
+     pendingChangesRef.current = true;
+   }
  };

  // ... in updateSynonyms .then() callback:
      .then(() => {
        if (actionType === actionTypes.delete) {
          setSynonyms(listOfSynonyms);
        }
-       setHasChanges(false);
-       if (actionType === actionTypes.save) {
-         setIsSaved(true);
-       }
+       if (pendingChangesRef.current) {
+         pendingChangesRef.current = false;
+         // Changes made during save - keep hasChanges true
+       } else {
+         setHasChanges(false);
+         if (actionType === actionTypes.save) {
+           setIsSaved(true);
+         }
+       }
      })
frontend/src/components/custom-tools/pre-and-post-amble-modal/PreAndPostAmbleModal.jsx (1)

68-95: Add isLoading to the disabled prop for proper button state feedback.

The loading prop prevents the onClick handler from firing during requests, but it does not set the DOM disabled attribute. This should be added explicitly for correct UX and accessibility—users should see the button as disabled while the request is in flight.

-              disabled={isPublicSource || !hasChanges}
+              disabled={isPublicSource || !hasChanges || isLoading}

Also applies to: 167-170

@sonarqubecloud
Copy link

@chandrasekharan-zipstack chandrasekharan-zipstack merged commit 7829c15 into main Jan 28, 2026
6 checks passed
@chandrasekharan-zipstack chandrasekharan-zipstack deleted the feature/remove-success-alerts branch January 28, 2026 14:42
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