🏷️ fix: Editing Bookmark Descriptions (#10685)

* fix: exclude the currently edited bookmark from duplicate checks

* ci: Add comprehensive tests for BookmarkForm component

- Introduced a new test suite for the BookmarkForm component to validate bookmark editing functionality.
- Implemented tests for various scenarios including editing descriptions, renaming tags, and handling duplicate tags.
- Ensured proper feedback through toasts for error cases and successful submissions.
- Mocked necessary hooks and context to isolate component behavior during tests.

---------

Co-authored-by: Danny Avila <danny@librechat.ai>
This commit is contained in:
Dustin Healy 2025-11-26 08:15:31 -08:00 committed by GitHub
parent 5b8f0cba04
commit 07ed2cfed4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 500 additions and 1 deletions

View file

@ -72,7 +72,7 @@ const BookmarkForm = ({
}
const allTags =
queryClient.getQueryData<TConversationTag[]>([QueryKeys.conversationTags]) ?? [];
if (allTags.some((tag) => tag.tag === data.tag)) {
if (allTags.some((tag) => tag.tag === data.tag && tag.tag !== bookmark?.tag)) {
showToast({
message: localize('com_ui_bookmarks_create_exists'),
status: 'warning',