Skip to content

Commit 54b3bd2

Browse files
GimirMagomed-Elbi_Dzhukalaev
andauthored
fix(chat): fix author in table view, hide folder context menu on message stream (Issue #4858, #4890, #4988) (#5100)
Co-authored-by: Magomed-Elbi_Dzhukalaev <[email protected]>
1 parent 3738f89 commit 54b3bd2

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

apps/chat/src/components/Chat/Publish/PublicationHandler/PublicationHandler.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ export function PublicationHandler({ publication, onSubmit }: Props) {
402402
)}
403403
>
404404
<div
405-
className="relative flex size-full flex-col gap-px rounded 2xl:max-w-[1000px]"
405+
className="relative flex size-full flex-col divide-y divide-tertiary rounded 2xl:max-w-[1000px]"
406406
data-qa="publish-approval-modal"
407407
>
408408
<div className="flex w-full flex-col justify-center rounded-t bg-layer-2 px-3 py-4 md:px-5">

apps/chat/src/components/Chatbar/ChatFolders.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ const ChatFolderTemplate = ({
291291
/>
292292
<Folder
293293
maxDepth={MAX_CONVERSATION_AND_PROMPT_FOLDERS_DEPTH}
294-
readonly={readonly}
294+
readonly={readonly || isConversationsStreaming}
295295
searchTerm={searchTerm}
296296
currentFolder={folder}
297297
itemComponent={ConversationComponent}
@@ -309,7 +309,7 @@ const ChatFolderTemplate = ({
309309
featureType={FeatureType.Chat}
310310
loadingFolderIds={loadingFolderIds}
311311
onSelectFolder={handleFolderSelect}
312-
canSelectFolders={isSelectMode}
312+
canSelectFolders={!isConversationsStreaming && isSelectMode}
313313
additionalItemData={additionalFolderData}
314314
/>
315315
{isLast && (

apps/chat/src/components/Marketplace/AgentsList/AgentsTable/AgentsTableRightSideRow.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@ import classNames from 'classnames';
77
import { useScreenState } from '@/src/hooks/useScreenState';
88

99
import { isDialAiEntityModel } from '@/src/utils/app/application';
10+
import { isMyApplication } from '@/src/utils/app/id';
1011

1112
import { ScreenState } from '@/src/types/common';
1213
import { MarketplaceEntity } from '@/src/types/marketplace';
1314
import { Translation } from '@/src/types/translation';
1415

16+
import { AuthSelectors } from '@/src/store/auth/auth.selectors';
17+
import { useAppSelector } from '@/src/store/hooks';
18+
1519
import { DateRenderer } from '@/src/components/Common/DateRenderer';
1620
import { Tooltip } from '@/src/components/Common/Tooltip';
1721
import { AgentBookmark } from '@/src/components/Marketplace/AgentBookmark';
@@ -40,9 +44,14 @@ export const AgentsTableRightSideRow: React.FC<Props<MarketplaceEntity>> = memo(
4044
onBookmarkClick,
4145
}) => {
4246
const { t } = useTranslation(Translation.Marketplace);
47+
const userName = useAppSelector(AuthSelectors.selectUserName);
4348

4449
const screenState = useScreenState();
4550

51+
const author = isDialAiEntityModel(entity) ? entity.owner : entity.author;
52+
const displayedAuthor =
53+
(isMyApplication(entity) ? userName : author) ?? t('Unknown');
54+
4655
const { visibleTopics, hiddenTopics } = useMemo<{
4756
visibleTopics: string[];
4857
hiddenTopics: string[];
@@ -104,7 +113,7 @@ export const AgentsTableRightSideRow: React.FC<Props<MarketplaceEntity>> = memo(
104113
)}
105114
</div>
106115
<div className="flex w-[130px] min-w-[130px] items-center">
107-
<p className="truncate">{entity.author ?? t('Unknown')}</p>
116+
<p className="truncate">{displayedAuthor}</p>
108117
</div>
109118
<div className="flex w-[86px] min-w-[86px] items-center">
110119
<p className="truncate">

apps/chat/src/components/Marketplace/EntityDetailsContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function EntityDetailsContent({ entity }: Props) {
1919

2020
const entityInfo = useMemo(
2121
() => ({
22-
author: entity?.author ? entity.author : t('Unknown'),
22+
author: entity?.author ?? t('Unknown'),
2323
createdAt: entity?.createdAt,
2424
}),
2525
[entity.author, entity?.createdAt, t],

0 commit comments

Comments
 (0)