Skip to content

[MISC] Enhance Save UX in prompt studio settings components#1761

Merged
chandrasekharan-zipstack merged 1 commit intofeature/remove-success-alertsfrom
feature/save-button-ux
Jan 28, 2026
Merged

[MISC] Enhance Save UX in prompt studio settings components#1761
chandrasekharan-zipstack merged 1 commit intofeature/remove-success-alertsfrom
feature/save-button-ux

Conversation

@chandrasekharan-zipstack
Copy link
Contributor

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

What

  • Fix Save button not showing "Saved" text after successful save in settings components
  • Change useEffect dependency from field values to details?.tool_id

Why

  • The useEffect was watching details?.enable_challenge, details?.challenge_llm (and similar field values)
  • When save succeeded, the store was updated with new values, triggering the useEffect
  • This immediately reset isSaved to false, preventing "Saved" text from ever displaying

How

  • Changed useEffect dependency to details?.tool_id so it only resets on tab/tool switch
  • Affected components: CustomDataSettings, CustomSynonyms, PreAndPostAmbleModal

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. This only affects the Save button text display logic. The actual save functionality is unchanged.

Related Issues or PRs

  • Part of save button UX improvements

Notes on Testing

  • Open each settings component (Custom Data Settings, Custom Synonyms, Pre/Post Amble)
  • Make a change and click Save
  • Verify button shows "Saved" text after successful save
  • Verify "Saved" persists until another change is made

Screenshots

image

Checklist

I have read and understood the Contribution Guidelines.

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 28, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

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

@chandrasekharan-zipstack chandrasekharan-zipstack changed the title [FIX] Fix Save→Saved button text not showing in settings components [MISC] Enhance Save UX in prompt studio settings components Jan 28, 2026
@chandrasekharan-zipstack chandrasekharan-zipstack merged commit cf943bc into feature/remove-success-alerts Jan 28, 2026
5 checks passed
@chandrasekharan-zipstack chandrasekharan-zipstack deleted the feature/save-button-ux branch January 28, 2026 09:33
chandrasekharan-zipstack added a commit that referenced this pull request Jan 28, 2026
* [FEAT] Remove success alerts from deployments and pipelines

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* [FEAT] Remove success alerts from custom tools and settings components

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 <noreply@anthropic.com>

* Added alert for Test Connection

* [MISC] Enhance Save UX in prompt studio settings components (#1761)

[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 <noreply@anthropic.com>

* [FIX] Add Save button UX to CustomSynonyms and PreAndPostAmbleModal

- 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 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
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.

3 participants