From 5f4b31d3224761f1fcbb0448b587746bdac360a8 Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Fri, 13 Dec 2024 17:21:54 -0800 Subject: [PATCH] k --- backend/onyx/server/manage/users.py | 6 +++--- web/src/components/Modal.tsx | 8 ++------ web/tests/e2e/chromaticSnpashots.json | 8 -------- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/backend/onyx/server/manage/users.py b/backend/onyx/server/manage/users.py index d75b48441..27b8e23fa 100644 --- a/backend/onyx/server/manage/users.py +++ b/backend/onyx/server/manage/users.py @@ -206,9 +206,9 @@ def list_all_users( invited=[InvitedUserSnapshot(email=email) for email in invited_emails][ invited_page * USERS_PAGE_SIZE : (invited_page + 1) * USERS_PAGE_SIZE ], - accepted_pages=accepted_count // USERS_PAGE_SIZE + 1, - invited_pages=invited_count // USERS_PAGE_SIZE + 1, - slack_users_pages=slack_users_count // USERS_PAGE_SIZE + 1, + accepted_pages=(accepted_count + USERS_PAGE_SIZE - 1) // USERS_PAGE_SIZE, + invited_pages=(invited_count + USERS_PAGE_SIZE - 1) // USERS_PAGE_SIZE, + slack_users_pages=(slack_users_count + USERS_PAGE_SIZE - 1) // USERS_PAGE_SIZE, ) diff --git a/web/src/components/Modal.tsx b/web/src/components/Modal.tsx index 85871baa6..1c6b4462c 100644 --- a/web/src/components/Modal.tsx +++ b/web/src/components/Modal.tsx @@ -47,12 +47,8 @@ export function Modal({ }, []); const handleMouseDown = (e: React.MouseEvent) => { - if ( - onOutsideClick && - modalRef.current && - !modalRef.current.contains(e.target as Node) && - !isEventWithinRef(e.nativeEvent, modalRef) - ) { + // Only close if the user clicked exactly on the overlay (and not on a child element). + if (onOutsideClick && e.target === e.currentTarget) { onOutsideClick(); } }; diff --git a/web/tests/e2e/chromaticSnpashots.json b/web/tests/e2e/chromaticSnpashots.json index 342e28fda..1076b2fa2 100644 --- a/web/tests/e2e/chromaticSnpashots.json +++ b/web/tests/e2e/chromaticSnpashots.json @@ -69,14 +69,6 @@ "path": "indexing/status", "pageTitle": "Existing Connectors" }, - { - "name": "Custom Assistants - Prompt Library", - "path": "prompt-library", - "pageTitle": "Prompt Library", - "options": { - "paragraphText": "Create prompts that can be accessed with the `/` shortcut in Onyx Chat. Prompts created here will be accessible to all users." - } - }, { "name": "User Management - Groups", "path": "groups",