Skip to content

Commit 9e819df

Browse files
committed
chore(automation): enhance chat layout and add custom scrollbar styles
1 parent 2181799 commit 9e819df

File tree

4 files changed

+75
-40
lines changed

4 files changed

+75
-40
lines changed

apps/app/src/app/(app)/[orgId]/tasks/[taskId]/automation/chat.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ export function Chat({ className, orgId, taskId, taskName }: Props) {
259259
) : (
260260
<div className="flex flex-col h-full relative z-20">
261261
<Conversation className="flex-1 min-h-0">
262-
<ConversationContent className="space-y-4">
262+
<ConversationContent className="space-y-4 chat-scrollbar">
263263
{messages.map((message) => (
264264
<Message
265265
key={message.id}

apps/app/src/app/(app)/[orgId]/tasks/[taskId]/automation/components/AutomationPageClient.tsx

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { useTaskAutomationStore } from '../lib/task-automation-store';
77
import { ScriptInitializer } from '../script-initializer';
88
import { AutomationTester } from './automation/AutomationTester';
99
import { ChatUIMessage } from './chat/types';
10-
import { Horizontal } from './layout/panels';
1110
import { TabContent, TabItem } from './tabs';
1211
import { WorkflowVisualizerSimple as WorkflowVisualizer } from './workflow/workflow-visualizer-simple';
1312

@@ -48,15 +47,27 @@ export function AutomationPageClient({ orgId, taskId, taskName }: Props) {
4847
</div>
4948

5049
{/* Desktop layout: Chat on left, Workflow on right OR Chat full-screen */}
51-
<div className="hidden flex-1 w-full min-h-0 overflow-hidden md:flex">
52-
{scriptUrl || hasMessages ? (
53-
<Horizontal
54-
left={<Chat className="h-full" orgId={orgId} taskId={taskId} taskName={taskName} />}
55-
right={<WorkflowVisualizer className="h-full" />}
56-
/>
57-
) : (
50+
<div className="hidden flex-1 w-full min-h-0 overflow-hidden md:flex transition-all duration-500 ease-out">
51+
<div
52+
className={`transition-all duration-500 ease-out ${
53+
scriptUrl || hasMessages ? 'w-1/2' : 'w-full'
54+
}`}
55+
>
5856
<Chat className="h-full w-full" orgId={orgId} taskId={taskId} taskName={taskName} />
59-
)}
57+
</div>
58+
59+
{/* Workflow panel - slides in from right */}
60+
<div
61+
className={`transition-all duration-500 ease-out overflow-hidden ${
62+
scriptUrl || hasMessages ? 'w-1/2 opacity-100' : 'w-0 opacity-0'
63+
}`}
64+
>
65+
{(scriptUrl || hasMessages) && (
66+
<div className="w-full h-full ml-2">
67+
<WorkflowVisualizer className="h-full" />
68+
</div>
69+
)}
70+
</div>
6071
</div>
6172
</div>
6273
);

apps/app/src/app/(app)/[orgId]/tasks/[taskId]/automation/components/workflow/components/UnifiedWorkflowCard.tsx

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -42,36 +42,6 @@ export function UnifiedWorkflowCard({ steps, title, onTest }: Props) {
4242
}, [steps.length]);
4343
return (
4444
<Card className="w-full min-w-md max-w-md mx-auto bg-background border border-border shadow-md rounded-2xl overflow-hidden flex flex-col flex-1 animate-in fade-in slide-in-from-bottom-4 duration-1000 ease-out">
45-
<style jsx>{`
46-
@keyframes reveal-step {
47-
from {
48-
opacity: 0;
49-
transform: translateY(16px);
50-
}
51-
to {
52-
opacity: 1;
53-
transform: translateY(0);
54-
}
55-
}
56-
57-
@keyframes zoom-icon {
58-
from {
59-
transform: scale(0);
60-
}
61-
to {
62-
transform: scale(1);
63-
}
64-
}
65-
66-
@keyframes expand-height {
67-
from {
68-
max-height: 0;
69-
}
70-
to {
71-
max-height: var(--final-height);
72-
}
73-
}
74-
`}</style>
7545
{/* Header with integration icons */}
7646
<CardHeader className="p-4">
7747
<div className="flex items-center gap-2 mb-4">

apps/app/src/styles/globals.css

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,57 @@ body {
5050
background-color: hsl(var(--primary));
5151
color: white;
5252
}
53+
54+
/* Custom thin scrollbar for chat */
55+
.chat-scrollbar::-webkit-scrollbar {
56+
width: 3px;
57+
}
58+
59+
.chat-scrollbar::-webkit-scrollbar-track {
60+
background: transparent;
61+
}
62+
63+
.chat-scrollbar::-webkit-scrollbar-thumb {
64+
background: hsl(var(--muted-foreground) / 0.15);
65+
border-radius: 2px;
66+
}
67+
68+
.chat-scrollbar::-webkit-scrollbar-thumb:hover {
69+
background: hsl(var(--muted-foreground) / 0.25);
70+
}
71+
72+
/* Firefox scrollbar */
73+
.chat-scrollbar {
74+
scrollbar-width: thin;
75+
scrollbar-color: hsl(var(--muted-foreground) / 0.15) transparent;
76+
}
77+
78+
/* Workflow card animations */
79+
@keyframes reveal-step {
80+
from {
81+
opacity: 0;
82+
transform: translateY(16px);
83+
}
84+
to {
85+
opacity: 1;
86+
transform: translateY(0);
87+
}
88+
}
89+
90+
@keyframes zoom-icon {
91+
from {
92+
transform: scale(0);
93+
}
94+
to {
95+
transform: scale(1);
96+
}
97+
}
98+
99+
@keyframes expand-height {
100+
from {
101+
max-height: 0;
102+
}
103+
to {
104+
max-height: var(--final-height);
105+
}
106+
}

0 commit comments

Comments
 (0)