Skip to content

Commit d52e067

Browse files
committed
(chore): Fix AI history dark mode bug
Signed-off-by: SeeuSim <[email protected]>
1 parent c9c3b14 commit d52e067

File tree

4 files changed

+20
-24
lines changed

4 files changed

+20
-24
lines changed

frontend/.env.local

Lines changed: 0 additions & 7 deletions
This file was deleted.

frontend/src/components/blocks/interview/chat/chat-layout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,15 @@ export const ChatLayout = ({
110110
<Trash2 className='size-4' />
111111
</Button>
112112
</AlertDialogTrigger>
113-
<AlertDialogContent>
113+
<AlertDialogContent className='border-border'>
114114
<AlertDialogHeader>
115-
<AlertDialogTitle>Clear Chat History</AlertDialogTitle>
115+
<AlertDialogTitle className='text-primary'>Clear Chat History</AlertDialogTitle>
116116
<AlertDialogDescription>
117117
Are you sure you want to clear the chat history? This action cannot be undone.
118118
</AlertDialogDescription>
119119
</AlertDialogHeader>
120120
<AlertDialogFooter>
121-
<AlertDialogCancel>Cancel</AlertDialogCancel>
121+
<AlertDialogCancel className='text-primary'>Cancel</AlertDialogCancel>
122122
<AlertDialogAction onClick={onClearHistory}>Clear History</AlertDialogAction>
123123
</AlertDialogFooter>
124124
</AlertDialogContent>

frontend/src/components/blocks/interview/question-attempts/attempt-details/code-viewer.tsx

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
44
import { oneDark } from 'react-syntax-highlighter/dist/esm/styles/prism';
55

66
import { Button } from '@/components/ui/button';
7+
import { ScrollArea } from '@/components/ui/scroll-area';
78

89
type ICodeProps = {
910
code: string;
@@ -24,7 +25,7 @@ export const CodeViewer: FC<ICodeProps> = ({ code, language }) => {
2425
};
2526

2627
return (
27-
<div className='flex size-full flex-col overflow-y-auto rounded-md'>
28+
<div className='flex size-full flex-col text-clip rounded-md'>
2829
<div className='bg-muted-foreground text-muted dark:bg-muted dark:text-muted-foreground flex w-full items-center justify-between px-3 py-2'>
2930
<span className='text-sm font-medium'>{language}</span>
3031
<Button
@@ -41,18 +42,20 @@ export const CodeViewer: FC<ICodeProps> = ({ code, language }) => {
4142
)}
4243
</Button>
4344
</div>
44-
<SyntaxHighlighter
45-
customStyle={{
46-
borderRadius: '0 0 0.3em 0.3em',
47-
margin: 0,
48-
minHeight: '100px',
49-
}}
50-
PreTag='div'
51-
style={oneDark}
52-
language={language}
53-
>
54-
{code}
55-
</SyntaxHighlighter>
45+
<ScrollArea className='flex h-full max-h-[calc(100dvh-160px)] flex-col'>
46+
<SyntaxHighlighter
47+
customStyle={{
48+
borderRadius: '0 0 0.3em 0.3em',
49+
margin: 0,
50+
minHeight: '100px',
51+
}}
52+
PreTag='div'
53+
style={oneDark}
54+
language={language}
55+
>
56+
{code}
57+
</SyntaxHighlighter>
58+
</ScrollArea>
5659
</div>
5760
);
5861
};

frontend/src/components/blocks/interview/question-attempts/attempt-details/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const AttemptDetailsDialog: FC<PropsWithChildren<AttemptDetailsPaneProps>
3131
) : (
3232
<DialogTrigger>{triggerText}</DialogTrigger>
3333
)}
34-
<DialogContent className='border-border text-primary'>
34+
<DialogContent className='border-border text-primary flex max-h-dvh flex-col'>
3535
<DialogHeader>
3636
<DialogTitle className=''>
3737
Attempt&nbsp;<span className='font-mono'>{attemptId}</span>

0 commit comments

Comments
 (0)