Skip to content

Commit 358f6ba

Browse files
chat thread styling
1 parent 3e59383 commit 358f6ba

2 files changed

Lines changed: 29 additions & 26 deletions

File tree

packages/web/src/app/(app)/chat/[id]/components/chatThreadPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export const ChatThreadPanel = ({
6262
}, [chatState, setChatState]);
6363

6464
return (
65-
<div className="flex flex-col h-full w-full">
65+
<div className="flex flex-col flex-1 min-h-0 w-full">
6666
<ChatThread
6767
id={chatId}
6868
initialMessages={messages}

packages/web/src/app/(app)/chat/[id]/page.tsx

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { isServiceError } from '@/lib/utils';
66
import { ChatThreadPanel } from './components/chatThreadPanel';
77
import { notFound } from 'next/navigation';
88
import { StatusCodes } from 'http-status-codes';
9-
import { TopBar } from '../../components/topBar';
9+
import { Separator } from '@/components/ui/separator';
1010
import { ChatName } from '../components/chatName';
1111
import { ShareChatPopover } from '../components/shareChatPopover';
1212
import { auth } from '@/auth';
@@ -134,30 +134,33 @@ export default async function Page(props: PageProps) {
134134

135135
return (
136136
<div className="flex flex-col h-full">
137-
<TopBar
138-
homePath="/chat"
139-
session={session}
140-
centerContent={
141-
<ChatName
142-
name={name}
143-
id={params.id}
144-
isOwner={isOwner}
145-
isAuthenticated={!!session}
146-
/>
147-
}
148-
actions={isOwner ? (
149-
<ShareChatPopover
150-
chatId={params.id}
151-
visibility={visibility}
152-
currentUser={session?.user}
153-
sharedWithUsers={sharedWithUsers}
154-
isChatSharingEnabledInCurrentPlan={hasChatSharingEntitlement}
155-
// Disable chat sharing for the askgh experiment since we
156-
// don't want to allow users to search other members.
157-
isChatSharingEnabled={env.EXPERIMENT_ASK_GH_ENABLED === 'false'}
158-
/>
159-
) : undefined}
160-
/>
137+
<div className="sticky top-0 left-0 right-0 z-10">
138+
<div className="flex flex-row items-center py-1.5 px-3">
139+
<div className="flex-1 flex justify-center">
140+
<ChatName
141+
name={name}
142+
id={params.id}
143+
isOwner={isOwner}
144+
isAuthenticated={!!session}
145+
/>
146+
</div>
147+
<div className="shrink-0">
148+
{isOwner && (
149+
<ShareChatPopover
150+
chatId={params.id}
151+
visibility={visibility}
152+
currentUser={session?.user}
153+
sharedWithUsers={sharedWithUsers}
154+
isChatSharingEnabledInCurrentPlan={hasChatSharingEntitlement}
155+
// Disable chat sharing for the askgh experiment since we
156+
// don't want to allow users to search other members.
157+
isChatSharingEnabled={env.EXPERIMENT_ASK_GH_ENABLED === 'false'}
158+
/>
159+
)}
160+
</div>
161+
</div>
162+
<Separator />
163+
</div>
161164
<ChatThreadPanel
162165
languageModels={languageModels}
163166
repos={indexedRepos}

0 commit comments

Comments
 (0)