Skip to content

Commit 6eb355a

Browse files
committed
feat: add streaming animation to document editor during generation
- Add pulsing glow animation (streamingGlow) on editor border - Animation activates when agent is running (isLoading state) - Subtle purple glow effect with inset shadow - Provides visual feedback that document is being generated
1 parent 0c72925 commit 6eb355a

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

apps/app/src/app/canvas/page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,10 @@ const DocumentEditor = () => {
345345
How do WebSockets work?
346346
</div>
347347
)}
348-
<div className="flex-1 overflow-hidden flex flex-col" style={{ cursor: "text" }}>
348+
<div
349+
className={`flex-1 overflow-hidden flex flex-col ${isLoading ? "editor-streaming" : ""}`}
350+
style={{ cursor: "text" }}
351+
>
349352
<EditorContent
350353
editor={editor}
351354
className="h-full p-10 overflow-y-auto"

apps/app/src/app/canvas/style.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,21 @@
122122
.ProseMirror:focus-visible {
123123
outline: none;
124124
}
125+
126+
/* Streaming animation for active generation */
127+
@keyframes streamingGlow {
128+
0% {
129+
box-shadow: inset 0 0 0 2px rgba(139, 92, 246, 0.3), 0 0 20px rgba(139, 92, 246, 0.1);
130+
}
131+
50% {
132+
box-shadow: inset 0 0 0 2px rgba(139, 92, 246, 0.6), 0 0 30px rgba(139, 92, 246, 0.2);
133+
}
134+
100% {
135+
box-shadow: inset 0 0 0 2px rgba(139, 92, 246, 0.3), 0 0 20px rgba(139, 92, 246, 0.1);
136+
}
137+
}
138+
139+
.editor-streaming {
140+
animation: streamingGlow 2s ease-in-out infinite;
141+
border-radius: 0.5rem;
142+
}

0 commit comments

Comments
 (0)